A data processing method and related device

By configuring mobile devices as the target load state, collecting and training network models, the problems of data integrity and accuracy in power consumption measurement in existing technologies are solved, and efficient power consumption prediction and energy efficiency optimization are achieved.

CN123185094APending Publication Date: 2026-11-27TENCENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510686054.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously satisfy data integrity and measurement accuracy when measuring the power consumption of mobile devices, and the accuracy of power consumption prediction is not high.

Method used

By configuring the device to the target load state, collecting hardware indicator data and reference power consumption data, and using a network model for training, a power consumption prediction model is established to achieve accurate power consumption prediction under any load state.

Benefits of technology

It improves the accuracy of power consumption prediction, reduces data acquisition costs, optimizes device energy efficiency, and extends battery life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185094A_ABST
    Figure CN123185094A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of data processing method and related equipment, the method comprises: according to the target load parameter group of pre-set, first equipment is configured to corresponding target load state;In the first connection mode of first equipment, the hardware index data of first equipment under target load state is collected;In the second connection mode of first equipment, the reference power consumption data of first equipment under target load state is collected;Call network model based on the hardware index data of first equipment under target load state carries out power consumption prediction processing, obtains the predicted power consumption data of first equipment under target load state;According to the difference between the reference power consumption data and predicted power consumption data of first equipment under target load state, network model is trained. In this way, the data integrity and measurement accuracy can be met by controllable load parameters, and the model training effect can also be guaranteed, and the accuracy of model predicted power consumption is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, a data processing apparatus, a computer device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] Analyzing the power consumption (e.g., battery consumption) of mobile devices in specific scenarios can help them dynamically adjust resource usage based on actual needs, thereby optimizing power consumption performance. Currently, in USB-based hardware monitoring solutions, a communication connection can be established between a PC and the mobile device via a USB cable. Hardware performance data can be collected using appropriate tools, and power consumption data can be obtained through battery ammeter readings. However, this method is susceptible to charging interference from the USB cable, making accurate power consumption measurement impossible. In wireless LAN-based measurement solutions, real discharge data can be measured via a wireless LAN connection, but hardware performance data collection is incomplete. Therefore, neither of these measurement methods can simultaneously satisfy data integrity and measurement accuracy. Although some offline modeling and simulation models can predict power consumption, their accuracy in predicting mobile device power consumption is not high enough. Summary of the Invention

[0003] This application provides a data processing method and related equipment that can satisfy data integrity and measurement accuracy through controllable load parameters, ensure model training effect, and improve the accuracy of power consumption prediction.

[0004] On one hand, embodiments of this application provide a data processing method, which includes:

[0005] Configure the first device to the corresponding target load state according to the preset target load parameter group;

[0006] In the first connection mode of the first device, hardware indicator data of the first device under the target load state are collected; in the second connection mode of the first device, reference power consumption data of the first device under the target load state are collected.

[0007] The network model is invoked to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state, so as to obtain the predicted power consumption data of the first device under the target load state.

[0008] Based on the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state, a network model is trained. The trained network model is used to predict the power consumption data of the first device under any load state.

[0009] On one hand, embodiments of this application provide a data processing apparatus, which includes:

[0010] The configuration unit is used to configure the first device to the corresponding target load state according to the preset target load parameter group;

[0011] The acquisition unit is used to acquire hardware indicator data of the first device under a target load state in a first connection mode of the first device; and to acquire reference power consumption data of the first device under a target load state in a second connection mode of the first device.

[0012] The training unit is used to call the network model to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state, so as to obtain the predicted power consumption data of the first device under the target load state.

[0013] The training unit is also used to train a network model based on the difference between reference power consumption data and predicted power consumption data of the first device under the target load state. The trained network model is used to predict the power consumption data of the first device under any load state.

[0014] On one hand, embodiments of this application provide a computer device, which includes: a processor adapted to execute a computer program; and a computer-readable storage medium storing the computer program, wherein when the computer program is executed by the processor, it implements the data processing method described above.

[0015] On one hand, embodiments of this application provide a computer-readable storage medium storing a computer program, which is loaded by a processor and executed as described above in the data processing method.

[0016] On one hand, embodiments of this application provide a computer program product, which includes a computer program or computer instructions, and the computer program or computer instructions implement the above-described data processing method when executed by a processor.

[0017] In this embodiment, the first device can be configured to a target load state according to a preset target load parameter set. Hardware performance data of the first device under this target load state is collected in a first connection mode, and reference power consumption data of the first device under this target load state is collected in a second connection mode. This allows the first device to be controlled to the same load state in different connection modes using the target load parameter set, and data can be collected under different connection modes, satisfying the requirements for data acquisition accuracy and completeness. The hardware performance data and reference power consumption data can be used to train a network model. Specifically, the network model can be called to perform power consumption prediction processing based on the hardware performance data of the first device under the target load state to obtain predicted power consumption data. The network model is then trained based on the difference between the predicted power consumption data and the reference power consumption data. The trained network model is used to perform power consumption prediction processing based on the hardware performance data of the first device under any load state. By training a model capable of predicting device power consumption, intelligent power consumption prediction can be achieved, improving the accuracy of power consumption prediction, reducing the cost of acquiring power consumption data, and providing data support for optimizing device energy efficiency and extending battery life. Attached Figure Description

[0018] Figure 1 This is an architectural diagram of a data processing system provided in an exemplary embodiment of this application;

[0019] Figure 2 This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application;

[0020] Figure 3a This is a schematic diagram of a load configuration interface provided in an exemplary embodiment of this application;

[0021] Figure 3b This is a schematic diagram of a battery temperature profile provided in an exemplary embodiment of this application;

[0022] Figure 3c This is a schematic diagram of an automatic data collection process provided in an exemplary embodiment of this application;

[0023] Figure 3d This is a schematic diagram of a power consumption data curve provided in an exemplary embodiment of this application;

[0024] Figure 3e This is a schematic diagram of a GPU utilization curve and a battery temperature curve in WiFi mode provided in an exemplary embodiment of this application;

[0025] Figure 3f This is a schematic diagram illustrating the correspondence between hardware performance data and reference power consumption data provided in an exemplary embodiment of this application;

[0026] Figure 4a This is a schematic diagram of a model training process provided in an exemplary embodiment of this application;

[0027] Figure 4b This is a schematic diagram comparing predicted power consumption and actual power consumption, provided in an exemplary embodiment of this application.

[0028] Figure 5 This is a flowchart illustrating another data processing method provided in an exemplary embodiment of this application;

[0029] Figure 6a This is a schematic diagram illustrating a model application provided in an exemplary embodiment of this application;

[0030] Figure 6b This is a schematic diagram illustrating a model training and model application process provided in an exemplary embodiment of this application;

[0031] Figure 7 This is a schematic diagram of the structure of a data processing apparatus provided in an exemplary embodiment of this application;

[0032] Figure 8 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] This application proposes a data processing scheme involving a data processing system, method, and related equipment. The scheme includes: configuring a first device to a corresponding target load state according to a preset target load parameter set; collecting hardware indicator data of the first device under the target load state in a first connection mode; and collecting reference power consumption data of the first device under the target load state in a second connection mode; calling a network model to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state to obtain predicted power consumption data of the first device under the target load state; and training a network model based on the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state. The trained network model is used to predict the power consumption data of the first device under any load state. By using the preset target load parameter set, the load state of the first device can be controlled, and data from different connection modes under a controllable load state can be collected, simultaneously satisfying the integrity of data collection and measurement accuracy. The data from the two connection modes can be used to train the network model, thereby enabling the trained network model to accurately predict the power consumption of the first device under any load state.

[0035] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor is there any limitation on the quantity or execution order. In this application, the term "at least one" means one or more, and "multiple" means two or more; for example, "at least one load parameter group" refers to one, two, or more load parameter groups.

[0036] In this embodiment, the network model can be a machine learning model. Machine learning is a branch of artificial intelligence that uses algorithms and statistical models to enable computer systems to learn patterns from data and use these patterns to make predictions or decisions without explicit programming. Machine learning can include the following types: supervised learning, unsupervised learning, and reinforcement learning. Supervised learning trains a model using labeled data for classification or regression tasks; unsupervised learning discovers hidden patterns in unlabeled data, such as clustering or dimensionality reduction; reinforcement learning optimizes decision-making strategies through trial and error and reward mechanisms. In this embodiment, machine learning algorithms can be used to construct a power consumption prediction model (i.e., the trained network model) by analyzing the historical power consumption data and usage behavior of the first device through supervised learning, thereby achieving accurate prediction of device power consumption.

[0037] The architecture of the data processing system provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0038] Please see Figure 1 This is an architecture diagram of a data processing system provided in an exemplary embodiment of this application. Figure 1 As shown, the data processing system includes a database 101 and a computer device 102; the database 101 can establish a communication connection with the computer device 102 via wired or wireless means. The computer device 102 is used to execute data processing procedures; the database 101 is used to provide data support for the data processing procedures of the computer device 102. Depending on the deployment location, the database 101 can be a local database of the computer device 102 or a cloud database that can establish a connection with the computer device 102. Depending on its attributes, the database 101 can be a public database, i.e., a database open to all computer devices; or it can be a private database, i.e., a database open only to specific computer devices (such as computer device 102). The database 101 is used to collect various data, such as hardware performance data, power consumption data, etc.

