WO2020042112A1 - 一种终端对ai任务支持能力的评测方法及终端 - Google Patents

一种终端对ai任务支持能力的评测方法及终端 Download PDF

Info

Publication number
WO2020042112A1
WO2020042112A1 PCT/CN2018/103341 CN2018103341W WO2020042112A1 WO 2020042112 A1 WO2020042112 A1 WO 2020042112A1 CN 2018103341 W CN2018103341 W CN 2018103341W WO 2020042112 A1 WO2020042112 A1 WO 2020042112A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
value
model
time
artificial intelligence
Prior art date
Application number
PCT/CN2018/103341
Other languages
English (en)
French (fr)
Inventor
刘默翰
周力
隋志成
蒋洪睿
俞清华
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/103341 priority Critical patent/WO2020042112A1/zh
Priority to CN201880093501.5A priority patent/CN112204532A/zh
Publication of WO2020042112A1 publication Critical patent/WO2020042112A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method and terminal for evaluating a terminal's ability to support AI tasks.
  • AI Artificial Intelligence
  • AI technology is widely used in terminals, so that terminals can perform many AI tasks, such as AI camera, AI beauty, AI voice assistant, etc.
  • AI tasks greatly improve the user experience. Therefore, the processing capabilities of the terminal's AI tasks have gradually become the focus of user attention.
  • MLPerf solution multiple operating platforms are integrated on the server to provide multiple open source data sources.
  • the server uses these open source data sources to run AI models on these multiple operating platforms, focusing on evaluating the speed of the AI model and the accuracy of the AI model (such as the accuracy of the prediction results of the AI model).
  • the OVIC solution also focuses on evaluating the running speed of the AI model.
  • the method and terminal for evaluating the support ability of the terminal for AI tasks provided by the present application can evaluate the terminal's ability to support AI tasks by monitoring the consumption of terminal resources when the terminal runs an AI model.
  • an evaluation method provided in this application includes:
  • the terminal displays a first interface, the first interface includes a first button; the terminal detects a first operation of the user by the first button, the terminal runs a first artificial intelligence model; the terminal displays a second interface, and the second interface includes first information; One piece of information is determined by the terminal according to the first duration when the terminal runs the first artificial intelligence model and the first power consumption when the terminal runs the first artificial intelligence model.
  • the first interface may be the main interface of the AI evaluation application, the first button may be a button to start a test, and the first operation may be a user's operation to start a test, such as clicking.
  • the first interface may also be the desktop of the terminal, the first button may also be the icon of the AI evaluation application, and the first operation may also be a user operation on the icon of the AI evaluation application, such as clicking.
  • the first information can be used to characterize the terminal's ability to support AI tasks.
  • the first information includes the first duration and the first power consumption. The longer the first duration, the greater the first power consumption, indicating that the terminal has The weaker the ability to support AI tasks.
  • the first information may be a score determined according to the first duration and the first power consumption. The larger the score, the stronger the terminal's ability to support AI tasks.
  • the first AI model in the AI evaluation application is a fixed model, so other terminals can obtain their own resource consumption when running the AI evaluation application. Due to the different hardware configurations of different terminals, even if the same AI model is running, different terminals may call different hardware or different configurations of hardware, which will cause the consumption of these different terminal resources to be different, which will cause different total scores for different terminals. . Therefore, the total score also reflects the strength of different terminals' ability to support AI tasks.
  • the method further includes: obtaining, by the terminal, a first time, a second time, a first power value, and a second power value; wherein the first time is a start time when the terminal runs the first artificial intelligence model; The first power value is the power value of the terminal at the first time; the second time is the end time when the terminal runs the first artificial intelligence model; the second power value is the power value of the terminal at the second time; the terminal determines the second time and the first The time difference is the first duration, and the first power value and the second power value are determined to be the first power consumption.
  • the method further includes: obtaining, by the terminal, the first CPU occupancy value of the central processing unit of the terminal and the second CPU occupancy value of the terminal; wherein the first CPU occupancy value of the terminal starts the first manual operation of the terminal.
  • the CPU usage value of the terminal in the intelligent model; the second CPU usage value of the terminal is the maximum value of the CPU usage value of the terminal during the terminal running the first artificial intelligence model; the terminal uses the first duration, the first power consumption, and the terminal ’s
  • the difference between the second CPU occupancy value and the first CPU occupancy value of the terminal determines the first information.
  • the first information may be used to characterize the terminal's ability to support AI tasks.
  • the first information may further include a difference between the second CPU occupancy value of the terminal and the first CPU occupancy value of the terminal. The larger the difference, It shows that the terminal's ability to support AI tasks is weaker.
  • the first information may be a score determined according to the first duration, the first power consumption, and the difference between the second CPU occupancy value of the terminal and the first CPU occupancy value of the terminal. The stronger the support for AI tasks.
  • the method further includes: obtaining, by the terminal, the first memory occupancy value of the terminal and the second memory occupancy value of the terminal; wherein the first memory occupancy value of the terminal is when the terminal starts running the first artificial intelligence model.
  • the terminal's memory occupancy value; the terminal's second memory occupancy value is the maximum value of the terminal's memory occupancy value during the terminal running the first artificial intelligence model; the terminal is based on the first duration, the first power consumption, and the terminal's memory second
  • the difference between the occupied value and the first occupied value of the terminal's memory determines the first information.
  • the first information can be used to characterize the terminal's ability to support AI tasks.
  • the first information can also include the difference between the second memory occupancy of the terminal and the first memory occupancy of the terminal. The larger the difference, It shows that the terminal's ability to support AI tasks is weaker.
  • the first information may be a score determined according to the first duration, the first power consumption, and the difference between the second memory occupancy value of the terminal and the first memory occupancy value of the terminal. The stronger the support for AI tasks.
  • the first artificial intelligence model includes at least one of a training model and an inference model.
  • the training model includes at least one of a probability algorithm, a tree algorithm, a clustering algorithm, a convolutional neural network CNN algorithm, and a recursive neural network RNN algorithm;
  • the inference model includes a probability algorithm, a tree algorithm, and a clustering algorithm.
  • the second interface further includes second information, and the second information is a duration for the terminal to run any one or several at least one algorithm in the first artificial intelligence model.
  • the first AI model is an inference model.
  • the inference model includes a probability algorithm, a tree algorithm, a clustering algorithm, a CNN algorithm for a convolutional neural network, and an RNN algorithm for a recurrent neural network. Then, when the terminal runs the first AI model, the terminal reads the start time and end time of each algorithm in the first AI model, and the difference between the end time and start time of each algorithm is the duration of each algorithm.
  • probabilistic and tree algorithms can be used for personalized recommendation AI tasks (such as local application recommendation, today's headline news recommendation, etc.), and clustering algorithms can be used for user portrait AI tasks (such as identifying end-user income, Gender, age range, occupation, terminal habits, etc., summarize and describe a user), CNN models are mostly used for image-related AI services (such as beauty, face recognition, etc.), and RNN models are mostly related to speech semantics-related AI services (For example: speech recognition, AI translation, synthesized music, etc.). Therefore, the duration of the terminal running the probability algorithm and the tree algorithm may correspond to the duration of the terminal running the personalized recommendation type AI task.
  • the duration of the terminal running the clustering algorithm may correspond to the duration of the terminal running the user portrait.
  • the duration of the terminal running the CNN model may correspond to the duration of the terminal running image-related AI services.
  • the duration of the terminal running the RNN model may correspond to the duration of the terminal running the speech semantically related AI service.
  • the second interface further includes third information, where the third information is a power value of at least two times during the terminal running the first artificial intelligence model, a CPU usage value of at least two times, and at least two At least one of the memory usage values at the moment.
  • an evaluation method includes: in response to a user starting a test, the terminal reads a first time and a first power value, and the terminal runs a first artificial intelligence model; wherein the first time is the terminal The start time of running the first artificial intelligence model; the first power value is the power value of the terminal at the first time; after the terminal runs the first artificial intelligence model, the terminal reads the second time and the second power value; wherein, the second time End time for the terminal to run the first artificial intelligence model; the first power value is the power value of the terminal at the second time; the terminal determines that the difference between the second time and the first time is the first time the terminal runs the first artificial intelligence model For the duration, the terminal determines that the difference between the first power value and the second power value is the first power consumption of the terminal running the first artificial intelligence model; the terminal determines the terminal's AI for artificial intelligence according to the first time duration and the first power consumption. Support capabilities.
  • the method further includes: when the terminal reads the first time and the first power value, the terminal also reads the first CPU occupancy value of the central processing unit of the terminal; the first CPU occupancy value of the terminal The CPU usage value of the terminal at the first time; during the terminal running the first artificial intelligence model, the terminal reads the CPU usage value of the terminal at each time, and determines that the maximum value of the CPU usage value at each time is the terminal's The second CPU usage value.
  • the terminal determining the AI support capability of the terminal based on the first duration and the first power consumption specifically further includes: the terminal according to the first duration, the first power consumption, the second CPU occupancy value of the terminal, and the CPU power of the terminal.
  • a difference in occupancy values determines the terminal's AI support capabilities for artificial intelligence.
  • the method further includes: when the terminal reads the first time and the first power value, the terminal also reads the first memory occupancy value of the terminal; the first memory occupancy value of the terminal is at the first time.
  • the terminal determining the AI support capability of the terminal according to the first duration and the first power consumption specifically further includes: the terminal according to the first duration, the first power consumption, and the second memory occupation value of the terminal and the memory memory location of the terminal.
  • a difference in occupancy value determines the AI support capability of the terminal to artificial intelligence.
  • a terminal in a third aspect, includes: a processor and a display screen, the display screen being coupled to the processor; a display screen for displaying a first interface, the first interface including a first button; and a processor for responding to the detection
  • the first operation of the user on the first button runs the first artificial intelligence model; the display screen is used to display the second interface, and the second interface includes the first information; the first information is the first information of the terminal running the first artificial intelligence model according to the terminal.
  • a period of time and the first power consumption of the terminal running the first artificial intelligence model are determined.
  • the processor is configured to obtain a first time, a second time, a first power value, and a second power value; wherein the first time is a start time when the terminal runs the first artificial intelligence model; A power value is the power value of the terminal at the first time; a second time is the end time when the terminal runs the first artificial intelligence model; a second power value is the power value of the terminal at the second time; determine the second time and the first The time difference is the first duration, and the first power value and the second power value are determined to be the first power consumption.
  • the processor is further configured to obtain a first CPU occupancy value of the central processing unit of the terminal and a second CPU occupancy value of the terminal; wherein the first CPU occupancy value of the terminal starts the first manual operation of the terminal.
  • the CPU usage value of the terminal in the intelligent model; the second CPU usage value of the terminal is the maximum value of the CPU usage value of the terminal during the terminal running the first artificial intelligence model; according to the first duration, the first power consumption, and the CPU of the terminal.
  • the difference between the second occupied value and the first CPU occupied value of the terminal determines the first information.
  • the processor is further configured to obtain a first memory occupancy value of the terminal and a second memory occupancy value of the terminal; where the first memory occupancy value of the terminal is the terminal when the terminal starts running the first artificial intelligence The memory occupancy value of the terminal; the second memory occupancy value of the terminal is the maximum value of the memory occupancy value of the terminal during the terminal running the first artificial intelligence model; according to the first duration, the first power consumption, and the second memory occupancy value of the terminal The difference between the first occupancy value of the terminal and the memory determines the first information.
  • the first artificial intelligence model includes at least one of a training model and an inference model.
  • the training model includes any one or more of at least one of a probability algorithm, a tree algorithm, a clustering algorithm, a convolutional neural network CNN algorithm, and a recurrent neural network RNN algorithm;
  • the inference model includes a probability algorithm , Tree algorithm, clustering algorithm, convolutional neural network CNN algorithm and recurrent neural network RNN algorithm any one or any of at least one.
  • the second interface further includes second information, and the second information is a duration for the terminal to run any one or several at least one algorithm in the first artificial intelligence model.
  • the second interface further includes third information, where the third information is a power value of at least two times during the terminal running the first artificial intelligence model, a CPU usage value of at least two times, and at least two At least one of the memory usage values at the moment.
  • a terminal includes: a processor and a display screen, the display screen is coupled to the processor; the display screen is used to detect an operation that the user starts to test; and the processor is used to read the first time and the first power Value, and the terminal runs the first artificial intelligence model; wherein the first time is the start time when the terminal runs the first artificial intelligence model; the first power value is the power value of the terminal at the first time; the processor is also used for the terminal After running the first artificial intelligence model, read the second time and the second power value; where the second time is the end time when the terminal runs the first artificial intelligence model; the first power value is the power value of the terminal at the second time A processor, further configured to determine that the difference between the second time and the first time is the first time during which the terminal runs the first artificial intelligence model, and the terminal determines that the difference between the first power value and the second power value is the terminal running the first The first power consumption of the artificial intelligence model; the processor is further configured to determine the AI support capability of the terminal according to the first duration and the first
  • the processor is further configured to read the first CPU usage value of the central processing unit of the terminal when the terminal reads the first time and the first power value; the first CPU usage value of the terminal is The CPU usage value of the terminal at the first time; during the terminal running the first artificial intelligence model, read the CPU usage value of the terminal at each time, and determine the maximum value of the CPU usage value at each time as the CPU of the terminal A second occupation value; determining the AI support capability of the terminal according to the first duration, the first power consumption, and a difference between the second CPU occupation value of the terminal and the first CPU occupation value of the terminal.
  • the processor is further configured to: when the terminal reads the first time and the first power value, read the first memory occupation value of the terminal; the first memory occupation value of the terminal is at the first time.
  • a computer storage medium includes computer instructions, and when the computer instructions are run on a terminal, the terminal is caused to execute the method as described in the first aspect and any possible implementation manner thereof.
  • a computer storage medium includes computer instructions, and when the computer instructions are run on a terminal, the terminal is caused to execute the method as described in the second aspect and any possible implementation manner thereof.
  • a seventh aspect is a computer program product that, when the computer program product runs on a computer, causes the computer to perform the method as described in the first aspect and any one of its possible implementations.
  • An eighth aspect a computer program product, when the computer program product runs on a computer, causes the computer to perform the method described in the second aspect and any one of its possible implementations.
  • FIG. 1 is a first schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 2 is a second schematic structural diagram of a terminal according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an AI model in a terminal running an AI evaluation application according to an embodiment of the present application
  • FIG. 4 is a framework diagram of an AI evaluation application in a terminal according to an embodiment of the present application.
  • FIG. 5 is a schematic interface diagram of some terminals according to an embodiment of the present application.
  • FIG. 6 is a schematic interface diagram of still other terminals according to an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of an evaluation method according to an embodiment of the present application.
  • first and second are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise stated, the meaning of "a plurality" is two or more.
  • AI tasks When the terminal performs specific tasks, such tasks as AI technology are used, such as: AI camera, AI beauty, AI voice assistant, face recognition, etc.
  • AI technology such as: AI camera, AI beauty, AI voice assistant, face recognition, etc.
  • the terminal executes the task of AI photography, it can use AI technology to identify various tags and various scenes in real time, and adjust the parameters in a targeted manner to improve the photographing effect.
  • the terminal can also use AI technology to intelligently remind the user to adjust the angle of the terminal and how to compose the picture, so as to achieve better camera effects.
  • Non-AI tasks When the terminal performs specific tasks, these tasks do not use AI technology. For example: call, text message, reader, etc. Compared to AI tasks, the terminal has a smaller amount of computation when performing non-AI tasks.
  • AI model When a terminal executes an AI task, it usually needs to run the AI model corresponding to the AI task. For example, the following describes the AI model in conjunction with the process of executing AI tasks by the terminal.
  • the terminal can intelligently learn the features of dogs (ie, the training process) from a large number of pictures of dogs. Then, the terminal predicts whether the unknown picture is a picture of a dog according to the characteristics of the learned dog (that is, a prediction process).
  • X is the existing data for training (for example: a large number of pictures that have been marked as "dogs" or "cats").
  • Y is the label of the existing picture data (whether the picture is a cat or a dog).
  • W in the function is the weight and b is the bias.
  • the process by which the terminal calculates the tags corresponding to the new data is the process by which the terminal uses the model to predict the new data.
  • the technical solution provided in the embodiments of the present application can evaluate the strength of the terminal's ability to support AI tasks, so that users can fully understand the performance of the terminal.
  • the terminal can simultaneously monitor the terminal resource consumption during the execution of a specific AI model, such as: power consumption, CPU usage, memory (including ROM, RAM, etc.) usage, etc. .
  • a specific AI model such as: power consumption, CPU usage, memory (including ROM, RAM, etc.) usage, etc.
  • these different terminals may use the same data, execute the same AI model, and monitor each of the processes in which different terminals execute the same AI model. Terminal consumption. In this way, users can understand the strength of the terminal's ability to support AI tasks based on the monitoring results of a terminal.
  • the terminal in this application may be a mobile phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a smart watch, a netbook, a wearable electronic device, or an augmented reality technology ( Augmented Reality (AR) equipment, Virtual Reality (VR) equipment, in-vehicle equipment, smart cars, drones, smart speakers, robots, etc., this application does not specifically limit the specific form of the terminal.
  • AR Augmented Reality
  • VR Virtual Reality
  • in-vehicle equipment smart cars, drones, smart speakers, robots, etc.
  • FIG. 1 is a structural block diagram of a terminal 100 according to an embodiment of the present invention.
  • the terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a USB interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a radio frequency module 150, a communication module 160, and an audio module.
  • a processor 110 an external memory interface 120, an internal memory 121, a USB interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a radio frequency module 150, a communication module 160, and an audio module.
  • speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display 194, and SIM card interface 195 may be included in the terminal 100.
  • the sensor module can include pressure sensor 180A, gyroscope sensor 180B, barometric pressure sensor 180C, magnetic sensor 180D, acceleration sensor 180E, distance sensor 180F, proximity light sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, and ambient light sensor. 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not limit the terminal 100. It may include more or fewer parts than shown, or some parts may be combined, or some parts may be split, or different parts may be arranged.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image, signal processor, ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU) Wait.
  • AP application processor
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image, signal processor, ISP
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural network processing unit
  • different processing units may be independent devices or integrated in one or more processors.
  • the processor may be configured to start running the AI model in the AI evaluation application in response to detecting the operation that the user starts to test, and obtain the situation of the terminal resources when the terminal runs the AI model, such as the duration of running the AI model. , Power consumption, CPU usage, and memory usage. Further, based on the consumption of these resources, the terminal's ability to support AI tasks is determined.
  • the controller may be a decision maker that instructs the various components of the terminal 100 to coordinate work according to the instructions. It is the nerve center and command center of the terminal 100.
  • the controller generates operation control signals according to the instruction operation code and timing signals, and completes the control of fetching and executing the instructions.
  • the processor 110 may further include a memory for storing instructions and data.
  • the memory in the processor is a cache memory, which can store instructions or data that the processor has just used or recycled. If the processor needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, the processor's waiting time is reduced, and the efficiency of the system is improved.
  • the processor 110 may include an interface.
  • the interface may include an integrated circuit (inter-integrated circuit (I2C) interface, an integrated circuit (inter-integrated circuit, sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous) receiver / transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input / output (GPIO) interface, subscriber identity module (SIM) interface, and / Or universal serial bus (universal serial bus, USB) interface.
  • I2C integrated circuit
  • I2S integrated circuit
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input / output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor may include multiple sets of I2C buses.
  • the processor can be coupled with a touch sensor, a charger, a flash, a camera, etc. through different I2C bus interfaces.
  • the processor may couple the touch sensor through the I2C interface, so that the processor and the touch sensor communicate through the I2C bus interface to implement the touch function of the terminal 100.
  • the I2S interface can be used for audio communication.
  • the processor may include multiple sets of I2S buses.
  • the processor may be coupled to the audio module through an I2S bus to implement communication between the processor and the audio module.
  • the audio module can transmit audio signals to the communication module through the I2S interface, so as to implement the function of receiving calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing, and encoding analog signals.
  • the audio module and the communication module may be coupled through a PCM bus interface.
  • the audio module can also transmit audio signals to the communication module through the PCM interface, so as to implement the function of receiving calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication, and the sampling rates of the two interfaces are different.
  • the UART interface is a universal serial data bus for asynchronous communication. This bus is a two-way communication bus. It converts the data to be transferred between serial and parallel communications.
  • a UART interface is typically used to connect the processor and the communication module 160.
  • the processor communicates with the Bluetooth module through a UART interface to implement the Bluetooth function.
  • the audio module can transmit audio signals to the communication module through the UART interface, so as to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect processors with peripheral devices such as displays, cameras, etc.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like.
  • the processor and the camera communicate through a CSI interface to implement a shooting function of the terminal 100.
  • the processor and the display screen communicate through a DSI interface to implement a display function of the terminal 100.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor with a camera, a display screen, a communication module, an audio module, a sensor, and the like.
  • GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface can be used to connect a charger to charge the terminal 100, and can also be used to transfer data between the terminal 100 and peripheral devices. It can also be used to connect headphones and play audio through headphones. It can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic description, and does not constitute a limitation on the structure of the terminal 100.
  • the terminal 100 may use different interface connection modes or a combination of multiple interface connection modes in the embodiments of the present invention.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module may receive a charging input of a wired charger through a USB interface.
  • the charging management module may receive a wireless charging input through a wireless charging coil of the terminal 100. While the charging management module is charging the battery, it can also supply power to the terminal device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charge management module 140 and the processor 110.
  • the power management module receives inputs from the battery and / or charge management module, and supplies power to a processor, an internal memory, an external memory, a display screen, a camera, and a communication module.
  • the power management module can also be used to monitor battery capacity, battery cycle times, battery health (leakage, impedance) and other parameters.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charge management module may also be provided in the same device.
  • the wireless communication function of the terminal 100 may be implemented by the antenna module 1, the antenna module 2 radio frequency module 150, the communication module 160, a modem, and a baseband processor.
  • the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals.
  • Each antenna in the terminal 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, a cellular network antenna can be multiplexed into a wireless LAN diversity antenna. In some embodiments, the antenna may be used in conjunction with a tuning switch.
  • the radio frequency module 150 may provide a communication processing module applied to the terminal 100 and including a wireless communication solution such as 2G / 3G / 4G / 5G.
  • the radio frequency module may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like.
  • the radio frequency module receives electromagnetic waves from the antenna 1, and processes the received electromagnetic waves by filtering, amplifying, etc., and transmitting them to the modem for demodulation.
  • the radio frequency module can also amplify the signal modulated by the modem and turn it into electromagnetic wave radiation through the antenna 1.
  • at least part of the functional modules of the radio frequency module 150 may be disposed in the processor 150.
  • at least part of the functional modules of the radio frequency module 150 may be provided in the same device as at least part of the modules of the processor 110.
  • the modem may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to a baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs sound signals through audio equipment (not limited to speakers, receivers, etc.), or displays images or videos through a display screen.
  • the modem may be a separate device.
  • the modem may be independent of the processor and disposed in the same device as the radio frequency module or other functional modules.
  • the communication module 160 can provide wireless LAN (wireless local area networks, WLAN), Bluetooth (Bluetooth, BT), global navigation satellite system (GNSS), frequency modulation (FM) applied to the terminal 100.
  • Communication processing module for wireless communication solutions such as near field communication (NFC) and infrared (IR).
  • the communication module 160 may be one or more devices that integrate at least one communication processing module.
  • the communication module receives the electromagnetic wave through the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor.
  • the communication module 160 may also receive a signal to be transmitted from the processor, frequency-modulate it, amplify it, and turn it into electromagnetic wave radiation through the antenna 2.
  • the antenna 1 of the terminal 100 is coupled to a radio frequency module, and the antenna 2 is coupled to a communication module, so that the terminal 100 can communicate with a network and other devices through a wireless communication technology.
  • the wireless communication technology may include a global mobile communication system (GSM), a general packet radio service (GPRS), a code division multiple access (CDMA), and broadband.
  • GSM global mobile communication system
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • TD-SCDMA time-division code division multiple access
  • LTE long term evolution
  • BT GNSS
  • WLAN NFC
  • FM FM
  • IR technology IR
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS)) and / or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS beidou navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the terminal 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display includes a display panel.
  • the display panel can adopt LCD (liquid crystal display), OLED (organic light-emitting diode), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diodes (AMOLED), flexible light-emitting diodes (FLEDs), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLEDs), etc.
  • the terminal 100 may include one or N display screens, where N is a positive integer greater than 1.
  • the display screen may be used to display the desktop of the terminal, the main interface of the terminal's AI evaluation application, the evaluation result of the AI evaluation application, and the like.
  • the display screen may be a display screen with a touch function.
  • the terminal 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen, and an application processor.
  • ISP is used to process data from camera feedback. For example, when taking a picture, the shutter is opened, and the light is transmitted to the light receiving element of the camera through the lens. The light signal is converted into an electrical signal, and the light receiving element of the camera passes the electrical signal to the ISP for processing and converts the image to the naked eye. ISP can also optimize the image's noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, an ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • An object generates an optical image through a lens and projects it onto a photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs digital image signals to the DSP for processing.
  • DSP converts digital image signals into image signals in standard RGB, YUV and other formats.
  • the terminal 100 may include one or N cameras, where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the terminal 100 selects at a frequency point, the digital signal processor is used to perform a Fourier transform on the frequency point energy and the like.
  • Video codecs are used to compress or decompress digital video.
  • the terminal 100 may support one or more video codecs. In this way, the terminal 100 can play or record videos in multiple encoding formats, such as: MPEG1, MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can quickly process input information and continuously learn.
  • applications such as intelligent recognition of the terminal 100 can be implemented, such as: image recognition, face recognition, speech recognition, text understanding, and the like.
  • the NPU may also be a tensor processing unit (TPU), or an image processing unit (IPU).
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to achieve the expansion of the storage capacity of the terminal 100.
  • the external memory card communicates with the processor through an external memory interface to implement a data storage function. For example, save music, videos and other files on an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the terminal 100 by executing instructions stored in the internal memory 121.
  • the memory 121 may include a storage program area and a storage data area.
  • the storage program area may store an operating system, at least one application required by a function (such as a sound playback function, an image playback function, etc.) and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal 100.
  • the memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, other volatile solid-state storage devices, a universal flash memory (universal flash storage, UFS), etc. .
  • a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, other volatile solid-state storage devices, a universal flash memory (universal flash storage, UFS), etc.
  • the terminal 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • the audio module is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module can also be used to encode and decode audio signals.
  • the audio module may be disposed in the processor 110, or some functional modules of the audio module may be disposed in the processor 110.
  • the speaker 170A also called a "horn" is used to convert audio electrical signals into sound signals.
  • the terminal 100 can listen to music through a speaker or listen to a hands-free call.
  • the receiver 170B also referred to as the "handset" is used to convert audio electrical signals into sound signals.
  • the terminal 100 answers a call or a voice message, it can answer the voice by holding the receiver close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound through the mouth close to the microphone, and input the sound signal into the microphone.
  • the terminal 100 may be provided with at least one microphone.
  • the terminal 100 may be provided with two microphones, and in addition to collecting sound signals, a noise reduction function may also be implemented.
  • the terminal 100 may further be provided with three, four, or more microphones to collect sound signals, reduce noise, and also identify the source of the sound, and implement a directional recording function.
  • the headset interface 170D is used to connect a wired headset.
  • the earphone interface can be a USB interface or a 3.5mm open mobile terminal platform (OMTP) standard interface, and the American Cellular Telecommunications Industry Association (United States of America, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA American Cellular Telecommunications Industry Association
  • the pressure sensor 180A is used to sense a pressure signal, and can convert the pressure signal into an electrical signal.
  • the pressure sensor may be disposed on the display screen.
  • the capacitive pressure sensor may be at least two parallel plates having a conductive material. When a force is applied to the pressure sensor, the capacitance between the electrodes changes.
  • the terminal 100 determines the intensity of the pressure according to the change in capacitance.
  • the terminal 100 detects the intensity of the touch operation according to a pressure sensor.
  • the terminal 100 may also calculate the touched position based on the detection signal of the pressure sensor.
  • touch operations acting on the same touch position but different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity lower than the first pressure threshold is applied to the short message application icon, an instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction for creating a short message is executed.
  • the gyro sensor 180B may be used to determine a motion posture of the terminal 100.
  • the angular velocity of the terminal 100 about three axes may be determined by a gyro sensor.
  • a gyroscope sensor can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor detects the angle of the terminal 100 to shake, and calculates the distance to be compensated by the lens module according to the angle, so that the lens can offset the shake of the terminal 100 through reverse movement to achieve anti-shake.
  • the gyroscope sensor can also be used for navigation and somatosensory game scenes.
  • the barometric pressure sensor 180C is used to measure air pressure.
  • the terminal 100 calculates an altitude based on the air pressure value measured by the air pressure sensor to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal 100 can detect the opening and closing of the flip leather case by using a magnetic sensor.
  • the terminal 100 may detect the opening and closing of the flip according to a magnetic sensor. Further, according to the opened and closed state of the holster or the opened and closed state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the terminal 100 is stationary. It can also be used to identify the posture of the terminal, and is used in applications such as switching between horizontal and vertical screens, and pedometers.
  • the terminal 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal 100 may use a distance sensor to measure distances to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode. Infrared light is emitted outward through a light emitting diode.
  • the terminal 100 may use a proximity light sensor to detect that the user is holding the terminal 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor can also be used in holster mode, and the pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the terminal 100 can adaptively adjust the brightness of the display screen according to the perceived ambient light brightness.
  • the ambient light sensor can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor can also cooperate with the proximity light sensor to detect whether the terminal 100 is in a pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the terminal 100 may use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photographing, fingerprint answering an incoming call, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the terminal 100 executes a temperature processing strategy using the temperature detected by the temperature sensor. For example, when the temperature reported by the temperature sensor exceeds a threshold, the terminal 100 executes reducing the performance of a processor located near the temperature sensor in order to reduce power consumption and implement thermal protection.
  • the touch sensor 180K is also called “touch panel”. Can be set on the display. Used to detect touch operations on or near it. The detected touch operation can be passed to the application processor to determine the type of touch event and provide corresponding visual output through the display screen.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor may obtain a vibration signal of a human voice oscillating bone mass.
  • Bone conduction sensors can also touch the body's pulse and receive blood pressure beating signals.
  • a bone conduction sensor may also be provided in the headset.
  • the audio module 170 may analyze a voice signal based on a vibration signal of a oscillating bone mass obtained by the bone conduction sensor to implement a voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor to implement a heart rate detection function.
  • the keys 190 include a power-on key, a volume key, and the like.
  • the keys can be mechanical keys. It can also be a touch button.
  • the terminal 100 receives a key input, and generates a key signal input related to user settings and function control of the terminal 100.
  • the motor 191 may generate a vibration alert.
  • the motor can be used for incoming vibration alert and touch vibration feedback.
  • the touch operation applied to different applications can correspond to different vibration feedback effects.
  • Touch operations on different areas of the display can also correspond to different vibration feedback effects.
  • Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects.
  • Touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to a subscriber identity module (SIM).
  • SIM subscriber identity module
  • the SIM card can be contacted and separated from the terminal 100 by inserting or removing the SIM card interface.
  • the terminal 100 may support one or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple SIM cards can be inserted into the same SIM card interface at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface is also compatible with different types of SIM cards.
  • the SIM card interface is also compatible with external memory cards.
  • the terminal 100 interacts with the network through a SIM card to implement functions such as calling and data communication.
  • the terminal 100 uses an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the terminal 100 and cannot be separated from the terminal 100.
  • the software system of the terminal 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present invention takes the Android system with a layered architecture as an example, and exemplifies the software structure of the terminal 100.
  • FIG. 2 is a software structural block diagram of the terminal 100 according to an embodiment of the present invention.
  • the layered architecture divides the software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through interfaces.
  • the Android system is divided into four layers, which are an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer from top to bottom.
  • the application layer can include a series of application packages.
  • the application layer can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, and SMS.
  • the application layer may include an AI evaluation application, and the AI evaluation application includes an AI model.
  • the terminal can detect various indicators of the terminal when running the AI model, such as: power consumption, CPU usage, memory usage, etc. to obtain the terminal's ability to support AI tasks.
  • the application framework layer provides an application programming interface (API) and a programming framework for applications at the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, and so on.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can consist of one or more views.
  • the display interface including the SMS notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide a communication function of the terminal 100. For example, management of call status (including connection, hang up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages that can disappear automatically after a short stay without user interaction.
  • the notification manager is used to inform download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • text messages are displayed in the status bar, a tone is emitted, the terminal vibrates, and the indicator light flashes.
  • the application framework layer may include a neural network (Neural Networks, NN) API.
  • NN neural network
  • the AI evaluation application at the application layer starts to run the AI model, it can call the NNAPI of the application framework layer and use the corresponding driver of the kernel layer to mobilize the CPU, GPU, NPU (or TPU or IPU) of the hardware layer. Etc.), DSP and other hardware to perform a large number of computational tasks in the AI model.
  • the hardware called by different terminals through NNAPI may be different, or the called hardware is the same, but the configuration may be different.
  • the computing capabilities of different terminals when executing AI models are different.
  • the ability to support this AI model is also different. Therefore, the strength of the AI task support capability of the terminal can be obtained through the AI evaluation application.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that the Java language needs to call, and the other is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • Virtual machines are used to perform object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (media manager), media library (Media library), three-dimensional graphics processing library OpenGL ES, two-dimensional graphics engine SGL, etc.
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports a variety of commonly used audio and video formats for playback and recording, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • SGL is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the technical solutions involved in the following embodiments can be implemented in a terminal (for example, the terminal 100) having the foregoing hardware architecture and software architecture.
  • the AI evaluation application is an application package in the application layer of the terminal.
  • the AI evaluation application may include: an interface module, a performance evaluation module, at least one AI model (for example, it may include a training module and / or an inference module, etc.) and a monitoring module.
  • the interface module is used to interact with a user through a graphical interface.
  • the terminal may display the main interface of the application as shown in (2) of FIG. 6, and the user may start the evaluation function of the terminal by clicking the start test button 404 on the main interface.
  • the terminal displays the interface of the evaluation results as shown in (3) and (4) in FIG. 6, and the user can view the evaluation results through these interfaces.
  • the performance evaluation module is used to record various indicators of the terminal monitored by the monitoring module (for example, the terminal's CPU usage, memory usage, and battery consumption during the process of running the AI model or specific algorithm in the performance evaluation module. Usage, terminal runtime, etc.), and process these indicators, and finally display the processing results to the user through the interface module.
  • the results processed by the performance evaluation module may include, for example, the total scores shown in (3) and (4) of FIG. 6, various scores, and comparisons with other terminals.
  • the monitoring module may include a monitoring module occupied by a CPU, a monitoring module occupied by a memory, a monitoring module of a battery, and a monitoring module of a running time.
  • the monitoring module calls the performance evaluation module
  • the monitoring module monitors the terminal's CPU usage, memory usage, battery consumption, and the time when the terminal calls the performance evaluation module. Then, the monitoring module sends the detected index information to the performance evaluation module.
  • the aforementioned AI model may include one or more algorithms, such as classic machine learning algorithms and deep learning algorithms.
  • the AI model in the AI evaluation application is fixed. In this way, when different terminals run the AI evaluation application, they are based on the consumption of each terminal obtained by running the same AI model, and then obtain the ability of different terminals to support AI tasks.
  • the AI model mainly involves two types of models, one is a training model and the other is an inference model (also called a prediction model). Therefore, the training module corresponding to the training model and the reasoning module corresponding to the inference model can be deployed in the AI evaluation application.
  • the terminal may also deploy any one of the AI models, such as a training module or an inference module, based on the different evaluation contents of the AI evaluation application.
  • the terminal may also deploy other AI models in the AI evaluation application, which is not limited in the embodiment of the present application.
  • the training module may include one or more algorithms and training data.
  • the algorithms included in the training module may be, for example, classic machine learning algorithms and deep learning algorithms.
  • classic machine learning algorithms include probability algorithm 1, tree algorithm 1, and clustering algorithm 1.
  • Deep learning algorithms include Convolutional Neural Networks (CNN) 1 and Recurrent Neural Networks (RNN) 1.
  • probability algorithms and tree algorithms can be used for personalized recommendation AI tasks (such as local application recommendation, today's headline news recommendation, etc.), and clustering algorithms can be used for user portrait AI tasks (such as Identify end user income, gender, age range, occupation, terminal usage, etc., summarize and describe a user)
  • CNN models are mostly used for image-related AI services (such as beauty, face recognition, etc.)
  • RNN models mostly involve speech Semantic related AI services (for example: speech recognition, AI translation, synthetic music, etc.). Therefore, when the terminal runs these AI models, the detected consumption of the terminal can reflect the terminal's ability to support AI tasks.
  • the power consumption, CPU usage, memory usage, and running time of the terminal running the probability algorithm and tree algorithm can also reflect the strength of the terminal's ability to support personalized recommendation AI tasks. Therefore, the terminal can also evaluate the terminal's ability to support specific AI tasks based on the consumption of the terminal when the specific algorithm is running, combined with the AI task corresponding to the specific algorithm. For example: Evaluation shown in (3) of FIG. 6. For another example: as shown in (4) in FIG. 6, the running time corresponding to each AI service in the time-consuming score (that is, time-consuming).
  • AI model or algorithm used by specific AI tasks in different terminals and different applications is not limited to the above description, and is only an exemplary description here.
  • AI evaluation applications can select some lightweight algorithms from various algorithms. For example, among classic machine learning algorithms, logistic regression algorithm (a tree algorithm), naive Bayes algorithm (a probability algorithm), K-Means algorithm (a clustering algorithm), etc. can be selected. In the deep learning algorithm, a simple CNN structure and a simple RNN structure can be selected.
  • the terminal can quickly complete the algorithms in the classic machine learning algorithms, which may make it difficult for the terminal to monitor the consumption of various resources of the terminal during the execution of these algorithms, or the monitoring results. May be inaccurate. Therefore, different iterations can be set for these algorithms. In other words, let these algorithms that run faster run multiple times in order to extend the time for computing these algorithms, and then facilitate monitoring of various indicators when the terminal runs these algorithms.
  • the terminal may perform training in conjunction with the server.
  • the terminal is responsible for part of the work during the training process
  • the server is responsible for other work during the training process.
  • the method provided in the embodiment of the present application can also evaluate the terminal's ability to support this part of the training work for the part of the training work that the terminal is responsible for.
  • the embodiments of the present application are not specifically limited.
  • the inference module includes one or more algorithms and inference data, for example, it can include classic machine learning algorithms, deep learning algorithms, and inference data.
  • classic machine learning algorithms include probability algorithm 2, tree algorithm 2 and clustering algorithm 2.
  • Deep learning algorithms include CNN 2 and RNN 2.
  • the scenario in which the terminal runs the inference model is much larger than the scenario in which the training model is run. Therefore, compared to the training module, the classic machine learning algorithm in the inference module can also be introduced in a targeted manner.
  • Complex algorithms such as: Hidden Markov Model (HMM) algorithms related to audio recognition, conditional random field (CRF) algorithms that can be used for text recognition, and support vector machines that can be used for images (Support Vector Machine (SVM) classification algorithm.
  • HMM Hidden Markov Model
  • CRF conditional random field
  • SVM Support Vector Machine
  • Deep learning algorithms can also introduce fixed pre-trained models suitable for end-to-end use for different services, such as the image classification network MobileNet, Multi-task Cascaded Convolutional Networks (MTCNN). Face recognition model, Single Frame Multi-Box Detector (SSD) model, Long-Term Short-Term Memory (LSTM) semantic understanding model, etc.
  • SSD Single Frame Multi-Box Detector
  • LSTM Long-Term Short-Term Memory
  • the terminal can also subdivide the model using the same algorithm in the inference module into a floating point model and an integer model.
  • the floating-point model refers to that the parameters in the model are floating-point
  • the terminal uses floating-point operations in model inference.
  • the integer model refers to that the parameters in the model are integers, and the terminal uses integer operations in model inference. Therefore, the terminal can evaluate the terminal's ability to handle floating-point or integers based on the consumption of its own resources when the terminal runs the floating-point model and the integer model. For example: evaluation 408 as shown in (3) in FIG. 6.
  • FIGS 5 and 6 are schematic diagrams of some terminal interfaces involved in the embodiments of the present application.
  • the technical solutions of the embodiments of the present application will be described below with reference to these drawings.
  • an interface 300 is displayed on the terminal.
  • the interface 300 may include a status bar 301 and icons of multiple applications, such as wallet, Alipay, WeChat, dial-up, and icon 302 of the application market.
  • the status bar 301 may include the name of the operator (for example, China Mobile), time, WiFi icon, signal strength, current remaining power, and the like.
  • the status bar 301 may further include a Bluetooth icon, a mobile network (for example, 4G), an alarm clock icon, an external device icon, and the like.
  • the interface 300 may further include a Dock bar, and the Dock bar may include commonly used application icons and the like.
  • the terminal After the terminal detects a touch event of a user's finger (or a stylus pen, etc.) with respect to an application (App) icon, in response to the touch event, the terminal may open the user interface of the App corresponding to the App icon. For example, when the terminal detects the event that the user's finger touches the icon 302 of the application market, in response to the event that the user's finger touches the icon 302 of the application market, the main interface of the application market application is opened. Further, the user may enter the interface 303 as shown in (2) in FIG. 5 by searching or finding.
  • the interface 303 is a download interface of an AI support capability evaluation application (hereinafter referred to as an “AI evaluation application”).
  • the interface 303 can display information such as the introduction, review, recommendation, preview, tariff, size, version, release time, and other information of the AI evaluation application, and an installation button 304.
  • the terminal downloads the installation package of the AI evaluation application and installs the AI evaluation application.
  • the AI evaluation application is an application provided by an embodiment of this application.
  • the terminal can use the AI evaluation application to obtain the strength of the terminal's ability to support AI tasks.
  • the terminal resources of the terminal when performing AI tasks For example, the terminal resources of the terminal when performing AI tasks. Consumption, such as power consumption, CPU usage, and memory usage.
  • the user may also download the installation package of the AI evaluation application through other downloading methods, for example, the terminal may download the installation package from the website, and the terminal may also receive the installation package from other terminals.
  • the embodiments of the present application are not limited.
  • the interface 400 may include a status bar 401 and icons of multiple applications, for example, icons 402 of wallet, Alipay, WeChat, dial-up, application market, and AI evaluation application.
  • the interface shown in (1) in FIG. 6 may further include a Dock bar, and the Dock bar may include commonly used application icons and the like.
  • the terminal In response to the user clicking the icon 402 of the AI evaluation application, the terminal enters the main interface of the AI evaluation application (which may be referred to as the first interface). As shown in (2) in FIG. 6, it is a main interface 403 of an AI evaluation application.
  • the main interface 403 may include a start test button 404 (which may be referred to as a first button).
  • the start test button 404 In response to a user operation on the start test button 404 (which may be recorded as a first operation), for example, clicking, the terminal starts to test the terminal's ability to support AI tasks.
  • the process of terminal testing is: the terminal runs one or more AI models in the AI evaluation application, and monitors the resource consumption of the terminal when running the one or more AI models, such as: power consumption, CPU usage , Memory usage, etc.
  • parameters that reflect the resource consumption of the terminal can also be processed to obtain parameters that can directly reflect the terminal's ability to support AI tasks, such as the score of each resource and the total of all resources Score etc.
  • the terminal may also start testing the terminal's ability to support AI tasks by default.
  • the desktop of the terminal can be the first interface
  • the icon of the AI evaluation application can be the first button
  • the user's operation of the icon of the AI evaluation application can be the first operation.
  • an interface 405 (which may be referred to as a second interface) for displaying the evaluation result on the terminal.
  • the interface 405 may include any one or several of the total score item 411, each item score 407, and the evaluation 408.
  • the total score item 411 (which may be recorded as the first information) may indicate a total score of the terminal's overall support ability for the AI task.
  • the overall consumption of the terminal's resources when running one or more AI models in the AI evaluation application can be considered, such as power consumption, CPU Occupancy, memory usage, etc.
  • the first information may also be the specific value of the terminal resource consumption in the AI model running in the AI evaluation application running on the terminal, such as: the running time, power consumption, the maximum value of the CPU usage value, and the initial CPU The difference between the values, the difference between the maximum value of the memory usage value and the initial value of the memory, etc.
  • the total score item 411 may further include a comparison between the total score of the terminal and other terminals, for example, the total score of the terminal exceeds the total score of other terminals.
  • the total score item 411 may further include a view ranking item 406.
  • the terminal responds to the user clicking the view ranking item 406 to view the ranking of the total score of all the terminals.
  • All terminals here refers to the terminal that uses this AI evaluation application for evaluation and uploads the evaluation results to the cloud server.
  • the cloud server aggregates the evaluation results uploaded by the terminal to form a ranking of the evaluation results, which can be pushed to the terminal so that users can understand the strength of the AI task support capabilities of the terminal they use through the ranking.
  • the terminals are also running the AI model in the AI evaluation application (the same as the AI model running on this terminal), and obtain their own resource consumption situation. Further, the parameters reflecting the consumption situation of the terminal are processed to obtain the total score (the method of calculating the total score is the same as the method of calculating the total score of the terminal). Due to the different hardware configurations of different terminals, even if the same AI model is running, different terminals may call different hardware or different configurations of hardware, which will cause the consumption of these different terminal resources to be different, which will cause different total scores for different terminals. . Therefore, the total score also reflects the strength of different terminals' ability to support AI tasks. The following scores are also compared based on the premise that different terminals run the same AI model and the method of calculating scores is the same, and will not be described in detail below.
  • Each score item 407 may include the score of each sub-item, for example, it may include any one or any of the following: time-consuming score (reflects the time spent on one or more AI models in the terminal running the AI evaluation), Ability score (reflects the power consumed by one or more AI models in the terminal's running AI evaluation), CPU capability score (reflects the terminal's use of CPU during the running of one or more AI models in the AI evaluation), and memory efficiency score (Reflects the situation of the terminal occupying memory during the process of running one or more AI models in the AI evaluation) and so on.
  • time-consuming score reflects the time spent on one or more AI models in the terminal running the AI evaluation
  • Ability score reflects the power consumed by one or more AI models in the terminal's running AI evaluation
  • CPU capability score reflects the terminal's use of CPU during the running of one or more AI models in the AI evaluation
  • memory efficiency score Reflects the situation of the terminal occupying memory during the process of running one or more AI models in the AI evaluation
  • each score item 407 may also include a comparison of the scores of the sub-items of the terminal and other terminals.
  • each score item 407 may further include a button for viewing the ranking, and the terminal displays the ranking of each sub-item of each terminal in response to the user clicking the button for viewing the ranking.
  • the evaluation 408 may be directed to the specific AI model in the AI evaluation application or the specific algorithm in the AI model, the consumption of terminal resources, the evaluation of the terminal, and recommendations.
  • the interface 405 may further include an exit button 409, a view advanced mode button 410, and the like. Among them, in response to the user clicking the exit button 409, the terminal exits the AI evaluation application. In response to the user clicking the view advanced mode button 410, the terminal may display a more detailed evaluation result, as shown in an interface 412 shown in (4) in FIG. 6. In some embodiments of the present application, the terminal may also directly display the interface 412. That is, on the interface 403 shown in (2) of FIG. 6, after detecting that the user clicks the start test button 404, the terminal starts evaluation. After the evaluation is over, the terminal directly displays the information shown in (4) of FIG. 6 Interface 413.
  • the interface 413 may include the time consumption of each sub-item (which can be recorded as the second information), for example: the time spent for personalized recommendation algorithms x milliseconds (ms), the time spent for image recognition algorithms y ms, and speech semantic The algorithm takes time.
  • the interface 413 may further include power consumption, CPU usage, and memory usage (which may be recorded as third information) of the terminal during the entire process of running the AI model in the AI evaluation application.
  • FIG. 7 a flowchart of a method for evaluating terminal AI support capability according to an embodiment of the present application.
  • the method specifically includes:
  • the terminal detects an operation that a user starts to test.
  • an operation of starting a test by a user is detected on an interface module in an AI evaluation application.
  • the operation for starting the test by the user may be, for example, clicking the start test button 404 on the interface shown in (2) in FIG. 6.
  • the terminal In response to the detected operation of the user to start the test, the terminal reads the initial values of various indicators of the terminal and starts to run the AI model.
  • the terminal's various indicators include: power, CPU usage, memory usage, system time, etc.
  • the AI model may include one or more algorithms.
  • the AI model can be, for example, a training module (including multiple algorithms) or an inference module (including multiple algorithms) as shown in FIG. 4, or it can be one or more algorithms in the training module or inference module, such as: Classic machine learning algorithms, probability algorithms 1, etc.
  • the embodiments of this application do not limit the AI model.
  • the battery status module in the monitoring module can receive the power broadcast of the system through a broadcast receiver to determine the current power status of the terminal (that is, the power value before the terminal runs the AI model, which is an initial value, for example, Recorded as the first power value).
  • the running time module in the monitoring module can read the current time of the system (that is, the starting time of the terminal running the AI model, which is the initial value, such as the first time).
  • the CPU occupancy module in the monitoring module can read the current CPU occupancy of the terminal from the system file (for example: / sys / proc) (that is, the initial value of the CPU occupancy before the terminal runs the AI model. Occupation value).
  • the memory occupancy module in the monitoring module can read the current memory occupancy of the terminal from the system file (for example: / sys / proc) (that is, the initial value of the memory occupancy before the terminal runs the AI model, for example, the memory An occupation value).
  • the system file for example: / sys / proc
  • the monitoring module continues to monitor the real-time values of various indicators of the terminal when the terminal runs the AI model.
  • the terminal can focus on the CPU usage and memory usage.
  • the CPU usage module in the monitoring module can monitor the CPU usage of the terminal, and the performance evaluation module records the CPU usage of the terminal when running the AI model.
  • the memory occupancy module in the monitoring module can monitor the memory occupancy rate of the terminal, and the performance evaluation module records the entire memory occupancy rate when the terminal runs the AI model.
  • the monitoring module reads the final values of each indicator.
  • the battery status module in the monitoring module may receive the power broadcast of the system through a broadcast receiver to determine the current power status of the terminal (that is, the power value after the terminal runs the AI model, that is, the second power value).
  • the runtime module in the monitoring module can read the current time of the system (that is, the end time of the terminal running the AI model, which is the second time).
  • the terminal determines the AI support capability of the terminal according to the initial and final values of the indicators and changes in the indicators in the process of the terminal running the AI model.
  • the terminal ’s AI support capability is any one or several of the following parameters that reflect the resource consumption of the terminal: the time during which the terminal runs the AI model (that is, the time consumed, recorded as parameter t), and the terminal runs AI
  • the power consumption of the model that is, energy consumption, recorded as parameter e
  • the CPU usage value of the terminal running the AI model that is, the CPU capability, recorded as parameter c
  • the memory consumption value of the terminal running the AI model that is, memory efficiency
  • the duration of the AI model running on the terminal is the difference between the end time (ie, the second time) of running the AI model on the terminal and the starting time (ie, the first time) of running the AI model on the terminal.
  • the power consumption (which may be recorded as the first power consumption) of the terminal running the AI model is the difference between the first power value (obtained in step S102) and the second power value (obtained in step S104).
  • the CPU usage value of the AI model running on the terminal can be determined as follows: First, determine the maximum value from the CPU usage rate (obtained in step S103) at each time during the process of running the AI model on the terminal, and set the peak value of the CPU usage of the AI model running on the terminal. (Can be recorded as the second CPU occupation value of the terminal). Then, the difference between the peak value of the CPU usage of the terminal running the AI model and the initial value of the CPU usage before the terminal running the AI model (obtained in step S102, the first CPU usage value of the terminal) is determined as the terminal running the AI model. CPU usage value.
  • the memory usage of the AI model running on the terminal is determined as follows: First, the maximum value is determined from the memory usage rate (obtained in step S103) at each moment in the process of running the AI model on the terminal. Can be recorded as the second occupied value of the terminal's memory). Then, the difference between the peak value of the memory usage of the terminal running the AI model and the initial value of the memory usage before the terminal running the AI model (obtained in step S102, the first memory occupation value of the terminal) is determined as the terminal running the AI model. Memory usage value.
  • the time, energy, CPU usage, and memory usage of the AI model running on the terminal can be converted into, for example, Percentage system, tenth system, etc., so that users can directly understand the AI support capabilities of the terminal.
  • Formula 1 can be used to calculate the score of the terminal's AI support capability, as follows:
  • S is a scaling constant, for example: 100, then the highest score is 100.
  • exp () is the normalization function.
  • ⁇ , ⁇ , ⁇ are weighted constants and can be obtained by regression based on experimental results.
  • e is the power consumption value of the AI model running on the terminal
  • c is the CPU consumption value of the AI model running on the terminal
  • m is the memory consumption value of the AI model running on the terminal
  • t is the duration of the AI model running on the terminal.
  • the score is inversely proportional to the terminal's runtime, energy consumption, CPU usage, and memory usage. Because the terminal's ability to support AI tasks is inversely proportional to the terminal's runtime, energy consumption, CPU usage value, and memory usage value, the score is proportional to the terminal's ability to support AI tasks. In other words, the larger the score, the stronger the terminal's ability to support AI tasks.
  • Formula 1 is the overall AI task support capability of the terminal determined by considering the terminal's time consumption, energy consumption, CPU usage, and memory usage, that is, Total Score. Further, according to the experimental or empirical values, and the consumption of each system resource in the terminal, the ratio of the score of each item to the total score can be determined in order to determine each score. For example: the time-consuming score accounts for 50% of the total score. The energy consumption score, CPU power score, and memory efficiency score accounted for 50% of the total score. According to Equation 1, the ratio between the energy consumption score, the CPU capability score, and the memory efficiency score is ⁇ : ⁇ : ⁇ . Then, the score of each item can be calculated by formula 1a, formula 1b, formula 1c, and formula 1d, respectively.
  • the energy consumption score is:
  • the CPU capability score is:
  • the memory efficiency score is:
  • the terminal may assign different values to ⁇ , ⁇ , and ⁇ in Formula 1 to calculate each item.
  • the score of the resource in consideration of different focuses of users on various resources (electricity, CPU, memory, etc.), the terminal may assign different values to ⁇ , ⁇ , and ⁇ in Formula 1 to calculate each item. The score of the resource.
  • the score when the terminal runs the AI model can be calculated. In other words, only the time and energy consumption of the terminal are considered, and the terminal's ability to support AI tasks is obtained.
  • the CPU capability score of the terminal when running the AI model can be calculated. In other words, only the time consumption and CPU usage of the terminal are considered to obtain the terminal's ability to support AI tasks.
  • the memory efficiency score when the terminal runs the AI model can be calculated. In other words, only the time and memory consumption of the terminal are considered to obtain the terminal's ability to support AI tasks.
  • the terminal may run the AI model multiple times, and calculate the duration, power consumption value, CPU usage value, and memory each time the AI model is run. Occupy the value, and then average each calculated value, that is, use the average value of each parameter to represent the AI support capability of the terminal. Then, the terminal can use formula 2 to calculate the score of the terminal's AI support capability, as follows:
  • S is a scaling constant, for example: 100, then the highest score is 100.
  • exp () is the normalization function.
  • ⁇ , ⁇ , ⁇ are weighted constants and can be obtained by regression based on experimental results.
  • E is the average value of the power consumption value of the terminal running the AI model
  • C is the average value of the CPU consumption value of the terminal running the AI model
  • M is the average value of the memory consumption value of the terminal running the AI model
  • T is the length of time the terminal runs the AI model average of.
  • is the smoothness index, that is, the standard deviation index of the duration of each time the AI model is run. Specifically, it may be determined according to the correspondence between the standard deviation of the duration of the AI model each time the terminal runs and the value of ⁇ .
  • Table 1 is an example of the correspondence between the standard deviation of the duration of the AI model and the ⁇ value each time the terminal runs.
  • the terminal's running time, energy consumption, CPU usage value, and memory usage value then, the larger the value of ( ⁇ E + ⁇ C + ⁇ M) * T * ⁇ , exp (-( ⁇ E + The smaller the value of ⁇ C + ⁇ M) * T * ⁇ ), the smaller the score.
  • the score is inversely proportional to the terminal's runtime, energy consumption, CPU usage, and memory usage. Because the terminal's ability to support AI tasks is inversely proportional to the terminal's runtime, energy consumption, CPU usage value, and memory usage value, the score is proportional to the terminal's ability to support AI tasks. In other words, the larger the score, the stronger the terminal's ability to support AI tasks.
  • Formula 2 is the overall AI task support capability of the terminal determined by considering the terminal's time consumption, energy consumption, CPU usage, and memory usage, that is, Total Score.
  • the calculation method of each score may also be calculated by using the ratio of each score to the total score. For specific calculations, refer to the related descriptions above, and details are not described again.
  • the terminal may assign different values to ⁇ , ⁇ , and ⁇ in Formula 2 to calculate each item.
  • the score of the resource considering that the user pays different attention to various resources (electricity, CPU, memory, etc.), the terminal may assign different values to ⁇ , ⁇ , and ⁇ in Formula 2 to calculate each item. The score of the resource.
  • the score when the terminal runs the AI model can be calculated. In other words, only the time and energy consumption of the terminal are considered, and the terminal's ability to support AI tasks is obtained.
  • the CPU capability score of the terminal when running the AI model can be calculated. In other words, only the time consumption and CPU usage of the terminal are considered to obtain the terminal's ability to support AI tasks.
  • the memory efficiency score when the terminal runs the AI model can be calculated. In other words, only the time and memory consumption of the terminal are considered to obtain the terminal's ability to support AI tasks.
  • the terminal may run multiple AI models (for example, running training models and inference models), and calculating when running each AI model separately. Time, power consumption value, CPU usage value, and memory usage value, and then average the values calculated for each AI model to represent the terminal's AI support capabilities. Then, the terminal can use the formula 3 to calculate the score of the terminal's AI support capability, as follows:
  • N is the number of AI models that the terminal runs in total.
  • Ei is the average value of the power consumption value of the i-th AI model running on the terminal
  • Ci is the average value of the CPU usage of the i-th AI model running on the terminal
  • Mi is the average of the memory usage value of the i-th AI model running on the terminal
  • Ti is the average of the duration of the AI model running on the terminal
  • ⁇ i is the standard deviation of the duration of the i-th AI model running on the terminal. Therefore, After running N AI models for the terminal, average the support capabilities of the N AI models running on the terminal.
  • the terminal's running time, energy consumption, CPU usage value, and memory usage value then, The larger the value, The smaller the value of, the smaller the score.
  • the score is inversely proportional to the terminal's runtime, energy consumption, CPU usage, and memory usage. Because the terminal's ability to support AI tasks is inversely proportional to the terminal's runtime, energy consumption, CPU usage value, and memory usage value, the score is proportional to the terminal's ability to support AI tasks. In other words, the larger the score, the stronger the terminal's ability to support AI tasks.
  • Formula 3 is the overall AI task support capability of the terminal determined by considering the terminal's time consumption, energy consumption, CPU usage, and memory usage, that is, Total Score.
  • the calculation method of each score may also be calculated by using the ratio of each score to the total score. For specific calculations, refer to the related descriptions above, and details are not described again.
  • the terminal may assign different values to ⁇ , ⁇ , and ⁇ in Formula 1 to calculate each item.
  • the score of the resource in consideration of different focuses of users on various resources (electricity, CPU, memory, etc.), the terminal may assign different values to ⁇ , ⁇ , and ⁇ in Formula 1 to calculate each item. The score of the resource.
  • the CPU capability score of the terminal when running the AI model can be calculated. In other words, only the time consumption and CPU usage of the terminal are considered to obtain the terminal's ability to support AI tasks.
  • the memory efficiency score when the terminal runs the AI model can be calculated. In other words, only the time and memory consumption of the terminal are considered to obtain the terminal's ability to support AI tasks.
  • N 1
  • the CNN model was run 100 times, with an average power consumption of 200mwh, an average run time of 200ms, and a standard deviation of 60ms.
  • the average value of the CPU usage during the CNN operation was 80%, and the average value of the memory usage It is 1.2GB (4GB of total RAM).
  • C 50%
  • 0.7
  • 0.1
  • 0.2

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

本申请提供的一种终端对AI任务支持能力的评测方法及终端,涉及通信技术领域,通过在终端运行AI模型时,监测终端资源的消耗情况,以评测终端对AI任务的支持能力,该方法具体包括:终端显示AI评测应用的主界面,终端检测到用户开始检测的操作,终端运行AI评测应用中的AI模型,终端显示评测结果,评测结果为根据终端运行AI模型的时长和耗电量确定的信息。

Description

一种终端对AI任务支持能力的评测方法及终端 技术领域
本申请涉及通信技术领域,尤其涉及一种终端对AI任务支持能力的评测方法及终端。
背景技术
人工智能(Artificial Intelligence,AI)是研究、开发用于模拟、延伸和扩展人的智能的理论、方法、技术及应用系统的一门新的技术科学。目前,AI技术被广泛应用于终端中,使得终端可以执行很多AI任务,例如AI拍照、AI美颜、AI语音助手等。显然,AI任务极大的提升了用户体验。因此,终端的AI任务的处理能力也逐渐成为用户关注的焦点。
目前,已有很多评测工具可以对终端执行AI任务时采用的AI模型的性能进行评测。例如:https://www.mlperf.org/(以下称为MLPerf解决方案),以及https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/lite/java/ovic(以下称为OVIC解决方案)。其中,MLPerf解决方案中,服务器上集成了多种运行平台,提供多个开源数据源。服务器使用这些开源数据源,在这多个运行平台上运行AI模型,重点评估AI模型的运行速度,以及AI模型的准确性(例如AI模型预测结果的准确性)。OVIC解决方案中,也是侧重评估AI模型的运行速度。
也就是说,目前这些评测工具都是关注AI模型的运行速度以及AI模型的准确性,而忽略了终端自身对AI任务的支持能力。
发明内容
本申请提供的一种终端对AI任务的支持能力的评测方法及终端,可以通过在终端运行AI模型时,监测终端资源的消耗情况,以评测终端对AI任务的支持能力。
第一方面,本申请提供的一种评测方法,该方法包括:
终端显示第一界面,第一界面包括第一按钮;终端检测到用户对第一按钮的第一操作,终端运行第一人工智能模型;终端显示第二界面,第二界面包括第一信息;第一信息为终端根据终端运行第一人工智能模型的第一时长,以及终端运行第一人工智能模型的第一耗电量确定。
其中,第一界面可以是AI评测应用的主界面,第一按钮可以是开始测试的按钮,第一操作可以是用户对开始测试的操作,例如点击。第一界面还可以是终端的桌面,第一按钮还可以是AI评测应用的图标,第一操作还可以是用户对AI评测应用的图标的操作,例如点击。
由此,第一信息可用于表征终端对AI任务的支持能力,例如:第一信息包括第一时长和第一耗电量,第一时长越长、第一耗电量越大,表明终端对AI任务的支持能力越弱。又例如:第一信息可以为根据第一时长和第一耗电量确定的分值,分值越大,表明终端对AI任务的支持能力越强。
需要说明的是,AI评测应用中的第一AI模型为固定模型,因此,其他终端在运 行AI评测应用时,能够得到的自身资源消耗情况。由于不同终端自身的硬件配置不同,即使运行相同的AI模型,不同终端可能调用不同的硬件或者调用不同配置的硬件,这些都会导致这些不同终端资源的消耗情况不同,进而使得不同终端的总得分不同。因此,总得分的高低正好也反映了不同终端对AI任务的支持能力的强弱。
一种可能的实现方式中,该方法还包括:终端获取第一时间、第二时间、第一电量值和第二电量值;其中,第一时间为终端运行第一人工智能模型的开始时间;第一电量值为在第一时间终端的电量值;第二时间为终端运行第一人工智能模型的结束时间;第二电量值为在第二时间终端的电量值;终端确定第二时间和第一时间的差值为第一时长,确定第一电量值和第二电量值为第一耗电量。
一种可能的实现方式中,该方法还包括:终端获取终端的中央处理单元CPU第一占用值和终端的CPU第二占用值;其中,终端的CPU第一占用值为终端开始运行第一人工智能模型时终端的CPU占用值;终端的CPU第二占用值为终端运行第一人工智能模型过程中终端的CPU占用值的最大值;终端根据第一时长、第一耗电量、以及终端的CPU第二占用值和终端的CPU第一占用值的差值确定第一信息。
由此,第一信息可用于表征终端对AI任务的支持能力,例如:第一信息还可以包括终端的CPU第二占用值和终端的CPU第一占用值的差值,该差值越大,表明终端对AI任务的支持能力越弱。又例如:第一信息可以为根据第一时长、第一耗电量以及终端的CPU第二占用值和终端的CPU第一占用值的差值确定的分值,分值越大,表明终端对AI任务的支持能力越强。
一种可能的实现方式中,该方法还包括:终端获取终端的内存第一占用值和终端的内存第二占用值;其中,终端的内存第一占用值为终端开始运行第一人工智能模型时终端的内存占用值;终端的内存第二占用值为终端运行第一人工智能模型过程中终端的内存占用值的最大值;终端根据第一时长、第一耗电量、以及终端的内存第二占用值和终端的内存第一占用值的差值确定第一信息。
由此,第一信息可用于表征终端对AI任务的支持能力,例如:第一信息还可以包括终端的内存第二占用值和终端的内存第一占用值的差值,该差值越大,表明终端对AI任务的支持能力越弱。又例如:第一信息可以为根据第一时长、第一耗电量以及终端的内存第二占用值和终端的内存第一占用值的差值确定的分值,分值越大,表明终端对AI任务的支持能力越强。
一种可能的实现方式中,第一人工智能模型包括训练模型和推理模型中至少一个。
一种可能的实现方式中,训练模型包括概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法中的至少一个;推理模型包括概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法中的至少一个。
一种可能的实现方式中,第二界面还包括第二信息,第二信息为终端运行第一人工智能模型中任一个或任几个至少一个算法的时长。
举例来说,第一AI模型为推理模型,推理模型中包括有概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法。那么,终端在运行第一AI模型的过程中,终端读取运行第一AI模型中各个算法的开始时间和结束时间,各 个算法的结束时间和开始时间的差值为各个算法的时长。通常情况下,概率算法和树形算法可用于个性化推荐类的AI任务(例如本地应用推荐,今日头条的新闻推荐等),聚类算法可用于用户画像的AI任务(例如识别终端用户收入、性别、年龄段、职业、使用终端的习惯等,总结描述一个用户),CNN模型多用于图像相关的AI业务(例如:美颜、人脸识别等),RNN模型多涉及语音语义相关的AI业务(例如:语音识别、AI翻译、合成音乐等)。因此,终端运行概率算法和树形算法的时长可以对应于终端运行个性化推荐类的AI任务的时长。终端运行聚类算法的时长可以对应于终端运行用户画像的时长。终端运行CNN模型的时长可以对应于终端运行图像相关的AI业务的时长。终端运行RNN模型的时长可以对应于终端运行语音语义相关的AI业务的时长。
一种可能的实现方式中,第二界面还包括第三信息,第三信息为终端运行第一人工智能模型过程中至少两个时刻的电量值、至少两个时刻的CPU占用值和至少两个时刻的内存占用值中的至少一项。
第二方面,提供一种评测方法,该方法包括:响应于用户开始测试的操作,终端读取第一时间和第一电量值,以及终端运行第一人工智能模型;其中,第一时间为终端运行第一人工智能模型的开始时间;第一电量值为在第一时间终端的电量值;终端运行第一人工智能模型之后,终端读取第二时间和第二电量值;其中,第二时间为终端运行第一人工智能模型的结束时间;第一电量值为在第二时间时终端的电量值;终端确定第二时间和第一时间的差值为终端运行第一人工智能模型的第一时长,终端确定第一电量值和第二电量值的差值为终端运行第一人工智能模型的第一耗电量;终端根据第一时长和第一耗电量确定终端的对人工智能的AI支持能力。
一种可能的实现方式中,该方法还包括:终端在读取第一时间和第一电量值时,终端还读取终端的中央处理单元CPU第一占用值;终端的CPU第一占用值为在第一时间时终端的CPU占用值;在终端运行第一人工智能模型的过程中,终端读取终端的各个时刻的CPU占用值,并确定各个时刻的CPU占用值中的最大值为终端的CPU第二占用值。
终端根据第一时长和第一耗电量确定终端对人工智能的的AI支持能力还具体包括:终端根据第一时长、第一耗电量、以及终端的CPU第二占用值和终端的CPU第一占用值的差值确定终端对人工智能的AI支持能力。
一种可能的实现方式中,该方法还包括:终端在读取第一时间和第一电量值时,终端还读取终端的内存第一占用值;终端的内存第一占用值为在第一时间时终端的内存占用值;在终端运行第一人工智能模型的过程中,终端读取终端的各个时刻的内存占用值,并确定各个时刻的内存占用值中的最大值为终端的内存第二占用值。
终端根据第一时长和第一耗电量确定终端对人工智能的的AI支持能力还具体包括:终端根据第一时长、第一耗电量、以及终端的内存第二占用值和终端的内存第一占用值的差值确定终端对人工智能的的AI支持能力。
第三方面、一种终端,包括:处理器和显示屏,显示屏与处理器耦合;显示屏,用于显示第一界面,第一界面包括第一按钮;处理器,用于响应于检测到用户对第一按钮的第一操作,运行第一人工智能模型;显示屏,用于显示第二界面,第二界面包 括第一信息;第一信息为终端根据终端运行第一人工智能模型的第一时长,以及终端运行第一人工智能模型的第一耗电量确定。
一种可能的实现方式中,处理器,用于获取第一时间、第二时间、第一电量值和第二电量值;其中,第一时间为终端运行第一人工智能模型的开始时间;第一电量值为在第一时间时终端的电量值;第二时间为终端运行第一人工智能模型的结束时间;第二电量值为在第二时间时终端的电量值;确定第二时间和第一时间的差值为第一时长,确定第一电量值和第二电量值为第一耗电量。
一种可能的实现方式中,处理器,还用于获取终端的中央处理单元第一CPU占用值和终端的CPU第二占用值;其中,终端的CPU第一占用值为终端开始运行第一人工智能模型时终端的CPU占用值;终端的CPU第二占用值为终端运行第一人工智能模型过程中终端的CPU占用值的最大值;根据第一时长、第一耗电量、以及终端的CPU第二占用值和终端的CPU第一占用值的差值确定第一信息。
一种可能的实现方式中,处理器,还用于获取终端的内存第一占用值和终端的内存第二占用值;其中,终端的内存第一占用值为终端开始运行第一人工智能时终端的内存占用值;终端的内存第二占用值为终端运行第一人工智能模型过程中终端的内存占用值的最大值;根据第一时长、第一耗电量、以及终端的内存第二占用值和终端的内存第一占用值的差值确定第一信息。
一种可能的实现方式中,第一人工智能模型包括训练模型和推理模型中至少一个。
一种可能的实现方式中,训练模型包括概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法中至少一个的任一个或任几个;推理模型包括概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法中的任一个或任几个至少一个。
一种可能的实现方式中,第二界面还包括第二信息,第二信息为终端运行第一人工智能模型中任一个或任几个至少一个算法的时长。
一种可能的实现方式中,第二界面还包括第三信息,第三信息为终端运行第一人工智能模型过程中至少两个时刻的电量值、至少两个时刻的CPU占用值和至少两个时刻的内存占用值中的至少一项。
第四方面、一种终端,包括:处理器和显示屏,显示屏与处理器耦合;显示屏,用于检测到用户开始测试的操作;处理器,用于读取第一时间和第一电量值,以及终端运行第一人工智能模型;其中,第一时间为终端运行第一人工智能模型的开始时间;第一电量值为在第一时间时终端的电量值;处理器,还用于终端运行第一人工智能模型之后,读取第二时间和第二电量值;其中,第二时间为终端运行第一人工智能模型的结束时间;第一电量值为在第二时间时终端的电量值;处理器,还用于确定第二时间和第一时间的差值为终端运行第一人工智能模型的第一时长,终端确定第一电量值和第二电量值的差值为终端运行第一人工智能模型的第一耗电量;处理器,还用于根据第一时长和第一耗电量确定终端的AI支持能力。
一种可能的实现方式中,处理器,还用于终端在读取第一时间和第一电量值时,还读取终端的中央处理单元第一CPU占用值;终端的CPU第一占用值为在第一时间时终端的CPU占用值;在终端运行第一人工智能模型的过程中,读取终端的各个时刻 的CPU占用值,并确定各个时刻的CPU占用值中的最大值为终端的CPU第二占用值;根据第一时长、第一耗电量、以及终端的CPU第二占用值和终端的CPU第一占用值的差值确定终端的AI支持能力。
一种可能的实现方式中,处理器,还用于终端在读取第一时间和第一电量值时,还读取终端的内存第一占用值;终端的内存第一占用值为在第一时间时终端的内存占用值;在终端运行第一人工智能模型的过程中,读取终端的各个时刻的内存占用值,并确定各个时刻的内存占用值中的最大值为终端的内存第二占用值;根据第一时长、第一耗电量、以及终端的内存第二占用值和终端的内存第一占用值的差值确定终端的AI支持能力。
第五方面、一种计算机存储介质,包括计算机指令,当计算机指令在终端上运行时,使得终端执行如第一方面及其中任一种可能的实现方式中所述的方法。
第六方面、一种计算机存储介质,包括计算机指令,当计算机指令在终端上运行时,使得终端执行如第二方面及其中任一种可能的实现方式中所述的方法。
第七方面、一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面中及其中任一种可能的实现方式中所述的方法。
第八方面、一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第二方面中及其中任一种可能的实现方式中所述的方法。
附图说明
图1为本申请实施例提供的一种终端的结构示意图一;
图2为本申请实施例提供的一种终端的结构示意图二;
图3为本申请实施例提供的一种终端运行AI评测应用中AI模型的示意图;
图4为本申请实施例提供的一种终端中AI评测应用的框架图;
图5为本申请实施例提供的一些终端的界面示意图;
图6为本申请实施例提供的又一些终端的界面示意图;
图7为本申请实施例提供的一种评测方法的流程示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
考虑到终端自身对AI任务的支持能力,例如终端执行AI任务时,终端自身的消耗情况。如果终端在执行AI任务时,自身资源消耗较大,可能会影响终端在执行其他非AI任务的能力。因此,在评测终端性能时,不仅要考虑终端执行AI任务时采用的AI模型的性能,还需要考虑终端自身对AI任务的支持能力。
为了更好的理解本申请实施例的技术方案,先对本申请实施例中涉及到的一些技术术语进行解释,以供参考。
AI任务:终端在执行具体任务时,采用了AI技术的这类任务,例如:AI拍照、AI美颜、AI语音助手、人脸识别等。例如:终端在执行AI拍照的任务时,可以利用AI技术实时识别出各类标签以及多种场景,并且有针对性调节参数以提升拍照效果。又例如:终端还可以利用AI技术智能提醒用户调整终端的角度和如何构图,以实现更好的拍照效果等。
非AI任务:终端在执行具体任务时,没有采用AI技术的这些任务。例如:通话、短信、阅读器等。相比较于AI任务,终端在执行非AI任务时的运算量较小。
AI模型:终端在执行AI任务时,通常需要运行该AI任务对应的AI模型。举例来说,下面结合终端执行AI任务的过程,对AI模型进行说明。
例如:在终端执行自动识别狗的图片的AI任务中,终端可以智能的从大量的狗的图片中,学习到狗的特征(即训练过程)。然后,终端根据学习到的狗的特征去预测未知图片是否是狗的图片(即预测过程)。
一般而言,AI模型可以理解为函数,例如:用Y=f(W、X,b)来表示。其中,X是已有的用来训练的数据(例如:大量标志过是“狗”还是“猫”的图片)。Y是已有的图片数据的标签(该图片是猫还是狗)。函数里的W为权重,b为偏差。这两个参数是需要终端通过对大量数据进行学习后,确定出来。终端学习并确定权重和偏差的过程,即为终端训练模型的过程。
模型是指终端将数据带入到算法中进行训练,终端会不断学习以确定出最优的权重(W)和偏差(b)。当确定出最优的权重和偏差后,称为这个模型训练成功。此时,Y=f(W、X,b)的函数就确定下来了。
而后,终端可以通过确定出来的函数Y=f(W、X,b),算出已有数据集之外的其他数据(例如:新的图片)对应的标签。例如:新的图片是否是狗的图片。终端计算新数据对应标签的过程,即为终端利用模型预测新数据的过程。
考虑到终端对AI任务的支持能力较弱时,终端执行AI任务时会造成终端自身的消耗较大,会影响到终端执行其他任务的效率。因此,本申请实施例提供的技术方案,可以评测终端对AI任务的支持能力的强弱,以便用户对终端的性能进行全面的了解。
本申请提供的技术方案中,终端可以在执行某个具体的AI模型的过程中,同时监测终端资源消耗情况,例如:电量消耗情况、CPU占用情况、内存(包括ROM、RAM等)占用情况等。在本申请的一些实施例中,为了使得监测结果在不同终端之间具有可比性,这些不同的终端可以采用相同的数据,执行相同的AI模型,分别监测不同终端执行相同AI模型的过程中各个终端的消耗情况。这样,用户可以根据某个终端的监测结果,来了解该终端对AI任务的支持能力的强弱。
示例性的,本申请中的终端可以为手机、平板电脑、个人计算机(Personal Computer,PC)、个人数字助理(personal digital assistant,PDA)、智能手表、上网本、可穿戴电子设备、增强现实技术(Augmented Reality,AR)设备、虚拟现实(Virtual Reality,VR)设备、车载设备、智能汽车、无人机、智能音响、机器人等,本申请对该终端的具体形式不做特殊限制。
图1是本发明实施例的终端100的结构框图。
终端100可以包括处理器110,外部存储器接口120,内部存储器121,USB接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,射频模块150,通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及SIM卡接口195等。其中传感器模块可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
本发明实施例示意的结构并不构成对终端100的限定。可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(Neural-network Processing Unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
在本申请实施例中,处理器可用于响应于检测到用户开始测试的操作,开始运行AI评测应用中的AI模型,并获取终端运行AI模型时终端资源的情况,例如:运行AI模型的时长、耗电量、CPU占用值和内存占用值等信息。进一步,根据这些资源消耗的情况,确定终端对AI任务的支持能力等。
控制器可以是指挥终端100的各个部件按照指令协调工作的决策者。是终端100的神经中枢和指挥中心。控制器根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器中的存储器为高速缓冲存储器,可以保存处理器刚用过或循环使用的指令或数据。如果处理器需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器可以包含多组I2C总线。处理器可以通过不同的I2C总线接口分别耦合触摸传感器,充电器,闪光灯, 摄像头等。例如:处理器可以通过I2C接口耦合触摸传感器,使处理器与触摸传感器通过I2C总线接口通信,实现终端100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器可以包含多组I2S总线。处理器可以通过I2S总线与音频模块耦合,实现处理器与音频模块之间的通信。在一些实施例中,音频模块可以通过I2S接口向通信模块传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块与通信模块可以通过PCM总线接口耦合。在一些实施例中,音频模块也可以通过PCM接口向通信模块传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信,两种接口的采样速率不同。
UART接口是一种通用串行数据总线,用于异步通信。该总线为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器与通信模块160。例如:处理器通过UART接口与蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块可以通过UART接口向通信模块传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器与显示屏,摄像头等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器和摄像头通过CSI接口通信,实现终端100的拍摄功能。处理器和显示屏通过DSI接口通信,实现终端100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以配置为控制信号,也可配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器与摄像头,显示屏,通信模块,音频模块,传感器等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口可以用于连接充电器为终端100充电,也可以用于终端100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。还可以用于连接其他电子设备,例如AR设备等。
本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端100的结构限定。终端100可以采用本发明实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块可以通过USB接口接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块可以通过终端100的无线充电线圈接收无线充电输入。充电管理模块为电池充电的同时,还可以通过电源管理模块141为终端设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块接收所述电池和/或充电管理模块的输入,为处理器,内部存储器,外部存储器,显示屏,摄像头,和通信模块等供电。电源管理模块还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在一些实施例中,电源管理模块141 也可以设置于处理器110中。在一些实施例中,电源管理模块141和充电管理模块也可以设置于同一个器件中。
终端100的无线通信功能可以通过天线模块1,天线模块2射频模块150,通信模块160,调制解调器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将蜂窝网天线复用为无线局域网分集天线。在一些实施例中,天线可以和调谐开关结合使用。
射频模块150可以提供应用在终端100上的包括2G/3G/4G/5G等无线通信的解决方案的通信处理模块。射频模块可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(Low Noise Amplifier,LNA)等。射频模块由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调器进行解调。射频模块还可以对经调制解调器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,射频模块150的至少部分功能模块可以被设置于处理器150中。在一些实施例中,射频模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调器可以包括调制器和解调器。调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器,受话器等)输出声音信号,或通过显示屏显示图像或视频。在一些实施例中,调制解调器可以是独立的器件。在一些实施例中,调制解调器可以独立于处理器,与射频模块或其他功能模块设置在同一个器件中。
通信模块160可以提供应用在终端100上的包括无线局域网(wireless local area networks,WLAN),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案的通信处理模块。通信模块160可以是集成至少一个通信处理模块的一个或多个器件。通信模块经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器。通信模块160还可以从处理器接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,终端100的天线1和射频模块耦合,天线2和通信模块耦合,使得终端100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统 (global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS))和/或星基增强系统(satellite based augmentation systems,SBAS)。
终端100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏包括显示面板。显示面板可以采用LCD(liquid crystal display,液晶显示屏),OLED(organic light-emitting diode,有机发光二极管),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端100可以包括1个或N个显示屏,N为大于1的正整数。
在本申请实施例中,显示屏可以用于显示终端的桌面,显示终端AI评测应用的主界面、AI评测应用的评测结果等。例如:显示如图5和图6中所示的一些终端的界面。可以理解的是,显示屏可以是具有触摸功能的显示屏。
终端100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏以及应用处理器等实现拍摄功能。
ISP用于处理摄像头反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端100可以包括1个或N个摄像头,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。终端100可以支持一种或多种视频编解码器。这样,终端100可以播放或录制多种编码格式的视频,例如:MPEG1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端100的智能认知等应用,例如:图像识别,人脸识别,语音识别, 文本理解等。需要说明的是,NPU也可能为张量处理单元(Tensor Processing Unit,TPU)、或图像处理单元(Image Processing Unit,IPU)等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端100的存储能力。外部存储卡通过外部存储器接口与处理器通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行终端100的各种功能应用以及数据处理。存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,其他易失性固态存储器件,通用闪存存储器(universal flash storage,UFS)等。
终端100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块还可以用于对音频信号编码和解码。在一些实施例中,音频模块可以设置于处理器110中,或将音频模块的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端100可以通过扬声器收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端100接听电话或语音信息时,可以通过将受话器靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风发声,将声音信号输入到麦克风。终端100可以设置至少一个麦克风。在一些实施例中,终端100可以设置两个麦克风,除了采集声音信号,还可以实现降噪功能。在一些实施例中,终端100还可以设置三个,四个或更多麦克风,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口可以是USB接口,也可以是3.5mm的开放移动终端平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器可以设置于显示屏。压力传感器的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器,电极之间的电容改变。终端100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏,终端100根据压力传感器检测所述触摸操作强度。终端100也可以根据压力传感器的检测信号计算触摸的 位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定终端100的运动姿态。在一些实施例中,可以通过陀螺仪传感器确定终端100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器检测终端100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端100的抖动,实现防抖。陀螺仪传感器还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,终端100通过气压传感器测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。终端100可以利用磁传感器检测翻盖皮套的开合。在一些实施例中,当终端100是翻盖机时,终端100可以根据磁传感器检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测终端100在各个方向上(一般为三轴)加速度的大小。当终端100静止时可检测出重力的大小及方向。还可以用于识别终端姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。终端100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端100可以利用距离传感器测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。通过发光二极管向外发射红外光。使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端100附近有物体。当检测到不充分的反射光时,可以确定终端100附近没有物体。终端100可以利用接近光传感器检测用户手持终端100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。终端100可以根据感知的环境光亮度自适应调节显示屏亮度。环境光传感器也可用于拍照时自动调节白平衡。环境光传感器还可以与接近光传感器配合,检测终端100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。终端100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,终端100利用温度传感器检测的温度,执行温度处理策略。例如,当温度传感器上报的温度超过阈值,终端100执行降低位于温度传感器附近的处理器的性能,以便降低功耗实施热保护。
触摸传感器180K,也称“触控面板”。可设置于显示屏。用于检测作用于其上或附近的触摸操作。可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型,并通过显示屏提供相应的视觉输出。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器可以获取人体声部振动骨块的振动信号。骨传导传感器也可以接触人体脉搏,接收血压跳动 信号。在一些实施例中,骨传导传感器也可以设置于耳机中。音频模块170可以基于所述骨传导传感器获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键可以是机械按键。也可以是触摸式按键。终端100接收按键输入,产生与终端100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏不同区域的触摸操作,也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接用户标识模块(subscriber identity module,SIM)。SIM卡可以通过插入SIM卡接口,或从SIM卡接口拔出,实现和终端100的接触和分离。终端100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口也可以兼容不同类型的SIM卡。SIM卡接口也可以兼容外部存储卡。终端100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端100中,不能和终端100分离。
终端100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明终端100的软件结构。
图2是本发明实施例的终端100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图2所示,应用程序层可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,短信息等应用程序。
在本申请实施例中,应用程序层可以包括AI评测应用,该AI评测应用中包含有AI模型。终端可以通过在运行AI模型时检测终端的各项指标,例如:电量的消耗情况、CPU的占用情况、内存的占用情况等,以获取终端对AI任务的支持能力。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状 态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供终端100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端振动,指示灯闪烁等。
在本申请的一些实施例中,应用程序框架层可以包括神经网络(Neural Networks,NN)API。如图3所示,应用程序层的AI评测应用开始运行AI模型时,可以调用应用程序框架层的NNAPI,通过内核层相应的驱动,以调动硬件层的CPU、GPU、NPU(或TPU或IPU等)、DSP等硬件来执行AI模型中大量的运算工作等。由于不同的终端通过NNAPI调用的硬件可能不同,或者调用的硬件相同,但配置可能不同,进而造成不同终端执行AI模型时的运算能力也不同,也就是说,不同终端运行相同的AI模型时,对该AI模型的支持能力也不同。因此,可以通过该AI评测应用来获取终端的AI任务支持能力的强弱。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库OpenGL ES,二维图形引擎SGL等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
OpenGL ES用于实现三维图形绘图,图像渲染,合成,和图层处理等。
SGL是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
以下实施例中所涉及的技术方案均可以在具有上述硬件架构和软件架构的终端(例如终端100)中实现。
如图4所示,为本申请实施例提供的一种AI评测应用的框架图。具体的,AI评测应用为终端中应用程序层的一个应用程序包。AI评测应用可以包括:界面模块、性能评估模块、至少一个AI模型(例如:可以包括训练模块和/或推理模块等)和监控模块。
其中,上述界面模块用于通过图形界面与用户进行交互。例如:终端可以显示如图6中(2)所示的应用的主界面,用户可以通过点击该主界面上的开始测试按钮404,开启终端的评测功能。又例如:终端显示如图6中(3)和(4)所示的评测结果的界面,用户可以通过这些界面查看评测的结果。
上述性能评估模块,用于记录监测模块监测得到的终端的各项指标(例如:终端在运行性能评估模块中的AI模型或者具体算法的过程中,终端的CPU占用情况、内存占用情况、电池耗用情况、终端的运行时长等),并对这些指标进行处理,最后将处理结果通过界面模块显示给用户。其中,性能评估模块处理的结果,例如可以包括如图6中(3)和(4)所示的总得分,各项得分,以及与其他终端的对比情况等。
上述监控模块,可以包括CPU占用的监控模块、内存占用的监控模块、电池的监控模块和运行时间的监控模块。监控模块在终端调用性能评估模块时,监控终端的CPU占用情况、内存占用情况、电池耗用情况、以及终端调用性能评估模块的时间等。而后,监控模块将检测到的这些指标信息,发送给性能评估模块。
上述AI模型可以包括一个或多个算法,例如经典机器学习算法和深度学习算法等。AI评测应用中的AI模型为固定的,这样,不同终端在运行AI评测应用时,都是基于运行相同的AI模型得到的各个终端的消耗情况,进而得到不同终端对AI任务的支持能力。
下面对AI评测应用中的AI模型进行示例性说明。
考虑到AI模型中主要涉及到两类模型,一类为训练模型,另一类为推理模型(也可以称为预测模型)。故可以在AI评测应用中部署训练模型对应的训练模块,以及推理模型对应的推理模块。需要说明的是,终端也可以基于AI评测应用重点评测内容的不同,部署其中任一种AI模型,例如:训练模块或推理模块。终端还可以在AI评测应用中部署其他AI模型,本申请实施例不做限定。
其中,训练模块可以包括一个或多个算法以及训练数据,训练模块中的包括的算法例如可以是经典机器学习算法和深度学习算法。其中,经典机器学习算法包括概率算法1、树形算法1和聚类算法1。深度学习算法包括卷积神经网络(Convolutional Neural Networks,CNN)1和递归神经网络(Recurrent Neural Networks,RNN)1。
需要说明的是,通常情况下,概率算法和树形算法可用于个性化推荐类的AI任务(例如本地应用推荐,今日头条的新闻推荐等),聚类算法可用于用户画像的AI任务(例如识别终端用户收入、性别、年龄段、职业、使用终端的习惯等,总结描述一个用户),CNN模型多用于图像相关的AI业务(例如:美颜、人脸识别等),RNN模 型多涉及语音语义相关的AI业务(例如:语音识别、AI翻译、合成音乐等)。因此,终端在运行这些AI模型时,检测到的终端的消耗情况可以反映终端对AI任务的支持能力。例如:终端运行概率算法和树形算法时电量的消耗、CPU的占用情况、内存的占用情况以及运行时间等,也可以反映终端对个性化推荐类的AI任务的支持能力的强弱。因此,终端也可以基于运行具体算法时终端的消耗情况,结合具体算法对应的AI任务,对终端对具体AI任务的支持能力给出评价。例如:如图6中(3)所示的评价。又例如:如图6中(4)所示的耗时得分中各个AI业务对应的运行时长(即耗时)。
还需要说明的是,不同终端,不同应用中具体的AI任务使用的AI模型或算法不限于上述描述,这里仅是示例性说明。
在本申请的一些实施例中,考虑到终端在训练过程中,终端的运算量极大,若终端运行AI评测应用的负荷太大,可能会影响终端的其他功能。因此,AI评测应用可以从各个算法中选中一些轻量级的算法。例如:经典机器学习算法中可以选择逻辑回归算法(一种树形算法)、朴素贝叶斯算法(一种概率算法),K-Means算法(一种聚类算法)等。深度学习算法中可以选择简单的CNN结构和简单的RNN结构。
在本申请的另一些实施例中,通常,终端可以很快地完成经典机器学习算法中的算法,可能导致终端很难监测在执行这些算法过程中终端的各种资源的消耗情况,或者监测结果可能不准确。因此,可以为这些算法设置不同的迭代次数。也就是说,让这些运算较快的算法,运行多次,以便延长运算这些算法的时间,进而方便监测终端运行这些算法时的各项指标。
在本申请的又一些实施例中,考虑到终端训练时的运算量极大,终端可以联合服务器一起进行训练。也就是说,终端负责训练过程中的部分工作,服务器负责训练过程中的其他工作。本申请实施例提供的方法也可以针对终端负责的这部分训练工作,评测终端对这部分训练工作的支持能力。本申请实施例不做具体限定。
类似的,推理模块包括一个或多个算法以及推理数据,例如可以包括经典机器学习算法、深度学习算法和推理数据。其中,经典机器学习算法包括概率算法2、树形算法2和聚类算法2。深度学习算法包括CNN 2和RNN 2。
在本申请的一些实施例中,考虑到终端运行推理模型的场景远远大于运行训练模型的场景,因此,相较于训练模块,推理模块中的经典机器学习算法还可以有针对性的引入相对复杂的算法,例如:音频识别相关的隐马尔科夫模型(Hidden Markov Model,HMM)算法,可用于文本识别的条件随机场(conditional random field,CRF)算法以及可用于图像的支持向量机(Support Vector Machine,SVM)分类算法等。深度学习算法中,还可以引入采用固定的预训练的针对不同业务的适合端侧使用的模型,例如图像分类网络MobileNet,多任务级联卷积神经网络(Multi-task Cascaded Convolutional Networks,MTCNN)人脸识别模型,单帧多框检测(Single Shot MultiBox Detector,SSD)模型,双向长短期记忆网络(Long Short-Term Memory,LSTM)语义理解模型等。
在本申请的又一些实施例中,考虑到不同硬件运算需求可能不同,例如:CPU可能适合整数运算,DSP和GPU可能适合浮点运算,NPU可能对整数运算和浮点运算有不同的处理。因此,终端还可以将推理模块中的采用相同算法的模型细分为浮点模型和整数模型。其中,浮点模型,是指模型里的参数采用浮点型,终端在模型推理时 使用浮点运算。整数模型,是指模型里的参数采用整数型,终端在模型推理时使用整数运算。因此,终端可以针对终端运行浮点模型和整数模型时,自身资源的消耗情况,对终端处理浮点或整数的能力进行评价。例如:如图6中(3)中所示的评价408。
需要说明的是,上述的终端的模块划分以及各个模块的功能只是一个示例,并不构成对AI评测应用框架的限定。
图5和图6中所示为本申请实施例涉及的一些终端界面的示意图。下面结合这些附图,对本申请实施例的技术方案进行说明。
如图5中(1)所示,为终端显示的一个界面300。界面300中可以包括状态栏301、以及多个应用程序的图标,例如钱包、支付宝、微信、拨号、以及应用市场的图标302等。其中,状态栏301中可以包括运营商的名称(例如中国移动)、时间、WiFi图标、信号强度和当前的剩余电量等。此外,可以理解的是,在其他一些实施例中,状态栏301中还可以包括蓝牙图标、移动网络(例如:4G)、闹钟图标和外接设备图标等。还可以理解的是,在其他一些实施例中,界面300中还可以包括Dock栏,Dock栏中可以包括常用的应用图标等。
当终端检测到用户的手指(或触控笔等)针对某一应用(App)图标的触摸事件后,响应于该触摸事件,终端可以打开与该App图标对应的App的用户界面。例如,当终端检测到用户的手指触摸应用市场的图标302的事件后,则响应于用户的手指触摸应用市场的图标302的事件,打开应用市场应用的主界面。进一步的,用户可以通过搜索或查找等方式,进入到如图5中(2)所示的界面303。界面303为AI支持能力评测的应用程序(以下简称“AI评测应用”)的下载界面。该界面303中可以显示有AI评测应用的介绍、评论、推荐、预览、资费、大小、版本、发行时间等信息,以及安装按钮304。响应于用户点击安装按钮304,终端下载AI评测应用的安装包,并安装AI评测应用。
其中,AI评测应用为本申请实施例提供的一种应用程序,终端可以通过该AI评测应用,来获取终端对AI任务的支持能力的强弱,例如:终端在执行AI任务时的终端资源的消耗情况,例如电量消耗情况、CPU占用情况、内存占用情况等。
需要说明的是,在本申请实施例中,用户也可以通过其他的下载方式下载AI评测应用的安装包,例如:终端可以从网站上下载安装包,终端也可以从其他终端处接收安装包等,本申请实施例不做限定。
如图6中(1)所示,为终端在下载了AI评测应用后的一种界面400。界面400中可以包括状态栏401,以及多个应用程序的图标,例如钱包、支付宝、微信、拨号、应用市场、和AI评测应用的图标402。在其他一些实施例中,图6中(1)所示的界面中还可以包括Dock栏,Dock栏中可以包括常用的应用图标等。
响应于用户点击AI评测应用的图标402,终端进入AI评测应用的主界面(可记为第一界面)。如图6中(2)所示,为一种AI评测应用的主界面403。该主界面403中可以包括开始测试按钮404(可记为第一按钮)。响应于用户对开始测试按钮404的操作(可记为第一操作),例如:点击,终端开始测试终端对AI任务支持能力。终端测试的过程是:终端运行AI评测应用中的一个或多个AI模型,并在运行该一个或多个AI模型时,监测终端资源的消耗情况,例如:电量的消耗情况、CPU的占用情 况、内存的占用情况等。在本申请实施例的一些实施例中,还可以对反映终端资源消耗情况的参数进行一定处理,得到能够直接反映终端对AI任务的支持能力的参数,例如各项资源的得分、所有资源的总得分等。
需要说明的是,在检测到用户在终端的桌面上,操作AI评测应用的图标的操作后,终端也可以默认开始测试终端对AI任务支持能力。此时,终端的桌面可以为第一界面,AI评测应用的图标可以为第一按钮,用户对AI评测应用的图标的操作可以为第一操作。本申请实施例不做限定。
如图6中(3)所示,为终端显示评测结果的一种界面405(可记为第二界面)。该界面405中可以包括总得分项411、各项得分407、和评价408中的任一项或任几项。
其中,总得分项411(可记为第一信息)可以表示终端对AI任务的总体支持能力的总得分、总得分越高,表示终端的支持能力越好。示例性的,在计算终端对AI任务的总体支持能力时,可以综合考虑终端在运行AI评测应用中的一个或多个AI模型时,终端所有资源的消耗情况,例如:电量消耗情况、CPU的占用情况、内存的占用情况等。其中,总得分的具体计算方法可参考下文步骤S105中的描述。
还需要说明的是,第一信息也可以是终端运行AI评测应用中的AI模型中,终端资源的消耗情况的具体数值,例如:运行时长、耗电量、CPU占用值的最大值与CPU初始值的差值、内存占用值的最大值与内存初始值的差值等。
可选的,在一些实施例中,总得分项411还可以包括本终端与其他终端的总得分的对比情况,例如:本终端的总得分超过其他终端总得分的百分数。可选的,在一些实施例中,总得分项411还可以包括查看排行项406。终端响应于用户点击查看排行项406,查看所有终端的总得分的排行情况。这里的“所有终端”是指使用该AI评测应用进行评测,并将评测结果上传到云服务器的终端。也就是说,云服务器对终端上传的评测结果进行汇总,形成了评测结果的排行榜,可以推送到终端,以便用户通过该排行榜,了解自己使用的终端的AI任务支持能力的强弱。
需要说明的是,其他终端也是运行AI评测应用中的AI模型(与本终端运行的AI模型相同),得到的自身资源消耗情况。进一步,将反映终端消耗情况的参数进行处理,得到的总得分(计算总得分的方法与本终端总得分的计算方法相同)。由于不同终端自身的硬件配置不同,即使运行相同的AI模型,不同终端可能调用不同的硬件或者调用不同配置的硬件,这些都会导致这些不同终端资源的消耗情况不同,进而使得不同终端的总得分不同。因此,总得分的高低正好也反映了不同终端对AI任务的支持能力的强弱。下文中各项得分的也是基于不同终端运行相同的AI模型,计算得分的方法也相同的前提下进行比较的,以下不再赘述。
各项得分项407,可以包含各个子项的得分,例如可以包括以下任一项或任几项:耗时得分(反映终端在运行AI评测中一个或多个AI模型耗用的时长)、耗能得分(反映终端在运行AI评测中一个或多个AI模型耗用的电量)、CPU能力得分(反映终端在运行AI评测中一个或多个AI模型过程中占用CPU的情况)和内存效率得分(反映终端在运行AI评测中一个或多个AI模型过程中占用内存的情况)等。其中,各子项得分的具体计算方法可参考下文步骤S105中的描述。
可选的,在本申请的一些实施例中,各项得分项407还可以包括本终端与其他终 端的子项得分的对比情况。可选的,在本申请的又一些实施例中,各项得分项407还可以包括查看排行的按钮,终端响应于用户对查看排行的按钮的点击,显示各个终端的各子项的排行情况。
评价408可以针对终端运行AI评测应用中具体的AI模型,或者AI模型中具体的算法时,终端资源的消耗情况,给出的对终端的评价,以及建议。
在一些实施例中,该界面405中还可以包括退出按钮409、查看高级模式按钮410等。其中,响应于用户点击退出按钮409,终端退出AI评测应用。响应于用户点击查看高级模式按钮410,终端可以展示更加详细的评测结果,如图6中(4)所示的界面412。在本申请的一些实施例中,终端也可以直接显示界面412。也就是说,在如图6中(2)所示的界面403上,检测到用户点击开始测试按钮404后,终端开始评测,评测结束后,终端直接显示如图6中(4)所示的界面413。其中,界面413中可以包含各个子项的耗时情况(可记为第二信息),例如:个性化推荐类算法耗时x毫秒(ms)、图像识别类算法耗时y ms、语音语义类算法耗时z ms等。界面413中还可以包括终端在运行AI评测应用中AI模型的整个过程中电量的消耗情况、CPU占用情况、以及内存占用情况(可记为第三信息)等。
如图7所示,为本申请实施例提供的一种终端AI支持能力的评测方法的流程图,该方法具体包括:
S101、终端检测到用户开始测试的操作。
在本申请的一些实施例中,AI评测应用中界面模块上检测到用户开始测试的操作。其中,用户开始测试的操作,例如可以是在如图6中(2)所示的界面上,点击开始测试按钮404。
S102、响应于检测到的用户开始测试的操作,终端读取终端各项指标的初值,并开始运行AI模型。
其中,终端的各项指标包括:电量、CPU占用率、内存占用率、系统时间等。
其中,AI模型可以包括一个或多个算法。AI模型例如可以是如图4中所示的训练模块(其中包括多个算法)或推理模块(其中包括多个算法),也可以是训练模块或推理模块中的一个或多个算法,例如:经典机器学习算法、概率算法1等,本申请实施例对AI模型不做限定。
示例性的,监控模块中的电池状态模块可以通过广播接收器(Broadcast Receiver)接收系统的电量广播,以确定终端当前的电量情况(即为终端运行AI模型之前的电量值,为初值,例如记为第一电量值)。监控模块中的运行时间模块可以读取系统当前的时间(即为终端运行AI模型的起始时间,为初值,例如记为第一时间)。监控模块中的CPU占用模块可以从系统文件(例如:/sys/proc)中读取终端当前CPU的占用情况(即为终端运行AI模型之前CPU占用的初值,例如记为终端的CPU第一占用值)。监控模块中的内存占用模块可以从系统文件(例如:/sys/proc)中读取终端当前的内存的占用情况(即为终端运行AI模型之前内存占用的初值,例如记为终端的内存第一占用值)。
S103、在终端运行AI模型的过程中,继续监测终端的各项指标。
与步骤S102中方法相似,监控模块继续监测终端运行AI模型时,终端各项指标 的实时的数值。示例性的,在终端运行AI模型的过程中,终端可以重点关注CPU占用情况和内存占用情况。也就是说,监控模块中的CPU占用模块可以监测终端的CPU占用率,并由性能评估模块记录终端运行AI模型时CPU占用率。监控模块中的内存占用模块可以监测终端的内存占用率,并由性能评估模块记录终端运行AI模型时全部的内存占用率。
S104、在AI模型运行结束之后,读取终端的各项指标的终值。
与步骤S102中方法相似,在终端运行AI模型之后,监控模块读取各个指标的终值。示例性的,监控模块中的电池状态模块可以通过广播接收器接收系统的电量广播,以确定终端当前的电量情况(即为终端运行AI模型之后的电量值,即为第二电量值)。监控模块中的运行时间模块可以读取系统当前的时间(即为终端运行AI模型的结束时间,即为第二时间)。
S105、终端根据各项指标的初值、终值,以及终端运行AI模型的过程中的各项指标的变化情况来确定终端的AI支持能力。
在本申请的一些实施例中,终端的AI支持能力以下任一个或任几个反映终端资源消耗情况的参数:终端运行AI模型的时长(即耗时,记为:参数t),终端运行AI模型的电量消耗(即耗能,记为:参数e),终端运行AI模型的CPU占用值(即CPU能力情况,记为:参数c),以及终端运行AI模型的内存占用值(即内存效率情况,记为:参数m)。
具体的,终端运行AI模型的时长(可记为第一时长)为终端运行AI模型的结束时间(即第二时间)和终端运行AI模型的起始时间(即第一时间)的差值。
终端运行AI模型的电量消耗(可记为第一耗电量)为第一电量值(步骤S102中获取的)和第二电量值(步骤S104中获取的)的差值。
终端运行AI模型的CPU占用值可以这样确定:首先从终端运行AI模型的过程中各个时刻的CPU占用率(步骤S103中获取的)中确定出最大值,为终端运行AI模型的CPU占用的峰值(可记为终端的CPU的第二占用值)。然后,将终端运行AI模型的CPU占用的峰值和终端运行AI模型之前的CPU占用的初值(步骤S102中获取的,终端的CPU的第一占用值)的差值确定为终端运行AI模型的CPU占用值。
终端运行AI模型的内存占用情况这样确定:首先从终端运行AI模型的过程中各个时刻的内存占用率(步骤S103中获取的)中确定出最大值,为终端运行AI模型的内存占用的峰值(可记为终端的内存的第二占用值)。然后,将终端运行AI模型的内存占用的峰值和终端运行AI模型之前的内存占用的初值(步骤S102中获取的,终端的内存的第一占用值)的差值确定为终端运行AI模型的内存占用值。
在本申请的又一些实施例中,为了使得用户更加直观的了解到终端的AI支持能力的强弱,可以将终端运行AI模型的耗时、耗能、CPU占用情况以及内存占用情况转换为例如百分制,十分制等,以便用户直接了解终端的AI支持能力。
例如:可以采用公式1计算终端的AI支持能力的得分,如下:
S*exp(-(αe+βc+γm)*t)     (公式1)
其中,S为缩放常量,比如:100,那么得分最高为100。exp()为归一化函数。α,β,γ为加权常量,可以根据实验结果回归获取。e为终端运行AI模型的电量消耗 值,c为终端运行AI模型的CPU占用值,m为终端运行AI模型的内存占用值,t为终端运行AI模型的时长。
需要说明的是,由公式1可见,终端的运行时长、能耗、CPU占用值和内存占用值越大,那么,(αe+βc+γm)*t的值越大,exp(-(αe+βc+γm)*t)的值越小,进而得分的分值越小。也就是说,得分的分值与终端的运行时长、能耗、CPU占用值和内存占用值成反比。又由于终端对AI任务支持能力与终端的运行时长、能耗、CPU占用值和内存占用值成反比,因此,得分的分值与终端对AI任务支持能力成正比。换言之,得分的分值越大,终端对AI任务支持能力越强。
还需要说明的是,α、β、γ均不等于零时,公式1为考虑了终端的耗时、耗能、CPU占用情况以及内存占用情况来确定的终端的总体的AI任务的支持能力,即总得分。进一步的,可以根据实验或经验值,以及终端中各个系统资源耗用情况,确定各项的得分相对应总得分的比例,以便确定各项得分。例如:耗时得分占总得分的50%。耗能得分、CPU能力得分和内存效率得分总共占总得分的50%。根据公式1可知:耗能得分、CPU能力得分和内存效率得分的之间的比例为α:β:γ。那么,各项的得分可以通过公式1a、公式1b、公式1c和公式1d分别计算得到。
其中,耗时得分为:总得分*50%。(公式1a)
耗能得分为:
Figure PCTCN2018103341-appb-000001
CPU能力得分为:
Figure PCTCN2018103341-appb-000002
内存效率得分为:
Figure PCTCN2018103341-appb-000003
在本申请的一些实施例中,考虑到用户对各项资源(电量、CPU、内存等)关注的重点不同,终端可以对公式1中的α、β、γ赋予不同的数值,来计算各项资源的得分。
例如:当公式1中,α=1,β=0,γ=0时,可以计算得到终端运行AI模型时的得分。也就是说,只考虑了终端的耗时和耗能,得到终端对AI任务的支持能力。当公式1中,α=0,β=1,γ=0时,可以计算得到终端运行AI模型时的CPU能力得分。也就是说,只考虑了终端的耗时和CPU占用情况,得到终端对AI任务的支持能力。当公式1中,α=0,β=0,γ=1时,可以计算得到终端运行AI模型时的内存效率得分。也就是说,只考虑了终端的耗时和内存占用情况,得到终端对AI任务的支持能力。当公式1中,γ=0,α和β均不等于零时,为只考虑终端的耗时、耗能和CPU占用情况的得分。其他情况依次类推,不再一一赘述。
在本申请的又一些实施例中,为了提高终端监测的各项指标的准确性,终端可以多次运行AI模型,分别计算每次运行AI模型时的时长、电量消耗值、CPU占用值以及内存占用值,然后将每次计算的值求平均,即用各个参数的均值来表示终端的AI支持能力。那么,终端可以采用公式2计算终端的AI支持能力的得分,如下:
S*exp(-(αE+βC+γM)*T*λ)    (公式2)
其中,S为缩放常量,比如:100,那么得分最高为100。exp()为归一化函数。 α,β,γ为加权常量,可以根据实验结果回归获取。E为终端运行AI模型的电量消耗值的平均值,C为终端运行AI模型的CPU占用值的平均值,M为终端运行AI模型的内存占用值的平均值,T为终端运行AI模型的时长的平均值。λ为平滑性指标,即每次运行AI模型的时长的标准差指标。具体的,可以根据终端每次运行AI模型的时长的标准差与λ数值的对应关系确定。例如:表一为终端每次运行AI模型的时长的标准差与λ数值的对应关系的一种示例。
表一
λ 时长的标准差
1.0 >0ms
1.05 >10ms
1.2 >50ms
1.5 >250ms
需要说明的是,由公式2可见,终端的运行时长、能耗、CPU占用值和内存占用值,那么,(αE+βC+γM)*T*λ的值越大,exp(-(αE+βC+γM)*T*λ)的值越小,进而得分的分值越小。也就是说,得分的分值与终端的运行时长、能耗、CPU占用值和内存占用值成反比。又由于终端对AI任务支持能力与终端的运行时长、能耗、CPU占用值和内存占用值成反比,因此,得分的分值与终端对AI任务支持能力成正比。换言之,得分的分值越大,终端对AI任务支持能力越强。
还需要说明的是,α、β、γ均不等于零时,公式2为考虑了终端的耗时、耗能、CPU占用情况以及内存占用情况来确定的终端的总体的AI任务的支持能力,即总得分。其中,各项得分的计算方法也可以采用各项得分占总得分的比例来计算,具体计算可参考上述相关描述,不再赘述。
在本申请的一些实施例中,考虑到用户对各项资源(电量、CPU、内存等)关注的重点不同,终端可以对公式2中的α、β、γ赋予不同的数值,来计算各项资源的得分。
例如:当公式2中,α=1,β=0,γ=0时,可以计算得到终端运行AI模型时的得分。也就是说,只考虑了终端的耗时和耗能,得到终端对AI任务的支持能力。当公式2中,α=0,β=1,γ=0时,可以计算得到终端运行AI模型时的CPU能力得分。也就是说,只考虑了终端的耗时和CPU占用情况,得到终端对AI任务的支持能力。当公式2中,α=0,β=0,γ=1时,可以计算得到终端运行AI模型时的内存效率得分。也就是说,只考虑了终端的耗时和内存占用情况,得到终端对AI任务的支持能力。当公式2中,γ=0,α和β均不等于零时,为只考虑终端的耗时、耗能和CPU占用情况的得分。其他情况依次类推,不再一一赘述。
在本申请的又一些实施例中,为了提高确认终端的AI任务的支持能力的全面性,终端可以运行多个AI模型(例如:运行训练模型和推理模型),分别计算运行每个AI模型时的时长、电量消耗值、CPU占用值以及内存占用值,然后将针对每个AI模型计算的值求平均,以表示终端的AI支持能力。那么,终端可以采用公式3计算终端的AI支持能力的得分,如下:
Figure PCTCN2018103341-appb-000004
其中,S为缩放常量,比如:100,那么得分最高为100。exp()为归一化函数。α,β,γ为加权常量,可以根据实验结果回归获取。N为终端总共运行的AI模型的数量。Ei为终端运行第i个AI模型的电量消耗值的平均值,Ci为终端运行第i个AI模型的CPU占用值的平均值,Mi为终端运行第i个AI模型的内存占用值的平均值,Ti为终端运行AI模型的时长的平均值,λi为终端运行第i个AI模型的时长的标准差。因此,
Figure PCTCN2018103341-appb-000005
为终端运行N个AI模型后,对终端运行这N个AI模型的支持能力求均值。
需要说明的是,由公式3可见,终端的运行时长、能耗、CPU占用值和内存占用值,那么,
Figure PCTCN2018103341-appb-000006
的值越大,
Figure PCTCN2018103341-appb-000007
Figure PCTCN2018103341-appb-000008
的值越小,进而得分的分值越小。也就是说,得分的分值与终端的运行时长、能耗、CPU占用值和内存占用值成反比。又由于终端对AI任务支持能力与终端的运行时长、能耗、CPU占用值和内存占用值成反比,因此,得分的分值与终端对AI任务支持能力成正比。换言之,得分的分值越大,终端对AI任务支持能力越强。
还需要说明的是,α、β、γ均不等于零时,公式3为考虑了终端的耗时、耗能、CPU占用情况以及内存占用情况来确定的终端的总体的AI任务的支持能力,即总得分。其中,各项得分的计算方法也可以采用各项得分占总得分的比例来计算,具体计算可参考上述相关描述,不再赘述。
在本申请的一些实施例中,考虑到用户对各项资源(电量、CPU、内存等)关注的重点不同,终端可以对公式1中的α、β、γ赋予不同的数值,来计算各项资源的得分。
例如:当公式3中,α=1,β=0,γ=0时,可以计算得到终端运行AI模型时的得分。也就是说,只考虑了终端的耗时和耗能,得到终端对AI任务的支持能力。当公式3中,α=0,β=1,γ=0时,可以计算得到终端运行AI模型时的CPU能力得分。也就是说,只考虑了终端的耗时和CPU占用情况,得到终端对AI任务的支持能力。当公式3中,α=0,β=0,γ=1时,可以计算得到终端运行AI模型时的内存效率得分。也就是说,只考虑了终端的耗时和内存占用情况,得到终端对AI任务的支持能力。当公式3中,γ=0,α和β均不等于零时,为只考虑终端的耗时、耗能和CPU占用情况的得分。其他情况依次类推,不再一一赘述。
举例来说,假设α=0.7,β=0.1,γ=0.2。运行一个CNN模型,即N=1。运行该CNN模型前,电量为3000mwh(总量4000mwh),CPU占用为30%,内存消耗为1GB(总可用RAM4GB)。CNN模型运行了100次,平均每次消耗电量为200mwh,平均每次运行时长为200ms,时长的标准差为60ms,CNN运行过程中CPU占用值的平均值为80%,内存占用值的平均值为1.2GB(总量RAM4GB)。
那么,E=200mwh/4000mwh=5%,C=50%,M=0.2GB/4GB=5%,假设α=0.7,β=0.1,γ=0.2,最后得分100*exp(-0.41*0.2*1.2)=90.6分。
其中,耗时得分为90.6*50%=45.3分;耗能得分为0.7/(0.7+0.1+0.2)*50%*90.6=31.71分;CPU能力得分为0.1/(0.7+0.1+0.2)*50%*90.6=4.53分;内存效率得分为0.2/(0.7+0.1+0.2)*50%*90.6=9.06分。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因 此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (16)

  1. 一种评测方法,其特征在于,包括:
    终端显示第一界面,所述第一界面包括第一按钮;
    所述终端检测到用户对所述第一按钮的第一操作,所述终端运行第一人工智能模型;
    所述终端显示第二界面,所述第二界面包括第一信息;所述第一信息为所述终端根据所述终端运行所述第一人工智能模型的第一时长,以及所述终端运行所述第一人工智能模型的第一耗电量确定。
  2. 根据权利要求1所述的评测方法,其特征在于,还包括:
    所述终端获取第一时间、第二时间、第一电量值和第二电量值;其中,所述第一时间为所述终端运行第一人工智能模型的开始时间;所述第一电量值为在所述第一时间所述终端的电量值;所述第二时间为所述终端运行第一人工智能模型的结束时间;所述第二电量值为在所述第二时间所述终端的电量值;
    所述终端确定所述第二时间和所述第一时间的差值为所述第一时长,确定所述第一电量值和所述第二电量值为所述第一耗电量。
  3. 根据权利要求1或2所述的评测方法,其特征在于,还包括:
    所述终端获取所述终端的中央处理单元CPU第一占用值和所述终端的CPU第二占用值;其中,所述终端的CPU第一占用值为所述终端开始运行所述第一人工智能模型时所述终端的CPU占用值;所述终端的CPU第二占用值为所述终端运行所述第一人工智能模型过程中所述终端的CPU占用值的最大值;
    所述终端根据所述第一时长、所述第一耗电量、以及所述终端的CPU第二占用值和所述终端的CPU第一占用值的差值确定所述第一信息。
  4. 根据权利要求1-3任一项所述的评测方法,其特征在于,还包括:
    所述终端获取所述终端的内存第一占用值和所述终端的内存第二占用值;其中,所述终端的内存第一占用值为所述终端开始运行所述第一人工智能模型时所述终端的内存占用值;所述终端的内存第二占用值为所述终端运行所述第一人工智能模型过程中所述终端的内存占用值的最大值;
    所述终端根据所述第一时长、所述第一耗电量、以及所述终端的内存第二占用值和所述终端的内存第一占用值的差值确定所述第一信息。
  5. 根据权利要求1-4任一项所述的评测方法,其特征在于,所述第一人工智能模型包括训练模型和推理模型中至少一个。
  6. 根据权利要求5所述的评测方法,其特征在于,所述训练模型包括概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法中的至少一个;所述推理模型包括概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法中的至少一个。
  7. 根据权利要求6所述的评测方法,其特征在于,所述第二界面还包括第二信息,所述第二信息为所述终端运行所述第一人工智能模型中至少一个算法的时长。
  8. 根据权利要求1-7任一项所述的评测方法,其特征在于,所述第二界面还包括第三信息,所述第三信息为所述终端运行所述第一人工智能模型过程中至少两个时刻 的电量值、至少两个时刻的CPU占用值和至少两个时刻的内存占用值中的至少一项。
  9. 一种终端,其特征在于,包括:处理器和显示屏,所述显示屏与所述处理器耦合;
    所述显示屏,用于显示第一界面,所述第一界面包括第一按钮;
    所述处理器,用于响应于检测到用户对所述第一按钮的第一操作,运行第一人工智能模型;
    所述显示屏,用于显示第二界面,所述第二界面包括第一信息;所述第一信息为所述终端根据所述终端运行所述第一人工智能模型的第一时长,以及所述终端运行所述第一人工智能模型的第一耗电量确定。
  10. 根据权利要求9所述的终端,其特征在于,
    所述处理器,用于获取第一时间、第二时间、第一电量值和第二电量值;其中,所述第一时间为所述终端运行第一人工智能模型的开始时间;所述第一电量值为在所述第一时间时所述终端的电量值;所述第二时间为所述终端运行第一人工智能模型的结束时间;所述第二电量值为在所述第二时间时所述终端的电量值;
    确定所述第二时间和所述第一时间的差值为所述第一时长,确定所述第一电量值和所述第二电量值为所述第一耗电量。
  11. 根据权利要求9或10所述的终端,其特征在于,
    所述处理器,还用于获取所述终端的中央处理单元第一CPU占用值和所述终端的CPU第二占用值;其中,所述终端的CPU第一占用值为所述终端开始运行所述第一人工智能模型时所述终端的CPU占用值;所述终端的CPU第二占用值为所述终端运行所述第一人工智能模型过程中所述终端的CPU占用值的最大值;
    根据所述第一时长、所述第一耗电量、以及所述终端的CPU第二占用值和所述终端的CPU第一占用值的差值确定所述第一信息。
  12. 根据权利要求9-11任一项所述的终端,其特征在于,
    所述处理器,还用于获取所述终端的内存第一占用值和所述终端的内存第二占用值;其中,所述终端的内存第一占用值为所述终端开始运行所述第一人工智能时所述终端的内存占用值;所述终端的内存第二占用值为所述终端运行所述第一人工智能模型过程中所述终端的内存占用值的最大值;
    根据所述第一时长、所述第一耗电量、以及所述终端的内存第二占用值和所述终端的内存第一占用值的差值确定所述第一信息。
  13. 根据权利要求9-12任一项所述的终端,其特征在于,所述第一人工智能模型包括训练模型和推理模型中至少一个。
  14. 根据权利要求13所述的终端,其特征在于,所述训练模型包括概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法中至少一个;所述推理模型包括概率算法、树形算法、聚类算法、卷积神经网络CNN算法和递归神经网络RNN算法中至少一个。
  15. 根据权利要求14所述的终端,其特征在于,所述第二界面还包括第二信息,所述第二信息为所述终端运行所述第一人工智能模型中至少一个算法的时长。
  16. 根据权利要求9-15任一项所述的终端,其特征在于,所述第二界面还包括第 三信息,所述第三信息为所述终端运行所述第一人工智能模型过程中至少两个时刻的电量值、至少两个时刻的CPU占用值和至少两个时刻的内存占用值中的至少一项。
PCT/CN2018/103341 2018-08-30 2018-08-30 一种终端对ai任务支持能力的评测方法及终端 WO2020042112A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/103341 WO2020042112A1 (zh) 2018-08-30 2018-08-30 一种终端对ai任务支持能力的评测方法及终端
CN201880093501.5A CN112204532A (zh) 2018-08-30 2018-08-30 一种终端对ai任务支持能力的评测方法及终端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/103341 WO2020042112A1 (zh) 2018-08-30 2018-08-30 一种终端对ai任务支持能力的评测方法及终端

Publications (1)

Publication Number Publication Date
WO2020042112A1 true WO2020042112A1 (zh) 2020-03-05

Family

ID=69643357

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103341 WO2020042112A1 (zh) 2018-08-30 2018-08-30 一种终端对ai任务支持能力的评测方法及终端

Country Status (2)

Country Link
CN (1) CN112204532A (zh)
WO (1) WO2020042112A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023088241A1 (zh) * 2021-11-16 2023-05-25 华为技术有限公司 一种人工智能ai通信方法及装置
WO2024017074A1 (zh) * 2022-07-21 2024-01-25 华为技术有限公司 一种通信方法及通信装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115835182A (zh) * 2021-09-16 2023-03-21 华为技术有限公司 一种人工智能ai通信方法及装置
CN115835185A (zh) * 2021-09-18 2023-03-21 华为技术有限公司 一种人工智能模型下载方法、装置及系统
WO2023230969A1 (zh) * 2022-06-01 2023-12-07 北京小米移动软件有限公司 人工智能模型的确定方法及装置、通信设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100169154A1 (en) * 2008-12-29 2010-07-01 Nokia Corporation System and associated method for product selection
CN103701970A (zh) * 2013-12-04 2014-04-02 中国科学院深圳先进技术研究院 一种移动终端的耗电提示方法、装置及移动终端
CN105467329A (zh) * 2016-01-25 2016-04-06 上海斐讯数据通信技术有限公司 一种终端续航测试系统和方法
CN106649024A (zh) * 2016-09-22 2017-05-10 微梦创科网络科技(中国)有限公司 一种应用性能实时监控方法及装置
CN106708696A (zh) * 2016-07-01 2017-05-24 腾讯科技(深圳)有限公司 一种检测移动终端应用程序中函数耗电量的方法及装置
CN107203472A (zh) * 2017-05-24 2017-09-26 广州久邦世纪科技有限公司 一种应用程序测试系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130236878A1 (en) * 2012-03-12 2013-09-12 Alexey Saltanov Method for Testing and Developing Intelligence
CN106201898B (zh) * 2016-07-26 2018-12-04 北京班墨科技有限责任公司 一种基于人工智能的测试软件的方法及装置
CN108388426A (zh) * 2018-04-27 2018-08-10 李喜 一种人工智能开发平台和系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100169154A1 (en) * 2008-12-29 2010-07-01 Nokia Corporation System and associated method for product selection
CN103701970A (zh) * 2013-12-04 2014-04-02 中国科学院深圳先进技术研究院 一种移动终端的耗电提示方法、装置及移动终端
CN105467329A (zh) * 2016-01-25 2016-04-06 上海斐讯数据通信技术有限公司 一种终端续航测试系统和方法
CN106708696A (zh) * 2016-07-01 2017-05-24 腾讯科技(深圳)有限公司 一种检测移动终端应用程序中函数耗电量的方法及装置
CN106649024A (zh) * 2016-09-22 2017-05-10 微梦创科网络科技(中国)有限公司 一种应用性能实时监控方法及装置
CN107203472A (zh) * 2017-05-24 2017-09-26 广州久邦世纪科技有限公司 一种应用程序测试系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023088241A1 (zh) * 2021-11-16 2023-05-25 华为技术有限公司 一种人工智能ai通信方法及装置
WO2024017074A1 (zh) * 2022-07-21 2024-01-25 华为技术有限公司 一种通信方法及通信装置

Also Published As

Publication number Publication date
CN112204532A (zh) 2021-01-08

Similar Documents

Publication Publication Date Title
CN110134316B (zh) 模型训练方法、情绪识别方法及相关装置和设备
RU2766255C1 (ru) Способ голосового управления и электронное устройство
CN110910872B (zh) 语音交互方法及装置
CN113704014B (zh) 日志获取系统、方法、电子设备及存储介质
WO2020042112A1 (zh) 一种终端对ai任务支持能力的评测方法及终端
CN111316199B (zh) 一种信息处理方法及电子设备
WO2022127787A1 (zh) 一种图像显示的方法及电子设备
WO2021258814A1 (zh) 视频合成方法、装置、电子设备及存储介质
WO2020259554A1 (zh) 可进行学习的关键词搜索方法和电子设备
CN113704205B (zh) 日志存储的方法、芯片、电子设备和可读存储介质
WO2021052139A1 (zh) 手势输入方法及电子设备
CN113254409A (zh) 文件共享方法、系统及相关设备
WO2021218429A1 (zh) 应用窗口的管理方法、终端设备及计算机可读存储介质
WO2021169370A1 (zh) 服务元素的跨设备分配方法、终端设备及存储介质
WO2021155709A1 (zh) 一种充电控制方法及电子设备
CN113805797A (zh) 网络资源的处理方法、电子设备及计算机可读存储介质
CN111835904A (zh) 一种基于情景感知和用户画像开启应用的方法及电子设备
WO2023273543A1 (zh) 一种文件夹管理方法及装置
CN114546511A (zh) 插件管理方法、系统及装置
WO2022166435A1 (zh) 分享图片的方法和电子设备
CN115333941A (zh) 获取应用运行情况的方法及相关设备
CN113284585A (zh) 数据展示方法、终端设备及存储介质
CN113407300B (zh) 应用误杀评估方法及相关设备
CN113380240B (zh) 语音交互方法和电子设备
WO2022111640A1 (zh) 应用分类方法、电子设备及芯片系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18932067

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18932067

Country of ref document: EP

Kind code of ref document: A1