[0039] The data processing flow executed by computer device 102 can generally include: configuring the first device to a corresponding target load state according to the target load parameter set. In one embodiment, a load adjustment project can be constructed and run first to generate a load group sequence, which includes N load parameter sets arranged in order of generation timestamp, where N is a positive integer. The load adjustment project can include multi-dimensional parameters such as CPU computing intensity, GPU shader complexity, memory bandwidth ratio, and network traffic packet volume. Based on the operation of the load adjustment project, a standardized hardware load sequence can be generated through parameterized configuration, enabling the mobile device to generate a reproducible hardware resource usage pattern under a preset combination of load parameters. In one implementation, the computer device can traverse the load parameter sets in the load group sequence and use the traversed load parameter sets as target load parameter sets, and then configure the first device to a corresponding target load state according to the target load parameter sets. In another implementation, each time a load parameter set is generated, the first device can be configured to a corresponding load state according to the generated load parameter set, and then relevant data under that load state can be collected. The first device and the computer device can establish a communication connection via wired or wireless means. For example, the first connection mode can refer to a wired communication connection, and the second connection mode can refer to a wireless communication connection. If a wired communication connection is established, the connection mode between the first device and the computer device 102 is the first connection mode, and the first device is in the first connection state. If a wireless communication connection is established, the connection mode between the first device and the computer device 102 is the second connection mode, and the first device is in the second connection state. After the first device is configured to the corresponding target load state, based on the communication connection established between the first device and the computer device 102, hardware indicator data of the first device under the target load state can be collected in the first connection mode, and reference power consumption data of the first device under the target load state can be collected in the second connection mode. Based on the N load parameter groups in the load group sequence, which represent the load states configured for the first device, hardware indicator data and reference power consumption data of the first device under N load states can be collected. A network model is then trained based on the hardware indicator data and reference power consumption data under N load states. During training, the hardware indicator data is the actual processing object of the network model, while the reference power consumption data can be used as a label reference for the model output to evaluate the model's predictive ability. The trained network model can be used to predict power consumption based on the hardware indicator data of the first device under any load state.

[0040] Computer device 102 may include any one or both of terminal devices and servers. Terminal devices include, but are not limited to, smartphones, tablets, smart wearable devices, smart voice interaction devices, smart home appliances, personal computers, in-vehicle terminals, smart cameras, etc., and this application does not limit their number. The server may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited to these. The number of servers is not limited.

[0041] The data processing system provided in this application embodiment allows a computer device to configure a first device to a corresponding target load state according to a preset target load parameter set. In a first connection mode of the first device, hardware indicator data of the first device under the target load state is collected. In a second connection mode of the first device, reference power consumption data of the first device under the target load state is collected. A network model is invoked to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state, obtaining predicted power consumption data of the first device under the target load state. Based on the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state, the network model is trained. The trained network model is used to predict the power consumption data of the first device under any load state. By using the preset target load parameter set, the load state of the first device can be controlled, enabling the first device to collect data under different connection modes under the same controllable load state, while simultaneously satisfying the integrity of data collection and measurement accuracy. Data from both connection modes can be used to train the network model, thereby enabling the trained network model to more accurately predict the power consumption of the same type of device under any load state.

[0042] The data processing method provided in the embodiments of this application will be described next.

[0043] Please see Figure 2 This is a flowchart illustrating a data processing method provided in an exemplary embodiment of this application. The data processing method can be performed by a computer device (such as...). Figure 1 The data processing method may include the following: (the data processing system shown is executed by a computer device).

[0044] S201, Configure the first device to the corresponding target load state according to the preset target load parameter group.

[0045] The preset target load parameter set includes at least one load parameter, each of which is the parameter configuration data of the corresponding hardware component of the first device. For example, the target load parameter set includes load parameters such as CPU computing intensity, GPU shader complexity, network packet volume, and frame rate. This target load parameter set can be understood as a combination of at least one load parameter. The target load state includes the load state of the corresponding hardware components in the first device. The load state of these hardware components is obtained by configuring each load parameter in the target load parameter set. For example, the target load state includes CPU load, GPU load, and memory load.

[0046] The first device can be any type of mobile device, which refers to a portable electronic device capable of communication and data exchange via wireless networks. Based on the operating system, the first device includes, but is not limited to: Android devices, iOS devices, and Windows devices; based on device function, the first device includes, but is not limited to: smartphones, computers (such as tablets and laptops), wearable devices (such as smartwatches), etc. Mobile devices are characterized by portability, mobility, battery power, support for multiple communication methods (such as Wi-Fi, Bluetooth, and cellular networks), and a rich application ecosystem.

[0047] In one embodiment, a load group sequence can be pre-set according to the working scenario requirements of the first device. The working scenario requirements of the first device refer to the requirements of the working scenarios served by the first device. For example, the working scenario requirements of the first device include a test scenario where the application runs on the first device, under which the application's performance, functionality, and compatibility can be tested. The load group sequence can be understood as a standardized load sequence that can cover typical working scenarios of mobile devices. This load group sequence can be automatically generated by a parameterized load engineering system. The load group sequence can simulate the load state under the corresponding working scenario requirements, ensuring the systematic nature and repeatability of the test scenario.

[0048] The load group sequence includes N load parameter groups, where N is a positive integer. Each load parameter group includes parameter configuration data for at least one hardware component. Each load parameter group is used to configure a corresponding load state. The preset target load parameter group is any load parameter group in the load group sequence. The hardware components include at least one of the following: CPU, GPU, GPS, display component, communication component, storage component, and sensing component. CPU refers to the central processing unit, GPU refers to the image processor, GPS refers to the positioning component used to determine the latitude and longitude coordinates of the device through satellite signals, thereby providing positioning and navigation functions; the display component includes, for example, a screen; the communication component includes, for example, a network and a network card; the storage component includes, for example, memory; and the sensing component includes, for example, a temperature sensor and a pressure sensor. The N load parameter groups in the load group sequence have a corresponding order based on their respective generation timestamps. Each load parameter group can be used to configure different load states of the first device, thereby collecting relevant data of the first device under different load states to train the network model.

[0049] In one implementation, when pre-setting a load group sequence based on the working scenario requirements of the first device (e.g., a mini-game or APP game testing scenario), the following steps can be performed: Determine the load configuration information based on the working scenario requirements of the first device; set N load parameter groups based on the load configuration information to obtain the load group sequence. The load configuration information includes at least one of the following: parameter type, parameter boundary value, parameter initial value, parameter adjustment direction, parameter adjustment step size, and parameter maintenance duration. The parameter type refers to the type of load parameter. Load parameters can be used to reflect the load of the corresponding hardware components. In this embodiment, load parameters include, but are not limited to: CPU load parameters, GPU load parameters, the number of rendering targets, the resolution of the rendering targets, and the maximum frame rate, etc. For example, see the following table 1 for some load parameters:

[0050] Table 1 Examples of Load Parameters

[0051]

[0052]

[0053] When configuring the load state of the first device according to the number of rendering targets (Blit Count), a GPU bandwidth load can be generated in the first device. GPU bandwidth refers to the data transfer rate between the graphics processing unit (GPU) and memory, usually measured in GB / s (gigabytes per second). It reflects the amount of data the GPU needs to transfer to complete a rendering task. Factors affecting GPU bandwidth include chip architecture; different chip architectures may result in different GPU bandwidths. In addition, factors affecting the data transfer speed include at least one of the following: ① memory type (such as LPDDR4, LPDDR5, etc., different types of memory can provide different transfer speeds); ② bus width (the larger the bus width, the faster the transfer speed); ③ clock frequency (the higher the clock frequency, the faster the transfer speed). As GPU bandwidth is one of the important factors affecting the power consumption of mobile devices, this embodiment of the application can analyze the usage of GPU bandwidth and combine it with machine learning models to predict the power consumption of GPU-related tasks (such as the energy efficiency ratio of the GPU in a specific rendering mode).

[0054] K render targets (RTs) can be configured based on the number of render targets. The total memory space required by the K render targets is greater than the target memory capacity. Target memory is a memory that provides efficient data storage and processing support for GPU image rendering and other tasks; for example, Tiler memory. During rendering, the GPU can interact with target memory, including reading render targets from target memory and storing rendering results in target memory. A computer device can store at least one render target in target memory and read render targets from target memory during the rendering process. The first device can create a sequence of render targets according to the number K render targets. This sequence includes K render targets in an ordered manner, where K is a positive integer, and at least one of the K render targets is not cached in target memory. In terms of rendering method, it can proceed from the k-th render target (Blit) to the (k+1)-th render target, where k is a positive integer less than or equal to K. Blit is a data operation in computer graphics, which involves quickly copying or transferring pixel data from one render target buffer to another. This allows for efficient processing of large amounts of pixel data; Blit can be understood as bit-block transfer. When performing bit block transfer, if both rendering targets are cached in the target memory, then no data copying is required during rendering, thus avoiding GPU bandwidth load. If at least one rendering target is not cached in the target memory, for example, the (k+1)th rendering target is not cached in memory, then the (k+1)th rendering target can be copied to the target memory first, which will generate the corresponding GPU bandwidth load. For example, 16 rendering targets (RTs) can be pre-created according to the Blit Count configuration value. They can be created from Blit 1 to Blit 2, from Blit 2 to Blit 3, and so on, from Blit 15 to Blit 16, and finally from Blit 16 back to Blit 1. If only two RTs can be cached in the target memory, that is, both rendering targets 1 and 2 are cached in the target memory, then Blit 1 to Blit 2 will not generate GPU bandwidth load. However, since Blits 3 to 16 are not in the target memory, the rendering processing of the remaining RTs requires copying the rendering targets not in the target memory to the target memory. The copying process generates effective GPU bandwidth load, and as the number of Blits increases, the GPU bandwidth load also increases effectively. This can overcome the target memory limitation of mobile devices, thereby generating effective bandwidth load.

[0055] In one embodiment, before copying the rendering target from non-target memory to target memory, it can be checked whether the target memory can accommodate the rendering target to be copied. This can be done by comparing the memory space required by the rendering target to be copied with the remaining memory capacity of the target memory. If the memory space required by the rendering target to be copied is greater than the remaining memory capacity of the target memory, then the target memory cannot accommodate the rendering target to be copied; otherwise, the target memory can accommodate the rendering target to be copied. If it cannot accommodate the target target, memory cleanup can be performed to ensure that the target memory has sufficient memory space to cache the copied rendering target and perform rendering processing.

[0056] Parameter boundary values ​​can include upper and lower limits. For each load parameter, a corresponding boundary value can be set, which constrains the automatic adjustment of the load parameter within a controllable range. Initial parameter values ​​can be used to generate the first set of load parameter groups. Each load parameter can have a corresponding initial value, which can be set in a dedicated load configuration interface. Using this initial value as the starting point for adjustment, and based on the settings for parameter adjustment direction, step size, and duration, subsequent load parameter groups can be generated automatically. The reference adjustment direction can include increasing and decreasing directions. The parameter adjustment step size refers to the adjustment magnitude for each adjustment, and each load parameter can correspond to one parameter adjustment step size. For example, parameter adjustment step sizes can include several types as shown in Table 2 below:

[0057] Table 2 Examples of parameter adjustment step sizes

[0058] CPU Step The value of CPU Payload increase each time CPU load is adjusted. GPU Step The value of GPU Payload increase each time GPU compute load is adjusted. Blit Count Step The value by which Blit Count increases each time GPU bandwidth load is adjusted.

[0059] As shown above, the parameter adjustment step size applies to the corresponding load parameter and is set to the increasing direction based on the parameter adjustment direction. Each reference adjustment step size is the value by which the corresponding load parameter increases each time the load is adjusted.

[0060] Hold Duration refers to the duration for which a set of load parameters is maintained after confirmation. This duration indicates the trigger time for parameter adjustments. Optionally, a server address can also be configured, such as the address of a remote Perfdog (a performance testing and analysis tool) server. This server address identifies the server used to receive collected hardware metric data and power consumption data.

[0061] In one embodiment, load configuration information can be set in the load configuration interface. After setting the load configuration information in the load configuration interface, the load parameter group can be automatically generated and relevant data can be collected by triggering the run control. For example, as shown below... Figure 3a The load configuration interface shown allows you to configure various load configuration information mentioned in Tables 1 and 2 above. After clicking the "Start Auto Run" button, the load parameter group will be automatically generated, and all hardware indicator data and reference power consumption data will be collected through the Perfdog remote server. No human intervention is required during normal operation.

[0062] The computer device can respond to the load configuration operation in the load configuration interface, obtain load configuration information, and set N sets of load parameter groups based on the load configuration information. The load configuration information includes at least one initial value for a parameter. When setting N sets of load parameter groups based on the load configuration information, the first set of load parameter groups can be set based on the initial values ​​of each parameter. If N is greater than 1, then after obtaining the first set of load parameter groups, one or more sets of load parameter groups are generated based on the first set of load parameter groups. Specifically, whenever the parameter maintenance duration is reached, the load parameters in the nth set of load parameter groups can be adjusted according to the parameter adjustment direction and parameter adjustment step size to obtain at least one adjusted load parameter, and the (n+1)th set of load parameter groups is generated based on the at least one adjusted load parameter. It should be noted that the (n+1)th set of load parameter groups and the nth set of load parameter groups may contain the same load parameters. This is because some load parameters may remain fixed each time the load parameters are adjusted. For example, the resolution of the Render Target and the maximum frame rate can remain unchanged after the initial values ​​are set, that is, these two load parameters will not be adjusted each time.

[0063] In one implementation, for any load parameter in the nth load parameter group, a candidate load parameter is determined according to the adjustment direction of the load parameter and the parameter adjustment step size. If the candidate load parameter is greater than or equal to the parameter boundary value of the load parameter, the adjusted load parameter is determined according to the candidate load parameter and the boundary value. The adjusted load parameter can be equal to the absolute difference between the candidate load parameter value and the boundary value. The adjusted load parameter is within the boundary value range, which refers to the range formed by the upper boundary value and the lower boundary value.

[0064] In one embodiment, when generating the (n+1)th load parameter group, first test power consumption data can be obtained based on the load parameters in the nth load parameter group, and second test power consumption data can be obtained based on at least one adjusted load parameter; the test power consumption difference is determined based on the first and second test power consumption data; if the test power consumption difference is greater than or equal to a preset difference threshold, the step of generating the (n+1)th load parameter group based on the adjusted load parameters is triggered. That is, after each load adjustment, the power consumption difference before and after the adjustment can be confirmed. If the power consumption difference is greater than or equal to a preset difference threshold, it indicates that the load parameter adjustment is effective, and the adjusted load parameters can be added to the (n+1)th load parameter group.

[0065] S202, in the first connection mode of the first device, collect hardware indicator data of the first device under the target load state; in the second connection mode of the first device, collect reference power consumption data of the first device under the target load state.

[0066] The first connection mode can refer to a wired connection, such as a USB connection; the second connection mode can refer to a wireless connection, such as a Wi-Fi connection or a Bluetooth connection. In the first connection mode, due to the influence of the connection method, it is impossible to collect true discharge power consumption data. Therefore, by configuring the first device with the same load parameter group, and then collecting reference power consumption data in the second connection mode, this reference power consumption data is the true discharge power consumption data under the target load state, which is also the overall power consumption data of the first device. Based on the configuration with the same load state, the data deviation caused by load fluctuations in the two connection modes can be eliminated, ensuring the accuracy of data measurement.

[0067] In one embodiment, the first device can be configured with different load states at different times using different load parameter groups, and can collect different data under two connection modes in each load state. For example, N load parameter groups are applied to the first device in time periods, enabling the first device to have N load states at different times, thereby allowing the collection of hardware performance data and reference power consumption data under N load states. Furthermore, if there is a switching of load states based on the configuration of different load parameter groups, the first device may experience fluctuations in hardware performance data or reference power consumption data during load state switching. Therefore, after waiting for a preset period until the hardware performance data and reference power consumption data stabilize, the collected hardware performance data and reference power consumption data are established as a set of mapping data. This mapping data can be understood as a hardware performance-power consumption group obtained under the configuration of the corresponding load parameter group.

[0068] This application embodiment, through a separate data acquisition process, can collect all hardware indicator data in the first connection mode and, under the same load condition, collect actual discharge power consumption data in the second connection mode. By ensuring the uniqueness of the load parameter group, the correspondence between hardware indicator data and power consumption data is guaranteed, avoiding interference from the charging state on power consumption measurement. This data acquisition is also a dual-stage (USB connection stage and wireless connection stage) data acquisition, ensuring the accuracy and completeness of data measurement. Furthermore, the following points should be noted during data acquisition: ① When the load on the first device is high, the device may overheat, leading to frequency throttling and affecting data accuracy. Therefore, a cooling back clip can be used during data acquisition to avoid frequency throttling caused by overheating. For example, as... Figure 3b The diagram showing battery temperature illustrates that initially, as the load increases, the battery temperature also rises. However, when a cooling back clip is used, the battery temperature tends to stabilize. ② When using a Wi-Fi connection, the first device's battery will gradually deplete, automatically shutting down when the battery is empty. Therefore, manual intervention is required to charge the first device when its battery is low. ③ During data collection, the screen brightness of the first device must be kept consistent; otherwise, unstable power consumption may occur.

[0069] In one implementation, after acquiring N sets of load parameter groups, the computer device can iterate through these N sets and use the iterated load parameter groups as target load parameter groups. It then sequentially configures the corresponding load states for the first device and collects data for both modes under these load states. In another implementation, the computer device can generate a new set of load parameter groups and configure the load states for the first device accordingly, thereby automatically collecting hardware performance data and reference power consumption data. The entire process requires no manual intervention, reducing the workload of data collection.

[0070] For example, providing such Figure 3c The diagram shows a flowchart of the automatic data collection process. Figure 3cAs shown, the process includes a load group generation phase and a hardware metrics-power consumption collection phase. In the load group generation phase, load parameters (including CPU calculation, GPU calculation, GPU bandwidth, and frame rate) can be adjusted based on the GUI interface. First, power consumption differences are confirmed based on the adjusted load parameters. If a power consumption difference exceeds a preset threshold compared to the previous load parameter group, the adjusted load parameters are added to a new load parameter group, and GUI load adjustment continues, repeating this process to obtain N load parameter groups. Then, for each load parameter group, a corresponding load state can be configured for the first device. In USB connection mode, hardware metrics data can be collected using hardware metrics tools, including but not limited to: Xcode (a development toolset), Instrument (a performance tool for monitoring and analyzing applications), Sysdiagnose (a system diagnostic tool), and AGI (an artificial intelligence system). In WiFi connection mode, overall device power consumption can be collected using power analysis tools, including but not limited to: Powerlog (a tool for recording and analyzing device power consumption), PowerTutor (a power analysis tool for the Android platform), and Perfdog (a power analysis tool). After the hardware performance data and overall power consumption have stabilized, a mapping from hardware performance data to overall power consumption can be established to obtain the hardware performance data-power consumption group.

[0071] S203, the network model is invoked to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state, so as to obtain the predicted power consumption data of the first device under the target load state.

[0072] The network model can be a machine learning model used to learn the mapping relationship between hardware indicator data and reference power consumption data. The predicted power consumption data obtained by power consumption prediction processing of hardware indicator data is the total power consumption output by the model. As training progresses, it is gradually corrected to a value that is closer to the reference power consumption data, resulting in a more accurate value.

[0073] S204, Train the network model based on the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state.

[0074] The difference between the reference power consumption data and the predicted power consumption data of the first device under the same load condition can be used to indicate the prediction accuracy of the network model: the greater the difference, the lower the model's prediction accuracy, and vice versa. The model parameters of the network model can be adjusted in the direction of reducing the difference to obtain the trained network model. After training, the network model can learn the non-linear relationship between hardware indicator data and reference power consumption data under at least one load condition, thus enabling the trained network model to accurately predict power consumption data under any load condition.

[0075] In one embodiment, the hardware metric data and reference power consumption data under the target load state belong to a set of training data in the training set of the network model. The training set contains M sets of training data, each set including hardware metric data and reference power consumption data under one load state. A load state is configured by a set of load parameter groups corresponding to a load group sequence, and the load group sequence includes N sets of load parameter groups. M is less than or equal to N. The training set is obtained by: acquiring N sets of mapping data based on the N load states obtained by configuring the N sets of load parameter groups in the load group sequence, each set of mapping data including hardware metric data and reference power consumption data under one load state, where N is a positive integer; cleaning the N sets of mapping data to obtain M sets of mapping data; and adding the M sets of mapping data to the training set as M sets of training data. Hardware metric data and reference power consumption data under different load states in two connection modes are collected in the above manner. However, in the second connection mode, the data collected in the latter half of the load state shows obvious data anomalies, including but not limited to: GPU utilization, battery temperature, and battery power consumption data. Comparative verification revealed that this was due to a protection mechanism similar to a low-power mode being triggered after the battery level gradually decreased to a certain threshold. Therefore, it was necessary to clean the collected data to avoid inaccurate data affecting the training effect. Through data cleaning, abnormal mapping data can be removed from N sets of mapping data, resulting in M ​​sets of mapping data. These M sets of mapping data can be used as M sets of training data. That is, the network model is trained using M sets of mapping data. During the training process, the hardware indicator data in each set of mapping data can be used as input to the network model for prediction, while the reference power consumption data is used as a reference for evaluating the prediction accuracy of the network model.

[0076] In one implementation, when cleaning N sets of mapping data to obtain M sets of mapping data, the following steps ①-③ can be performed: Step ①: Construct a power consumption data curve based on the reference power consumption data in the N sets of mapping data. The power consumption data curve is used to describe the trend of the reference power consumption data under N load conditions. For example, as... Figure 3dThe power consumption data curve shown, in WiFi mode, indicates that the power consumption of the first device gradually decreases at a certain point in time as the data acquisition time increases. Step ②: If the trend indicated by the power consumption data curve is abnormal, then the data anomaly segmentation point is determined based on the power consumption data curve. This data anomaly segmentation point is used to separate normal mapping data and abnormal mapping data in N sets of mapping data. Here, an abnormal trend in the power consumption data curve means that the power consumption data in the power consumption curve starts to decrease from a certain position. This position is the data anomaly segmentation point, which can correspond to the load state configured by a set of load parameter groups. Since the N sets of load parameter groups are sequentially applied to the first device to configure the first device into N load states, when it is determined that the reference power consumption data under the load states corresponding to multiple consecutive sets of load parameter groups shows a decreasing trend, then it can be confirmed that there is a data anomaly, that is, the corresponding hardware indicator data is also abnormal. For example, as shown... Figure 3e The GPU utilization curve and battery temperature curve in WiFi mode, as shown, indicate that starting from the marked point, GPU utilization becomes unstable, while battery temperature generally shows a downward trend. Step ③: Based on the data anomaly segmentation points, determine at least one set of abnormal mapping data from the N sets of mapping data, and remove at least one set of abnormal mapping data from the N sets of mapping data to obtain M sets of mapping data. Since the same set of mapping data is collected under the same load condition, after determining the data anomaly segmentation points based on the reference power consumption data, the mapping data collected under the corresponding load conditions from the (M+1)th load parameter group corresponding to the data anomaly segmentation point to the Nth load parameter group can be identified as abnormal mapping data according to the arrangement order of the load parameter groups. These abnormal mapping data can be removed, thus obtaining M sets of mapping data that are all mapping data collected under the load conditions configured by the first M sets of load parameter groups.

[0077] In this approach, reference power consumption data can be used as the standard for data cleaning. If the reference power consumption data starts to show abnormalities in the load state configured in a certain load parameter group, it indicates that the power of the first device is lower than the preset power threshold and triggers the low power protection mechanism. This will make the data collection inaccurate. Therefore, the reference power consumption data and corresponding hardware indicator data in the load state configured in the load parameter groups after a certain load parameter group can be removed to avoid data interference and ensure the effect of model training.

[0078] In one embodiment, the hardware metric data and reference power consumption data for each load state carry a corresponding load fingerprint. The load fingerprint indicates a set of load parameters corresponding to the load state. For example, the load fingerprint is {0, 4, 0}, representing the following load parameters: CPU load, GPU load, and Blit Count. The configured load parameters can be directly determined through the load fingerprint without needing to maintain the numerical values ​​of the load parameters separately. This establishes a correspondence between hardware metric data and reference power consumption data under the same load configuration; that is, each set of mapping data is obtained by establishing the correspondence between hardware metric data and reference power consumption data through the load fingerprint. The load fingerprint verification mechanism ensures the consistency of load parameter execution in both connection modes, avoiding data deviation.

[0079] In the above implementation, data cleaning is performed after the mapping data is established, which allows for a faster entry into the model training phase. In another implementation, data cleaning can be performed first, followed by the establishment of the mapping data. Specifically, the reference power consumption data and hardware performance data under N load conditions can be cleaned separately to obtain reference power consumption data and hardware performance data under M load conditions. Then, through load fingerprint pairing, the correspondence between the reference power consumption data and hardware performance data under the M load conditions is constructed, resulting in M ​​sets of mapping data. For example, as shown... Figure 3f The diagram illustrates the correspondence between hardware performance data and reference power consumption data. Under the same label (i.e., load fingerprint), the hardware performance data and reference power consumption data can be matched one-to-one and used as training data in subsequent training processes.

[0080] In one embodiment, S203-S204 can be considered as an implementation method of training a network model using hardware indicator data and reference power consumption data of the first device under target load conditions. Before training the network model, training requirements can be obtained. These requirements indicate the required dimensions for the network model. The required dimensions can be obtained by analyzing parameter features. The model training and use mainly have the following characteristics: ① Limited parameter dimensions. The relevant parameters affecting the power consumption data of the first device include, but are not limited to: CPU utilization, GPU utilization, bandwidth, network card, volume, screen brightness, etc. The hardware indicator data of interest will vary depending on the service object. For example, if the service object is the developer of a game application on a mobile device, then hardware indicator data such as screen brightness and volume can be controlled by the player, while the hardware indicator data that the developer is concerned with and can control may include: CPU utilization, GPU utilization, GPU bandwidth, and network traffic, etc. ② Monotonicity of parameters. The impact of each hardware indicator data on the overall power consumption is monotonically increasing. For example, an increase in CPU utilization and GPU bandwidth will inevitably mean an increase in power consumption. ③ Small dataset. In this embodiment, it is not necessary to collect a massive dataset; a small dataset is sufficient for basic verification. ④ There are requirements for prediction efficiency. If the target audience is developers, they need to frequently call the trained network model to predict power consumption when optimizing power consumption. Therefore, the prediction efficiency cannot be too low. ⑤ The parameters should be easily extensible. As the model iterates further, it is expected that more parameters can be incorporated to train the model. Therefore, the model needs to have good extensibility in terms of parameter dimensions.

[0081] The computer device can determine the target algorithm from at least one machine learning algorithm according to the training requirements. At least one machine learning algorithm includes, but is not limited to, the following: KNN (k-nearest neighbor), RBF (Radial Basis Function), and GBR (Gradient Boosting Regression). If the training requirements indicate that the platform has high performance requirements for model training but low real-time prediction requirements, then the KNN algorithm can be used for model training; if the training requirements indicate that the developers need to collect parameters with complex nonlinear relationships and attempt to build a prediction model, then the RBF algorithm can be used for model training; if the training requirements indicate that the model needs to have high-accuracy prediction capabilities and high prediction efficiency after training, then the GBR algorithm can be used to train the network model.

[0082] According to the target algorithm, the computer device can train the network model using hardware indicator data and reference power consumption data of the first device under the target load state to obtain a data processing model that matches the training requirements. For example, the target algorithm is the GBR algorithm, a regression algorithm based on ensemble learning, part of the gradient boosting framework. It minimizes the loss function by progressively building multiple weak prediction models (usually decision trees) and combining them into a strong prediction model. The GBR algorithm can include the following two stages: ① Boosting: Iteratively training multiple models, each focusing on correcting the residuals (prediction errors) of the previous model. ② Gradient Descent: Optimizing the loss function using gradient descent to progressively reduce the prediction error. The GBR algorithm has the following characteristics: ① High accuracy: GBR can usually generate very accurate prediction models, especially performing well when dealing with nonlinear relationships. ② Flexibility: Supports multiple loss functions and is suitable for tasks such as regression and classification. ③ Interpretability: Although the model itself is relatively complex, it can provide a certain degree of interpretability through feature importance analysis. The embodiments of this application employ the GBR machine learning algorithm, which can be used to analyze the power consumption data of mobile devices and build a high-precision power consumption prediction model. Through GBR, the complex relationship between power consumption and the hardware and software behavior of the device can be captured, thereby achieving accurate prediction of future power consumption.

[0083] In conjunction with the content mentioned in the above embodiments, the following can be provided: Figure 4aThe diagram illustrates the model training process. On the platform side, for the training and maintenance of the main load network model, a load tuning project can be constructed. This project provides GUI-based load parameter setting and automated load setting adjustment. By running this project, various load parameter sets can be stably generated, resulting in a load set sequence. For each load parameter set in the load set sequence, based on the parameter configuration values, hardware indicator data for the configured load state can be collected in USB connection mode, and the overall power consumption (i.e., reference power consumption data) corresponding to the configured load state can be collected in non-USB connection mode. Through the correspondence of load fingerprints, a data set from hardware indicators to overall power consumption can be obtained, and based on this data set, the network model can be trained, tested, and optimized. Specifically, the data set can be split into a training set and a test set, and at least one machine learning algorithm can be selected as the target algorithm. Following this target algorithm, the network model is trained using the training set and optimized using the test set. In another embodiment, at least one trained network model can be trained based on the difference between reference power consumption data and predicted power consumption data of the first device under the target load state under each of the at least one machine learning algorithm. Different trained network models are learned under different machine learning algorithms, and different trained network models can serve different working scenarios and / or different types of devices.

[0084] In one embodiment, the M sets of mapping data can be standardized, for example, using a normalizer. The standardized M sets of mapping data are then split into training and testing sets. For example, 20% of the standardized M sets of mapping data is used as the testing set, and 80% as the training set. The training set is used to train the network model, and the testing set is used to test whether the trained network model meets deployment requirements. When training the model, the GBR algorithm provided by the sklearn library can be used for regression training. A comparison chart of predicted and true values ​​can be found [link to relevant documentation]. Figure 4b Without fine-tuning, the average error is approximately 171, R. 2 The value is approximately 0.9, indicating that the model performs quite well.

[0085] The trained network model is used to predict the power consumption data of the first device under any load condition. Power consumption data refers to the electrical energy consumed by a device during operation, which can be expressed in watts (W) or milliwatts (mW). Power consumption data is an important indicator for measuring the energy efficiency of a device. The first device can be used as the target object for power consumption prediction. Its hardware resources (including various hardware components) and software behavior (such as application operation and network communication) are the main factors affecting power consumption. Specifically, the factors affecting power consumption data include the following aspects: ① Hardware level: energy consumption of hardware components such as CPU, GPU, display, sensors, and communication modules. ② Software level: application running efficiency, background processes, network data transmission, etc. ③ Environmental level: signal strength, temperature, battery status, etc. Predicting the power consumption data of mobile devices through machine learning technology can support the optimization of mobile device energy efficiency and the extension of battery life. The trained network model can be deployed on a server and has low prediction overhead, which has been experimentally proven to be around 37.0 ms, in line with expectations.

[0086] The data processing method provided in this application can configure a first device to a target load state according to a preset target load parameter set, and collect hardware indicator data of the first device under the target load state in a first connection mode and reference power consumption data of the first device under the target load state in a second connection mode. In this way, the first device can be controlled to the same load state in different connection modes through the target load parameter set, and data under the same load state in different connection modes can be collected, satisfying the accuracy and completeness of data collection. A network model can be trained using the hardware indicator data and reference power consumption data. Specifically, the network model can be called to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state to obtain predicted power consumption data. The network model is then trained based on the difference between the predicted power consumption data and the reference power consumption data. The trained network model is used to perform power consumption prediction processing based on the hardware indicator data of the first device under any load state. By training a model capable of predicting device power consumption, intelligent power consumption prediction can be achieved, reducing the cost of acquiring power consumption data, and providing data support for optimizing device energy efficiency and extending battery life.

[0087] Please see Figure 5 This is a flowchart illustrating another data processing method provided in an exemplary embodiment of this application. This data processing method can be performed by a computer device (such as...). Figure 1 The data processing method may include the following: (the data processing system shown is executed by a computer device).

[0088] S501, configure the first device to simulate load state according to the simulated load parameter group.

[0089] The first device can be a first type of mobile device, which can be determined according to the type of operating system, such as an iOS device (i.e., a device with the iOS operating system). The simulated load state is different from the load state involved in training the network model. The trained network model can be provided to developers of mobile applications (i.e., applications running on mobile devices). During the application development phase, developers can set simulated load parameter groups through parametric engineering. The simulated load parameter groups can simulate the load state under real user operation scenarios of the application. Real user operation scenarios of the application include, but are not limited to: video playback, 3D rendering, multi-threaded computing, etc.

[0090] S502, in the first connection mode of the first device, hardware indicator data of the first device under simulated load conditions is collected. This first connection mode is, for example, a USB connection mode, where the first device can connect to a PC via a USB data cable. In this mode, the first device can collect all hardware indicator data, including at least one hardware indicator data point of the first device. Each hardware indicator data point corresponds to a specific hardware component of the first device. This complete set of hardware indicator data serves as model input, and the trained network model performs power consumption prediction processing to output predicted overall system power consumption data, thereby improving the efficiency of the power consumption optimization process.

[0091] S503, Obtain the target network model from at least one trained network model.

[0092] In one embodiment, each trained network model is trained using a corresponding machine learning algorithm based on the difference between reference power consumption data and predicted power consumption data of the first device under a target load state. Each trained network model is adapted to at least one of the following: work scenario, device attribute information, and application type; wherein, device attribute information includes at least one of: device type, device operating system type, and device operating system version. According to the function of the application, the application type includes, but is not limited to: game applications, shopping applications, office applications, etc. When a computer device obtains a target network model from at least one trained network model, it can: determine the device environment information of the first device, which includes at least one of the following: work scenario, device attribute information, and the type of application being run; and, based on the device environment information of the first device, obtain a target network model adapted to the device environment information from at least one trained network model. The device environment information may include internal environment information and external environment information. Internal environment information may include, for example, device attribute information, and external environment information may include the work scenario and the type of application being run. By adapting to the device environment information of the first device, a more suitable trained network model can be selected to meet the corresponding business requirements.

[0093] S504 calls the target network model and performs power consumption prediction based on the hardware indicator data of the first device to obtain the predicted power consumption data of the first device under simulated load conditions.

[0094] In the first connection mode of the first device, the hardware indicator data of the first device under simulated load is complete, and the target network model is also matched with the device environment information of the first device. By calling the target network model, the actual discharge power consumption of the first device under simulated load can be accurately predicted, thereby realizing the simulated power consumption test of the application on the mobile device.

[0095] In one embodiment, the simulated load state is the load state of the first device when the application is running on the first device. After obtaining the predicted power consumption data of the first device under the simulated load state, the computer device can further: obtain the power consumption evaluation standard corresponding to the application, which includes standard power consumption data adapted to the application's business; generate power consumption evaluation data according to the power consumption evaluation standard corresponding to the application and the predicted power consumption data of the first device under the simulated load state, which is used to indicate whether the predicted power consumption data of the first device under the simulated load state meets the power consumption evaluation standard corresponding to the application. Through the power consumption evaluation standard corresponding to the application, it is possible to assess whether the predicted power consumption data of the first device under the simulated load state meets the power consumption evaluation standard. If the predicted power consumption data of the first device under the simulated load state is lower than or equal to the standard power consumption data, then it can be considered that the predicted power consumption data of the first device under the simulated load state meets the power consumption evaluation standard; if the predicted power consumption data of the first device under the simulated load state is higher than the standard power consumption data, then it can be considered that the predicted power consumption data of the first device under the simulated load state does not meet the power consumption evaluation standard. The output of the power consumption evaluation data can provide developers with relevant data references, thereby assisting developers in optimizing the application.

[0096] In one embodiment, a computer device may, in response to an indicator adjustment instruction, adjust at least one hardware indicator data of a first device under simulated load conditions to obtain at least one adjusted hardware indicator data; and invoke a trained network model to predict power consumption based on the adjusted at least one hardware indicator data to obtain predicted adjusted power consumption data of the first device. The adjustment of the hardware indicator data may include adjusting some or all of the hardware indicator data in the at least one hardware indicator data of the first device under simulated load conditions. The predicted adjusted power consumption data may be greater than, equal to, or less than the predicted power consumption data of the first device under simulated load conditions. Based on the relationship between the predicted adjusted power consumption data and the predicted power consumption data of the first device under simulated load conditions, there are two possible processing methods: ① If the predicted adjusted power consumption data of the first device is less than the predicted power consumption data of the first device under simulated load conditions, then a power optimization direction is output based on the predicted adjusted power consumption data. The power optimization direction is related to the hardware component corresponding to the adjusted hardware indicator data. For example, if the adjusted hardware indicator data includes the hardware indicator data of the CPU component, then the power optimization direction may include optimizing the CPU; if the adjusted hardware indicator data includes the hardware indicator data of the GPU component, then the power optimization direction may include optimizing the GPU. As can be seen, in some scenarios, developers can adjust the input hardware performance data and further output the corresponding power consumption data through the trained network model, thereby providing a more precise direction for the power consumption optimization process. ② If the predicted adjusted power consumption data of the first device is greater than or equal to the predicted power consumption data of the first device under simulated load conditions, then at least one hardware performance data of the first device under simulated load conditions is readjusted. That is, if the power consumption data increases under the adjusted hardware performance data, it indicates that the adjustment object or direction is inappropriate. Other unadjusted hardware performance data can be adjusted, and the trained network model can be used to re-predict the adjusted overall power consumption. Then, based on whether the predicted adjusted power consumption is lower than the predicted power consumption data, the direction of power consumption optimization or the hardware performance data can be determined.

[0097] In one embodiment, the predicted power consumption data of the first device under simulated load conditions can be the sum of the component power consumption data of at least one hardware component of the first device under simulated load conditions. The computer device can: acquire the component power consumption data of at least one hardware component of the first device under simulated load conditions; determine the power consumption contribution ratio of at least one hardware component in the first device based on the component power consumption data of at least one hardware component of the first device under simulated load conditions and the predicted power consumption data of the first device under simulated load conditions; and generate an optimization priority for at least one hardware component in the first device based on the power consumption contribution ratio. The power consumption contribution ratio and optimization priority are positively correlated, meaning that a hardware component with a higher power consumption contribution ratio has a higher optimization priority, and a hardware component with a lower power consumption contribution ratio has a lower optimization priority. For any one of the at least one hardware component, when determining the power consumption contribution ratio of that hardware component, the ratio of the component power consumption data of that hardware component to the predicted power consumption data of the first device under simulated load conditions can be determined as the power consumption contribution ratio of that hardware component. The power consumption contribution ratio (also called power consumption contribution degree) of any hardware component is used to indicate the proportion of the component power consumption data of the corresponding hardware component in the predicted power consumption data of the first device under simulated load conditions. Therefore, the larger the power consumption data of a hardware component, the greater its contribution to power consumption. Based on the relationship between power consumption ratio and optimization priority, the optimization priority of that hardware component is also higher. Optimization priority indicates the order in which hardware components are optimized; hardware components with higher optimization priority are optimized first. It is evident that by quantitatively analyzing the power consumption contribution of each hardware component, we can provide clear priority guidance for hardware component optimization and give a direction for power consumption optimization.

[0098] Based on the content described in the above embodiments, the following can be provided: Figure 6a The flowchart shown illustrates the model application process. For example, before using the trained network model, the developer can launch the application on the mobile device to place it under appropriate load. The device is then connected to a PC via USB to collect relevant hardware metrics data, which is input into the trained network model. The trained network model processes this data and outputs a predicted total power consumption, which is then used to evaluate the power consumption. Additionally, at least one hardware metric can be adjusted. The adjusted and unadjusted hardware metric data are input into the trained network model, which outputs a predicted adjusted total power consumption, thus providing a direction for power optimization. If the predicted adjusted total power consumption is greater than the predicted total power consumption, the hardware metric data can be readjusted.

[0099] In one embodiment, at least one test load parameter can be configured for the target hardware component based on the characteristics of the application served by the target hardware component. The target hardware component can be any hardware component, such as the GPU in a chip. The test load parameter can be applied to specific hardware modules within the target hardware component, such as GPU shader units. By configuring at least one test load parameter for the target hardware component, the power consumption of the target hardware component under different loads can be tested and its power consumption characteristics analyzed, thereby enabling optimization of the target hardware component. The computer device can iterate through at least one test load parameter, configure the target hardware component into a test load state according to the iterated test load parameter, collect hardware indicator data of the target hardware component under the test load state, and then call the trained network model to perform power consumption prediction processing based on the hardware indicator data to obtain the component power consumption data of the target hardware component under the test load state. After the at least one test load parameter has been iterated, the component power consumption data of the target hardware component under at least one test load state can be obtained, and then the target hardware component can be optimized based on the component power consumption data of the target hardware component under at least one test load state. In one implementation, power consumption analysis can be performed on the target hardware component based on the component power consumption data under at least one test load state, and the target hardware component can be optimized based on the results of the power consumption analysis. The optimization process includes, but is not limited to: optimizing specific modules of the target hardware component (e.g., using more efficient shader units), optimizing the architecture of the target hardware component, and optimizing the voltage and frequency adjustment algorithm of the target hardware component.

[0100] The network model trained in this embodiment predicts the hardware performance data of the first device under corresponding load conditions, and can also provide data support for the algorithm optimization of the power management module, including: predicted power consumption data, hardware performance data, and load parameters. For example, the power management module can determine whether to reduce the frequency of the first device based on the predicted power consumption data and battery temperature data obtained under the configuration of corresponding load parameters, thereby controlling the battery temperature within a temperature threshold range.

[0101] In one embodiment, if the first device is a specific model, then based on the predicted power consumption data obtained by predicting the hardware performance data of the first device under simulated load conditions, it can be used to identify whether the first device exhibits abnormal power consumption phenomena. For example, an abnormal power consumption phenomenon might be a sudden drop in the energy efficiency ratio of a certain model of GPU under a specific rendering mode. In another embodiment, following the same process described above, a network model can be trained based on the hardware performance data of a second device under the same load conditions and reference power consumption data. The second device is a second type of mobile device. Using parameterized load tuning engineering, a standardized load test package is generated, and the energy efficiency performance of the application on both the first and second devices is evaluated, thereby testing the cross-platform compatibility of the application.

[0102] Based on the above Figure 2 and Figure 5 The embodiments shown can provide, for example Figure 6b The diagram illustrates model training and application. On the platform side, the network model can be trained and maintained. By constructing a load tuning project, a load group sequence can be automatically generated. For each load parameter group in the load group sequence, hardware indicator data can be collected in USB connection mode and power consumption data in non-USB connection mode, thereby training the network model. On the user side, the mobile device can connect to a PC via USB. The PC can interact with the platform side, collect relevant hardware indicator data, and call the trained network model to predict the overall power consumption and output a power consumption evaluation. If the user adjusts the collected hardware benchmark data, the trained network model predicts the adjusted overall power consumption and outputs power consumption optimization directions. The data processing method provided in this application overcomes the technical contradiction of existing tools being unable to balance data integrity and measurement accuracy. It achieves accurate reproduction and horizontal comparison of test scenarios through configurable load parameters, establishing a quantitative relationship model between hardware indicator data and power consumption data to reflect the hardware operating status, guiding mobile devices with clear optimization directions. Furthermore, the entire solution can be implemented based on a general interface, without relying on specific hardware probes or other operations.

[0103] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a data processing device based on a data processing model provided in an exemplary embodiment of this application. The data processing device can be installed in a computer device that executes the embodiments of this application. Figure 7 The data processing device 700 shown may be a computer program (including program code) running on a computer device, and the data processing device 700 may be used to execute... Figure 2 and Figure 5 Some or all of the steps in the method embodiments shown. Please refer to [link / reference]. Figure 7The data processing device 700 may include the following units:

[0104] Configuration unit 701 is used to configure the first device to the corresponding target load state according to a preset target load parameter group;

[0105] The acquisition unit 702 is used to acquire hardware indicator data of the first device under a target load state in a first connection mode of the first device; and to acquire reference power consumption data of the first device under a target load state in a second connection mode of the first device.

[0106] The training unit 703 is used to call the network model to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state, so as to obtain the predicted power consumption data of the first device under the target load state; and to train the network model according to the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state. The trained network model is used to predict the power consumption data of the first device under any load state.

[0107] In one embodiment, the configuration unit 701 is further configured to: pre-set a load group sequence according to the working scenario requirements of the first device; the load group sequence includes N load parameter groups, each load parameter group includes parameter configuration data of at least one hardware component, each load parameter group is used to configure a corresponding load state, and the target load parameter group is any one of the load group sequences; N is a positive integer; wherein, the hardware component includes at least one of the following: CPU, GPU, GPS, display component, communication component, storage component, and sensing component.

[0108] In one embodiment, the configuration unit 701 is specifically used to: determine load configuration information according to the working scenario requirements of the first device, wherein the load configuration information includes at least one of the following: parameter type, parameter boundary value, parameter initial value, parameter adjustment direction, parameter adjustment step size, and maintenance duration; and set N sets of load parameter groups according to the load configuration information to obtain a load group sequence.

[0109] In one embodiment, the hardware metric data and reference power consumption data under the target load state belong to a set of training data in the training set of the network model. The training set contains M sets of training data, each set of training data including hardware metric data and reference power consumption data under one load state. One load state is configured by a set of load parameter groups corresponding to the load group sequence. The load group sequence includes N sets of load parameter groups. The acquisition unit 702 is used to: acquire N sets of mapping data according to the N load states configured by the N sets of load parameter groups in the load group sequence. Each set of mapping data includes hardware metric data and reference power consumption data under one load state, where N is a positive integer. The processing unit 704 is used to: perform data cleaning processing on the N sets of mapping data to obtain M sets of mapping data, where M is a positive integer and M is less than or equal to N; and add the M sets of mapping data as M sets of training data to the training set.

[0110] In one embodiment, the processing unit 704 is configured to: construct a power consumption data curve based on reference power consumption data in N sets of mapping data, the power consumption data curve being used to describe the trend of reference power consumption data under N load conditions; if the trend indicated by the power consumption data curve is abnormal, determine a data abnormality segmentation point based on the power consumption data curve, the data abnormality segmentation point being used to separate normal mapping data and abnormal mapping data in the N sets of mapping data; determine at least one set of abnormal mapping data from the N sets of mapping data based on the data abnormality segmentation point, and remove at least one set of abnormal mapping data from the N sets of mapping data to obtain M sets of mapping data.

[0111] In one embodiment, the hardware performance data and power consumption data under each load state carry a corresponding load fingerprint. The load fingerprint is used to indicate a set of load parameters corresponding to the corresponding load state. Each set of mapping data is obtained by establishing a mapping relationship between the hardware performance data and the reference power consumption data through the load fingerprint.

[0112] In one embodiment, the first device refers to a first type of device. The configuration unit 701 is further configured to: configure the first device to a simulated load state according to the simulated load parameter group; the acquisition unit 702 is configured to collect hardware indicator data of the first device under the simulated load state in the first connection mode of the first device; obtain a target network model from at least one trained network model; and the processing unit 704 is configured to call the target network model, perform power consumption prediction based on the hardware indicator data of the first device, and obtain the predicted power consumption data of the first device under the simulated load state.

[0113] In one embodiment, each trained network model is trained using a corresponding machine learning algorithm based on the difference between reference power consumption data and predicted power consumption data of the first device under a target load state; each trained network model is adapted to at least one of the following: working scenario, device attribute information, and application type; wherein, the device attribute information includes at least one of the following: device type, device operating system type, and device operating system version.

[0114] In one embodiment, the acquisition unit 702 is specifically used to: determine the device environment information of the first device, the device environment information including at least one of the following: working scenario, device attribute information and the type of application being run; and, based on the device environment information of the first device, acquire a target network model that is adapted to the device environment information from at least one trained network model.

[0115] In one embodiment, the simulated load state is used to simulate the load state of an application running on a first device. The acquisition unit 702 is used to: acquire the power consumption evaluation standard corresponding to the application, the power consumption evaluation standard including standard power consumption data adapted to the application's services; and the processing unit 704 is used to generate power consumption evaluation data according to the power consumption evaluation standard corresponding to the application and the predicted power consumption data of the first device under the simulated load state, the power consumption evaluation data being used to indicate whether the predicted power consumption data of the first device under the simulated load state conforms to the power consumption evaluation standard corresponding to the application.

[0116] In one embodiment, the adjustment unit 705 is configured to: adjust at least one hardware indicator data of the first device under simulated load conditions to obtain at least one adjusted hardware indicator data; the processing unit 704 is configured to call the trained network model, perform power consumption prediction based on the at least one adjusted hardware indicator data, and obtain predicted adjusted power consumption data of the first device; the output unit 706 is configured to: if the predicted adjusted power consumption data of the first device is less than the predicted power consumption data of the first device under simulated load conditions, output a power consumption optimization direction based on the predicted adjusted power consumption data, wherein the power consumption optimization direction is related to the hardware component corresponding to the adjusted hardware indicator data; and the adjustment unit 705 is configured to: if the predicted adjusted power consumption data of the first device is greater than or equal to the predicted power consumption data of the first device, readjust at least one hardware indicator data of the first device under simulated load conditions.

[0117] In one embodiment, the predicted power consumption data of the first device under simulated load is the sum of the component power consumption data of at least one hardware component of the first device under simulated load; the acquisition unit 702 is configured to: acquire the component power consumption data of at least one hardware component of the first device under simulated load; the processing unit 704 is configured to: determine the power consumption contribution ratio of at least one hardware component in the first device based on the component power consumption data of at least one hardware component of the first device under simulated load and the predicted power consumption data of the first device under simulated load; and generate an optimization priority for at least one hardware component in the first device based on the power consumption contribution ratio; wherein, the power consumption contribution ratio and the optimization priority are positively correlated, meaning that the higher the power consumption contribution ratio of a hardware component, the higher the optimization priority, and the lower the power consumption contribution ratio of a hardware component, the lower the optimization priority.

[0118] In one embodiment, the configuration unit 701 is configured to: configure at least one test load parameter for the target hardware component according to the characteristics of the application served by the target hardware component; the processing unit 704 is configured to: traverse at least one test load parameter, configure the target hardware component into a test load state according to the traversed test load parameter, and collect hardware indicator data of the target hardware component in the test load state; call the trained network model, perform power consumption prediction processing according to the hardware indicator data, and obtain component power consumption data of the target hardware component in the test load state; after the at least one test load parameter traversal is completed, optimize the target hardware component according to the component power consumption data of the target hardware component in at least one test load state.

[0119] It is understood that the specific functions of each unit of the data processing apparatus described in the embodiments of this application can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here. In addition, the beneficial effects of using the same method will not be repeated here either. The terms "module" or "unit" refer to a computer program or part of a computer program with a predetermined function, which works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially by using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functions of that module or unit.

[0120] An exemplary embodiment of this application also provides a structural schematic diagram of a computer device, which can be found in [reference needed]. Figure 8The computer device may include a processor 801, an input device 802, an output device 803, and a memory 804. The processor 801, input device 802, output device 803, and memory 804 are connected via a bus. The memory 804 stores a computer-readable storage medium, including a computer program, and the processor 801 executes the computer program stored in the memory 804.

[0121] In one embodiment, the processor 801 executes the following operations by running a computer program in the memory 804: configuring the first device to a corresponding target load state according to a preset target load parameter group; collecting hardware indicator data of the first device under the target load state in a first connection mode of the first device; collecting reference power consumption data of the first device under the target load state in a second connection mode of the first device; calling a network model to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state to obtain predicted power consumption data of the first device under the target load state; training a network model based on the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state, and using the trained network model to predict the power consumption data of the first device under any load state.

[0122] In one embodiment, the processor 801 is configured to: pre-set a load group sequence according to the working scenario requirements of the first device; the load group sequence includes N load parameter groups, each load parameter group includes parameter configuration data of at least one hardware component, each load parameter group is used to configure a corresponding load state, and the target load parameter group is any one of the load group sequences; N is a positive integer; wherein, the hardware component includes at least one of the following: CPU, GPU, GPS, display component, communication component, storage component, and sensing component.

[0123] In one embodiment, the processor 801 is specifically configured to: determine load configuration information according to the working scenario requirements of the first device, wherein the load configuration information includes at least one of the following: parameter type, parameter boundary value, parameter initial value, parameter adjustment direction, parameter adjustment step size, and maintenance duration; and set N sets of load parameter groups according to the load configuration information to obtain a load group sequence.

[0124] In one embodiment, the hardware metric data and reference power consumption data under the target load state belong to a set of training data in the training set of the network model. The training set contains M sets of training data, each set of training data including hardware metric data and reference power consumption data under one load state. One load state is configured by a set of load parameter groups corresponding to the load group sequence, and the load group sequence includes N sets of load parameter groups. The processor 801 is configured to: obtain N sets of mapping data according to the N load states configured by the N sets of load parameter groups in the load group sequence, each set of mapping data including hardware metric data and reference power consumption data under one load state, where N is a positive integer; perform data cleaning processing on the N sets of mapping data to obtain M sets of mapping data, where M is a positive integer and M is less than or equal to N; and add the M sets of mapping data as M sets of training data to the training set.

[0125] In one embodiment, the processor 801 is specifically configured to: construct a power consumption data curve based on reference power consumption data in N sets of mapping data, the power consumption data curve being used to describe the trend of reference power consumption data under N load conditions; if the trend indicated by the power consumption data curve is abnormal, determine a data abnormality segmentation point based on the power consumption data curve, the data abnormality segmentation point being used to separate normal mapping data and abnormal mapping data in the N sets of mapping data; determine at least one set of abnormal mapping data from the N sets of mapping data based on the data abnormality segmentation point, and remove at least one set of abnormal mapping data from the N sets of mapping data to obtain M sets of mapping data.

[0126] In one embodiment, the hardware performance data and power consumption data under each load state carry a corresponding load fingerprint. The load fingerprint is used to indicate a set of load parameters corresponding to the corresponding load state. Each set of mapping data is obtained by establishing a mapping relationship between the hardware performance data and the reference power consumption data through the load fingerprint.

[0127] In one embodiment, the first device refers to a first type of device, and the processor 801 is configured to: configure the first device to a simulated load state according to the simulated load parameter group; collect hardware indicator data of the first device under the simulated load state in a first connection mode of the first device; obtain a target network model from at least one trained network model; call the target network model to perform power consumption prediction based on the hardware indicator data of the first device, and obtain predicted power consumption data of the first device under the simulated load state.

[0128] In one embodiment, each trained network model is trained using a corresponding machine learning algorithm based on the difference between reference power consumption data and predicted power consumption data of the first device under a target load state; each trained network model is adapted to at least one of the following: working scenario, device attribute information, and application type; wherein, the device attribute information includes at least one of the following: device type, device operating system type, and device operating system version.

[0129] In one embodiment, the processor 801 is specifically configured to: determine device environment information of a first device, the device environment information including at least one of the following: working scenario, device attribute information, and the type of application being run; and, based on the device environment information of the first device, obtain a target network model adapted to the device environment information from at least one trained network model.

[0130] In one embodiment, the simulated load state is used to simulate the load state of an application running on a first device. The processor 801 is used to: obtain the power consumption evaluation standard corresponding to the application, the power consumption evaluation standard including standard power consumption data adapted to the application's services; generate power consumption evaluation data according to the power consumption evaluation standard corresponding to the application and the predicted power consumption data of the first device under the simulated load state, the power consumption evaluation data being used to indicate whether the predicted power consumption data of the first device under the simulated load state conforms to the power consumption evaluation standard corresponding to the application.

[0131] In one embodiment, the processor 801 is configured to: adjust at least one hardware indicator data of the first device under simulated load conditions to obtain at least one adjusted hardware indicator data; call a trained network model to predict power consumption based on the at least one adjusted hardware indicator data to obtain predicted adjusted power consumption data of the first device; if the predicted adjusted power consumption data of the first device is less than the predicted power consumption data of the first device under simulated load conditions, output a power optimization direction based on the predicted adjusted power consumption data, wherein the power optimization direction is related to the hardware component corresponding to the adjusted hardware indicator data; if the predicted adjusted power consumption data of the first device is greater than or equal to the predicted power consumption data of the first device, readjust at least one hardware indicator data of the first device under simulated load conditions.

[0132] In one embodiment, the predicted power consumption data of the first device under simulated load is the sum of the component power consumption data of at least one hardware component of the first device under simulated load; the processor 801 is configured to: acquire the component power consumption data of at least one hardware component of the first device under simulated load; determine the power consumption contribution ratio of at least one hardware component in the first device based on the component power consumption data of at least one hardware component of the first device under simulated load and the predicted power consumption data of the first device under simulated load; and generate an optimization priority for at least one hardware component in the first device based on the power consumption contribution ratio; wherein, the power consumption contribution ratio and the optimization priority are positively correlated, meaning that the higher the power consumption contribution ratio of a hardware component, the higher the optimization priority, and the lower the power consumption contribution ratio of a hardware component, the lower the optimization priority.

[0133] In one embodiment, the processor 801 is configured to: configure at least one test load parameter for the target hardware component based on the characteristics of the application served by the target hardware component; traverse the at least one test load parameter, configure the target hardware component into a test load state according to the traversed test load parameter, and collect hardware indicator data of the target hardware component in the test load state; call the trained network model, perform power consumption prediction processing based on the hardware indicator data, and obtain component power consumption data of the target hardware component in the test load state; and after the at least one test load parameter traversal is completed, optimize the target hardware component based on the component power consumption data of the target hardware component in the at least one test load state.

[0134] It should be understood that the computer device described in the embodiments of this application can execute the data processing method described in the corresponding embodiments above, and can also execute the data processing device described in the corresponding embodiments above, which will not be repeated here. Furthermore, the beneficial effects of using the same method will not be repeated here either. In addition, it should be noted that the embodiments of this application also provide a computer-readable storage medium, which stores a computer program, and the computer program includes program instructions. When the processor executes the above program instructions, it can execute the data processing method described above. Figure 2 , Figure 5 The methods described in the corresponding embodiments are therefore not repeated here.

[0135] According to one aspect of this application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, enabling the computer device to perform the aforementioned... Figure 2 , Figure 5 The methods described in the corresponding embodiments are therefore not repeated here.

[0136] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The computer-readable storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0137] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art will understand that all or part of the processes for implementing the above embodiments and equivalent variations made in accordance with the claims of this application are still within the scope of this application.

Claims

1. A data processing method, characterized in that, The method includes: Configure the first device to the corresponding target load state according to the preset target load parameter group; In the first connection mode of the first device, hardware indicator data of the first device under the target load state are collected; in the second connection mode of the first device, reference power consumption data of the first device under the target load state are collected. The network model is invoked to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state, so as to obtain the predicted power consumption data of the first device under the target load state. The network model is trained based on the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state. The trained network model is used to predict the power consumption data of the first device under any load state.

2. The method as described in claim 1, characterized in that, The method further includes: Based on the working scenario requirements of the first device, a load group sequence is pre-set; The load group sequence includes N load parameter groups, each load parameter group includes parameter configuration data of at least one hardware component, and each load parameter group is used to configure a corresponding load state. The target load parameter group is any one of the load group sequences; N is a positive integer; wherein, the hardware component includes at least one of the following: CPU, GPU, GPS, display component, communication component, storage component, and sensing component.

3. The method as described in claim 2, characterized in that, The step of pre-setting a load group sequence according to the working scenario requirements of the first device includes: Based on the working scenario requirements of the first device, the load configuration information is determined, which includes at least one of the following: parameter type, parameter boundary value, parameter initial value, parameter adjustment direction, parameter adjustment step size, and maintenance duration; Based on the load configuration information, N groups of load parameters are set to obtain a load group sequence.

4. The method as described in claim 1, characterized in that, The hardware metric data and reference power consumption data under the target load state belong to a set of training data in the training set of the network model. The training set contains M sets of training data, each set of training data including hardware metric data and reference power consumption data under one load state. One load state is configured by a set of load parameter groups corresponding to a load group sequence, and the load group sequence includes N sets of load parameter groups. The method further includes: Based on the N load parameter groups configured in the load group sequence, N load states are obtained, and N sets of mapping data are acquired. Each set of mapping data includes hardware indicator data and reference power consumption data under a load state, where N is a positive integer. The N sets of mapping data are cleaned to obtain M sets of mapping data, where M is a positive integer and M is less than or equal to N; The M sets of mapping data are added to the training set as M sets of training data.

5. The method as described in claim 4, characterized in that, The step of cleaning the N sets of mapping data to obtain M sets of mapping data includes: A power consumption data curve is constructed based on the reference power consumption data in the N sets of mapping data. The power consumption data curve is used to describe the trend of the reference power consumption data under N load conditions. If the trend indicated by the power consumption data curve is abnormal, then the abnormal data segmentation point is determined according to the power consumption data curve. The abnormal data segmentation point is used to separate the normal mapping data and abnormal mapping data in the N sets of mapping data. Based on the data anomaly segmentation points, at least one set of abnormal mapping data is determined from the N sets of mapping data, and at least one set of abnormal mapping data in the N sets of mapping data is removed to obtain M sets of mapping data.

6. The method as described in claim 4, characterized in that, The hardware performance data and power consumption data under each load condition carry a corresponding load fingerprint. The load fingerprint is used to indicate a set of load parameters corresponding to the corresponding load condition. Each set of mapping data is obtained by establishing a mapping relationship between the hardware performance data and the reference power consumption data through the load fingerprint.

7. The method as described in claim 1, characterized in that, The first device refers to a device of the first type, and the method further includes: Configure the first device to simulate a load state according to the simulated load parameter group; In the first connection mode of the first device, hardware indicator data of the first device under the simulated load state are collected; Obtain the target network model from at least one trained network model; The target network model is invoked, and power consumption prediction is performed based on the hardware indicator data of the first device to obtain the predicted power consumption data of the first device under the simulated load state.

8. The method as described in claim 1, characterized in that, Each trained network model is trained using a corresponding machine learning algorithm based on the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state. Each trained network model is adapted to at least one of the following: work scenario, device attribute information, and application type; wherein the device attribute information includes at least one of the following: device type, device operating system type, and device operating system version.

9. The method as described in claim 7, characterized in that, The step of obtaining the target network model from at least one trained network model includes: The device environment information of the first device is determined, and the device environment information includes at least one of the following: working scenario, device attribute information, and the type of application being run; Based on the device environment information of the first device, a target network model that is adapted to the device environment information is obtained from at least one trained network model.

10. The method as described in claim 7, characterized in that, The simulated load state is used to simulate the load state of the application running on the first device, and the method further includes: Obtain the power consumption evaluation standard corresponding to the application, wherein the power consumption evaluation standard includes standard power consumption data adapted to the services of the application; Power consumption evaluation data is generated according to the power consumption evaluation standard corresponding to the application and the predicted power consumption data of the first device under the simulated load state. The power consumption evaluation data is used to indicate whether the predicted power consumption data of the first device under the simulated load state conforms to the power consumption evaluation standard corresponding to the application.

11. The method as described in claim 7, characterized in that, The method further includes: At least one hardware indicator data of the first device under the simulated load state is adjusted to obtain at least one adjusted hardware indicator data. The trained network model is invoked to predict power consumption based on at least one adjusted hardware metric, thereby obtaining the predicted adjusted power consumption data of the first device. If the predicted power consumption data of the first device is less than the predicted power consumption data of the first device under the simulated load state, then the power consumption optimization direction is output according to the predicted power consumption data. The power consumption optimization direction is related to the hardware component corresponding to the hardware indicator data being adjusted. If the predicted power consumption data of the first device is greater than or equal to the predicted power consumption data of the first device, then at least one hardware indicator data of the first device under the simulated load state is readjusted.

12. The method according to any one of claims 7-11, characterized in that, The predicted power consumption data of the first device under the simulated load state is the sum of the component power consumption data of at least one hardware component of the first device under the simulated load state; the method further includes: Obtain component power consumption data of at least one hardware component of the first device under the simulated load state; Based on the component power consumption data of at least one hardware component of the first device under the simulated load state and the predicted power consumption data of the first device under the simulated load state, the power consumption contribution ratio of at least one hardware component in the first device is determined. An optimization priority for at least one hardware component in the first device is generated based on the power consumption contribution ratio; wherein the power consumption contribution ratio and the optimization priority are positively correlated, and the positive correlation means that the hardware component with the higher power consumption contribution ratio has the higher optimization priority, and the hardware component with the lower power consumption contribution ratio has the lower optimization priority.

13. The method as described in claim 1, characterized in that, The method further includes: Configure at least one test load parameter for the target hardware component based on the characteristics of the application served by the target hardware component; The system iterates through at least one test load parameter, configures the target hardware component into a test load state according to the iterated test load parameter, and collects hardware indicator data of the target hardware component in the test load state. The trained network model is invoked, and power consumption prediction processing is performed based on the hardware indicator data to obtain the component power consumption data of the target hardware component under the test load state. After the at least one test load parameter has been traversed, the target hardware component is optimized based on the component power consumption data of the target hardware component under at least one test load state.

14. A data processing apparatus, characterized in that, The device includes: The configuration unit is used to configure the first device to the corresponding target load state according to the preset target load parameter group; The acquisition unit is configured to acquire hardware indicator data of the first device under the target load state in a first connection mode of the first device; and acquire reference power consumption data of the first device under the target load state in a second connection mode of the first device. The training unit is used to call the network model to perform power consumption prediction processing based on the hardware indicator data of the first device under the target load state, so as to obtain the predicted power consumption data of the first device under the target load state. The training unit is further configured to train the network model based on the difference between the reference power consumption data and the predicted power consumption data of the first device under the target load state, and the trained network model is used to predict the power consumption data of the first device under any load state.

15. A computer device, characterized in that, The computer device includes: A processor is used to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, performs the data processing method as described in any one of claims 1-13.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the data processing method as described in any one of claims 1-13.

17. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which are executed by a processor to implement the data processing method as described in any one of claims 1-13.