CN113873083A - Duration determination method and device, electronic equipment and storage medium - Google Patents

Duration determination method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113873083A
CN113873083A CN202111125984.2A CN202111125984A CN113873083A CN 113873083 A CN113873083 A CN 113873083A CN 202111125984 A CN202111125984 A CN 202111125984A CN 113873083 A CN113873083 A CN 113873083A
Authority
CN
China
Prior art keywords
power consumption
feature vector
feature vectors
data
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111125984.2A
Other languages
Chinese (zh)
Inventor
吴建文
帅朝春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Douku Software Technology Co Ltd
Original Assignee
Hangzhou Douku Software Technology Co Ltd
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 Hangzhou Douku Software Technology Co Ltd filed Critical Hangzhou Douku Software Technology Co Ltd
Priority to CN202111125984.2A priority Critical patent/CN113873083A/en
Publication of CN113873083A publication Critical patent/CN113873083A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/263Arrangements for using multiple switchable power supplies, e.g. battery and AC
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a duration determining method, a duration determining device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring use behavior data of the electronic equipment in a preset time period; constructing a first feature vector according to the using behavior data; matching the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, wherein the preset feature vector library comprises Q second feature vectors, each second feature vector corresponds to the use behavior data of the electronic equipment in a historical time period, and the Q second feature vectors comprise the P second feature vectors; acquiring power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data; acquiring current residual electric quantity; and determining the remaining endurance time of the electronic equipment according to the current remaining power and the P groups of power consumption data. By the adoption of the method and the device, accuracy of duration estimation can be improved.

Description

Duration determination method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a duration determination method and apparatus, an electronic device, and a storage medium.
Background
In the prior art, due to the problem of battery loss, a user of an electronic device (for example, a mobile phone) has difficulty in estimating how long the user can use the electric quantity of the user, and is difficult to perform limited electric quantity planning. The battery loss is different along with the battery service time, the electric quantity display is the percentage, the power consumption time of the same percentage reaches different discharge stages of the battery, the power consumption time cannot be quantitatively calculated due to different battery loss degrees, and the duration calculation is inaccurate, so that the problem of improving the accuracy of the duration estimation is urgently solved.
Disclosure of Invention
The embodiment of the application provides a duration determination method and device, electronic equipment and a storage medium, and the accuracy of duration estimation can be improved.
In a first aspect, an embodiment of the present application provides a duration determining method, where the method includes:
acquiring use behavior data of the electronic equipment in a preset time period;
constructing a first feature vector according to the using behavior data;
matching the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, wherein the preset feature vector library comprises Q second feature vectors, each second feature vector corresponds to the use behavior data of the electronic equipment in a historical time period, the Q second feature vectors comprise the P second feature vectors, and the P and the Q are positive integers;
acquiring power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data;
acquiring current residual electric quantity;
and determining the remaining endurance time of the electronic equipment according to the current remaining power and the P groups of power consumption data.
In a second aspect, an embodiment of the present application provides a duration determining apparatus, where the apparatus includes: an acquisition unit, a construction unit, a matching unit and a determination unit, wherein,
the acquisition unit is used for acquiring the use behavior data of the electronic equipment in a preset time period;
the construction unit is used for constructing a first feature vector according to the using behavior data;
the matching unit is configured to match the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with a highest matching degree, where the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to usage behavior data of the electronic device in a historical time period, the Q second feature vectors include the P second feature vectors, and P and Q are positive integers;
the acquiring unit is further configured to acquire power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data; acquiring the current residual electric quantity;
the determining unit is used for determining the remaining endurance time of the electronic equipment according to the current remaining power and the P groups of power consumption data.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory for storing one or more programs and configured to be executed by the processor, the program including instructions for performing the steps in the method according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that, in the endurance determining method, apparatus, electronic device, and storage medium described in the embodiments of the present application, usage behavior data of the electronic device in a preset time period is obtained, a first feature vector is constructed according to the usage behavior data, the first feature vector is matched with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to usage behavior data of the electronic device in a historical time period, the Q second feature vectors include P second feature vectors, P, Q are positive integers, power consumption data corresponding to the P second feature vectors is obtained to obtain P groups of data, obtain current remaining power consumption, and determine remaining endurance of the electronic device according to the current remaining power consumption and the P groups of power consumption data, therefore, the power consumption curve closest to the power consumption curve in the historical data can be found out according to the using behavior of the user using the electronic equipment, the remaining endurance time can be estimated based on the power consumption curve and the current remaining power, the available time of the remaining power can be calculated more accurately, and therefore the accuracy of estimating the endurance time can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
fig. 3A is a schematic flowchart of a endurance duration determining method according to an embodiment of the present application;
fig. 3B is a schematic diagram illustrating a power consumption curve provided by an embodiment of the present application;
fig. 4 is a schematic flowchart of another endurance duration determining method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 is a block diagram of functional units of a duration determination device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
In order to better understand the scheme of the embodiments of the present application, the following first introduces the related terms and concepts that may be involved in the embodiments of the present application.
In the embodiment of the present application, the electronic device may include various devices having a communication function, for example, a smart phone, a vehicle-mounted device, a wearable device, a charging apparatus (such as a power bank), a smart watch, smart glasses, a wireless bluetooth headset, a computing device or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), a Mobile Station (MS), a virtual reality/augmented reality device, a terminal device (terminal device), and the like, where the electronic device may also be a base Station or a server.
In a first section, the software and hardware operating environment of the technical solution disclosed in the present application is described as follows.
As shown, fig. 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a compass 190, a motor 191, a pointer 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an application processor AP, a modem processor, a graphics processor GPU, an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural network processor NPU, among others. Wherein the different processing units may be separate components or may be integrated in one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110. The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to complete the control of instruction fetching and instruction execution. In other embodiments, a memory may also be provided in processor 110 for storing instructions and data. Illustratively, the memory in the processor 110 may be a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from memory. This avoids repeated accesses and reduces the latency of the processor 110, thereby increasing the efficiency with which the electronic device 100 processes data or executes instructions. The processor may also include an image processor, which may be an image Pre-processor (Pre-ISP), which may be understood as a simplified ISP, which may also perform some image processing operations.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a SIM card interface, a USB interface, and/or the like. The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. The USB interface 130 may also be used to connect to a headset to play audio through the headset.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G/6G, etc. applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (blue tooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an 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 alter display information.
The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel may be an LCD, an OLED, an active-matrix organic light emitting diode (AMOLED), a Flexible Light Emitting Diode (FLED), a mini light emitting diode (mini-led), a Micro led, a Micro-oeled, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or more display screens 194.
The electronic device 100 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or more cameras 193.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
Internal memory 121 may be used to store one or more computer programs, including instructions. The processor 110 may execute the above-mentioned instructions stored in the internal memory 121, so as to enable the electronic device 100 to execute the method for displaying page elements provided in some embodiments of the present application, and various applications and data processing. The internal memory 121 may include a program storage area and a data storage area. Wherein, the storage program area can store an operating system; the storage program area may also store one or more applications (e.g., gallery, contacts, etc.), and the like. The storage data area may store data (e.g., photos, contacts, etc.) created during use of the electronic device 100, and the like. Further, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage components, flash memory components, Universal Flash Storage (UFS), and the like. In some embodiments, the processor 110 may cause the electronic device 100 to execute the method for displaying page elements provided in the embodiments of the present application and other applications and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110. The electronic device 100 may implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. Such as music playing, recording, etc.
The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., X, Y and the Z axis) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
Fig. 2 shows a block diagram of a software structure of the electronic device 100. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom. The application layer may include a series of application packages.
As shown in fig. 2, the application layer may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android Runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media libraries (media libraries), three-dimensional graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
Based on the electronic device described in fig. 1 or fig. 2, the following functions can be implemented by the electronic device:
acquiring use behavior data of the electronic equipment in a preset time period;
constructing a first feature vector according to the using behavior data;
matching the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, wherein the preset feature vector library comprises Q second feature vectors, each second feature vector corresponds to the use behavior data of the electronic equipment in a historical time period, the Q second feature vectors comprise the P second feature vectors, and the P and the Q are positive integers;
acquiring power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data;
acquiring current residual electric quantity;
and determining the remaining endurance time of the electronic equipment according to the current remaining power and the P groups of power consumption data.
It can be seen that, in the endurance determining method described in the embodiment of the present application, usage behavior data of the electronic device in a preset time period is obtained, a first feature vector is constructed according to the usage behavior data, the first feature vector is matched with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to the usage behavior data of the electronic device in a historical time period, the Q second feature vectors include P second feature vectors, P, Q are positive integers, power consumption data corresponding to the P second feature vectors are obtained to obtain P sets of power consumption data, a current remaining energy is obtained, the remaining endurance of the electronic device is determined according to the current remaining energy and the P sets of power consumption data, so that a curve closest to the power consumption data in the historical data can be found according to the usage behavior of the electronic device by a user, and estimating the remaining endurance time based on the power consumption curve and the current remaining power, and calculating the available time of the remaining power more accurately, so that the estimation accuracy of the endurance time can be improved.
In the second section, the endurance determination method and apparatus disclosed in the embodiments of the present application are introduced as follows.
Referring to fig. 3A, fig. 3A is a schematic flow chart of a duration determination method provided in an embodiment of the present application, and is applied to an electronic device, where as shown in the figure, the duration determination method includes:
301. acquiring the use behavior data of the electronic equipment in a preset time period.
Wherein, the preset time period can be set by the user or the default of the system. The preset time period may be a period of time before the current time point. In specific implementation, the use condition of the electronic equipment can be recorded through the background, and then, the use behavior data of the electronic equipment in a preset time period can be acquired.
Optionally, the usage behavior data includes at least one of: the screen-on duration, the screen-on and screen-off times, the unlocking times, the application use conditions, the activity conditions, and the like, which are not limited herein.
Wherein, the application use case may include but is not limited to: the number of application uses, the duration of the game, the duration of the video, the duration of the reading, etc., which are not limited herein. The activity profile may include, but is not limited to: walking time, running time, pick-up/drive vehicle time, stationary time, etc.
302. A first feature vector is constructed from the usage behavior data.
In the embodiment of the application, the usage behavior data includes multiple dimensions, and then the usage behavior data can be classified, and then multiple types of usage behavior data can be obtained, a feature vector of one dimension can be constructed based on each type of usage behavior data, specifically, feature extraction is performed on each type of usage behavior data, and then the feature vector is constructed based on the extracted features.
Optionally, in the step 302, constructing the first feature vector according to the usage behavior data may include the following steps:
21. dividing the using behavior data into a plurality of segments according to the time sequence to obtain a plurality of segment using behavior data;
22. converting each piece of use behavior data in the plurality of pieces of use behavior data into a feature vector of at least one dimension to obtain a plurality of feature vectors;
23. constructing the first feature vector from the plurality of feature vectors.
In specific implementation, the electronic device may divide the usage behavior data into a plurality of segments according to a time sequence to obtain a plurality of segments of usage behavior data, for example, the plurality of segments of usage behavior data may be divided in units of hours, or, of course, in units of half an hour, and then convert each segment of usage behavior data in the plurality of segments of usage behavior data into a feature vector of at least one dimension to obtain a plurality of feature vectors, and finally construct the first feature vector according to the plurality of feature vectors.
For example, a day may be divided into 1 hour and one segment, and the user behavior of each segment is denoted by dj (j to j +1 hour, 0 ═ j < (23)), then a day may be denoted by Di ═ d0, d 1.., d23], 0 ═ i < ═ n-1, and n denotes how many days there are historical data. The daily power consumption is denoted by Bi, which is likewise divided into 24 parts, Bi ═ b0, b 1.., b 23; each Di has a Bi corresponding to it, and dj corresponds to bj one to one, i.e. the power consumption value generated by each user behavior segment dj is bj.
Further, the user behavior dj in each hour is [ screen dur, screen num, unlockNum, AppInfo, ActivityInfo ], screen dur indicates the on-screen duration in the hour, screen-off times in the hour, unlockNum indicates the off-screen times in the hour, AppInfo indicates the application usage in the hour, and ActivityInfo indicates the activity in the hour.
The AppInfo application usage may include, but is not limited to: the number of application uses, the duration of the game, the duration of the video, the duration of the reading, etc., which are not limited herein. Namely AppInfo ═ AppUsageCount, AppSetNum, Gaming, Video, Reading. Additionally, ActivityInfo activity scenarios may include, but are not limited to: walking length, running length, boarding/driving vehicle length, stationary length, etc., without limitation. Namely ActivityInfo [ walk, running, transfer, still ].
Furthermore, the user usage behavior data in each hour may be expressed as a vector dj ═ screenDur, screenNum, unlockNum, AppUsageCount, AppSetNum, Gaming, Video, Reading, walk, running, transportation, still ], and then in the embodiment of the present application, the dimensions of the vector may include, but are not limited to: the screen-on duration, the screen-on and screen-off times, the unlocking times, the application use conditions, the activity conditions, and the like, which are not limited herein.
303. And matching the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, wherein the preset feature vector library comprises Q second feature vectors, each second feature vector corresponds to the use behavior data of the electronic equipment in a historical time period, the Q second feature vectors comprise the P second feature vectors, and the P and the Q are positive integers.
In this embodiment of the present application, the preset feature vector library may include Q second feature vectors, each second feature vector corresponds to usage behavior data of the electronic device in a historical time period, Q is a positive integer, and the historical time period may be any day 24 hours before the current time point.
In concrete implementation, taking a mobile phone as an example, an abstract historical mobile phone usage behavior of a user can be quantized and a feature vector library can be constructed, and meanwhile, each feature vector can be mapped to a power consumption value corresponding to the history, so that when the remaining available time of the electric quantity is predicted, only one or more candidate feature vectors which are most matched with the behavior feature vectors are found from the historical feature vector library in a mode of pattern matching/similarity algorithm according to the behavior feature vectors which are currently generated by the user. And calculating the predicted amount of used electric quantity values according to the historical behavior development in a weighting mode according to the matched candidate characteristic vectors and the corresponding electric consumption values thereof, and deducing the approximate remaining available time by combining the current remaining electric quantity values of the mobile phone.
For example, a vector set C ═ D0, D1, D2,. Di, Di +1,. and Dn-1} of several days may be obtained according to the above processing steps according to the usage behavior data, where n represents history data of how many days there are, and Di ═ D0, D1,. and dj, dj +1,. and D23], where dj represents user behavior within a small period (j to j +1 hour, 0 ═ j < 23); dj ═ screen dur, screen num, unlockNum, AppUsageCount, AppSetNum, Gaming, Video, Reading, walk, running, transportation, still ]. Thus, Di is a 24 m two-dimensional vector, with m representing the number of dimensions of the feature. Meanwhile, each Di can have a corresponding Bi which represents the power consumption and is 24-dimensional.
304. And acquiring power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data.
For example, the second feature vector is a feature vector between 6 and 8 days of 8 months and 30 days, and the power consumption data of the whole day of 8 months and 30 days can be obtained.
305. And acquiring the current residual electric quantity.
The electronic equipment can monitor the real-time electric quantity of the electronic equipment, and then can acquire the current residual electric quantity.
306. And determining the remaining endurance time of the electronic equipment according to the current remaining power and the P groups of power consumption data.
Wherein, the power consumption data reflects the habit of the user using the electronic equipment to a certain extent. The P groups of power consumption data can predict the use behavior of the user after the current time point, and due to the fact that the habit of the user has regularity under most conditions, the condition that the user uses the electronic equipment also has regularity, when the P is larger than 1, the endurance time is predicted through the multiple groups of power consumption data, the accidental influence can be reduced, and then the power consumption change can be accurately predicted.
In specific implementation, power consumption data corresponding to a preset time period can be found in the P-group power consumption data, the power consumption situation of the P-group power consumption data after the preset time period can be obtained, the estimation of the endurance duration is realized based on the current remaining power and the power consumption situation, and certainly, the endpoint time of the current time period can also correspond to the current time point.
Optionally, in step 306, determining the remaining duration of the electronic device according to the current remaining power and the P groups of power consumption data may include the following steps:
61. determining P power consumption curves according to the P groups of power consumption data, wherein each group of power consumption data corresponds to one power consumption curve;
62. determining a target power consumption curve according to the P power consumption curves;
63. acquiring a current time point;
64. intercepting a reference power consumption curve behind the current time point in the target power consumption curve according to the current time point;
65. and determining the remaining endurance time according to the current remaining power and the reference power consumption curve.
In a specific implementation, the electronic device may determine P power consumption curves according to P groups of power consumption data, where each group of power consumption data corresponds to one power consumption curve, and a horizontal axis of each power consumption curve is time and a vertical axis of each power consumption curve is power consumption, as shown in fig. 3B, the horizontal axis of each power consumption curve is time and the vertical axis of each power consumption curve is power consumption. The target power consumption curve may be determined based on the P power consumption curves, and for example, the P power consumption curves may be weighted to obtain the target power consumption curve. Furthermore, the current time point can be obtained, a reference power consumption curve after the current time point in the target power consumption curve is captured according to the current time point, the reference power consumption curve can reflect behavior of some used electronic devices after the current time point, and further, the remaining endurance time can be determined according to the current remaining power and the reference power consumption curve, that is, the time of the current remaining power user can be calculated by combining the reference power consumption curve, and the time length between the time and the current time point is the remaining endurance time.
Further, optionally, in the step 62, determining the target power consumption curve according to the P power consumption curves may include the following steps:
621. distributing a weight to each power consumption curve in the P power consumption curves to obtain P weights;
622. and performing weighting operation according to the P weights and the P power consumption curves to obtain the target power consumption curve.
In a specific implementation, the electronic device may assign a weight to each power consumption curve in the P power consumption curves to obtain P weights, for example, the weights of all the power consumption curves may be set to be 1/P, and then perform weighting operation according to the P weights and the P power consumption curves to obtain a target power consumption curve.
Further, optionally, in the step 621, allocating a weight to each power consumption curve in the P power consumption curves to obtain P weights, which may include the following steps:
a1, obtaining the environment parameter of each power consumption curve in the P power consumption curves to obtain P environment parameters;
a2, determining an influence factor corresponding to each environmental parameter in the P environmental parameters to obtain P influence factors;
a3, determining the P weights according to the P influence factors.
In this embodiment, the environmental parameter may include at least one of the following: ambient temperature, ambient humidity, magnetic field disturbance power, weather, geographic location, atmospheric pressure, and the like, without limitation. For example, the power consumption rate may be affected to some extent by different ambient temperatures.
In specific implementation, the electronic device may record its environmental parameters constantly, and further, the electronic device may obtain an environmental parameter of each power consumption curve in P power consumption curves to obtain P environmental parameters, a mapping relationship between preset environmental parameters and impact factors may be stored in the electronic device in advance, a value range of the impact factors may be 0-1, and further, an impact factor corresponding to each environmental parameter in the P environmental parameters may be determined to obtain P impact factors, and then P weights may be determined according to the P impact factors, specifically, a sum of the P impact factors may be determined, an occupation ratio between each impact factor and the sum may be determined, and the occupation ratio may be used as a weight, where the larger the impact factor is, the larger the weight is. Due to the consideration of the influence of environmental factors, the final power consumption curve is realized according with the actual situation.
Further, optionally, in the step 621, allocating a weight to each power consumption curve in the P power consumption curves to obtain P weights, which may include the following steps:
b1, acquiring the time points of the P power consumption curves to obtain P time points;
b2, determining the difference between each time point in the P time points and the current time point to obtain a plurality of differences;
b3, determining the importance corresponding to each difference value in the P difference values to obtain P importance values;
and B4, determining the P weight values according to the P importance degrees.
In a specific implementation, the electronic device may obtain time points of P power consumption curves to obtain P time points, for example, a time point at a middle point of a time period corresponding to each power consumption curve may be used as a time point corresponding to the power consumption curve, a difference between each time point of the P time points and a current time point is determined to obtain a plurality of differences, the higher the importance is, the larger the difference is, the lower the importance is, a mapping relationship between a preset difference and the importance may be stored in advance, the importance corresponding to each difference of the P differences is determined based on the mapping relationship to obtain P importance, the smaller the difference is, P weights are determined according to the P importance, a sum of the P importance may be determined, an occupation ratio between each importance and the sum is determined, and the occupation ratio may be used as a weight. Due to the fact that time influence is considered, namely the closer the current time is, the corresponding power consumption curve is more consistent with user habits, and further the final power consumption curve is more consistent with actual conditions.
For example, when performing the available duration prediction, a feature vector u of the user behavior in a period before the prediction is calculated, and if the prediction is triggered at 11 points, a feature vector u of 8-10 points can be calculated, where u is [ d8, d9, d10 ]]And then finding the first 5 subvectors { D) which are closest to the user behavior characteristic vector u in a period of time before prediction from the historical vector set C through a similarity matching algorithmt1,Dt2,Dt3,Dt4,Dt5Finding 5-day data with 8-10 points closest to the vector u in the feature library as described above, and finding out top5 subvectors corresponding to one power consumption vector Bi one by one, namely finding out 5-day power consumption situations Btop5 and Bt1,Bt2,Bt3,Bt4,Bt5Calculating the predicted power consumption of each hour by weighted average of Btop5 according to the similarity condition, and calculating the resultThe available time of the residual electric quantity of the mobile phone can be calculated according to the current residual electric quantity and the time point.
In practical application, due to the problem of battery loss, it is difficult for a mobile phone user to estimate how long the own electric quantity can be used, and it is difficult to perform limited electric quantity planning. The battery loss is different along with the battery service time, the electric quantity display is in percentage, the power consumption time with the same percentage reaches different discharging stages of the battery, the power consumption time cannot be quantitatively calculated due to different battery loss degrees, the traditional scheme adopts a layered and graded quantitative estimation mode, the use behavior condition of a user is not considered, and the calculation of the power consumption time is inaccurate. In specific implementation, the embodiment of the application can construct a behavior feature vector of a user every day based on the mobile phone using behaviors (such as screen-on duration, screen-on and screen-off times, unlocking times, application using conditions, activity conditions and the like) of the user; the degree of battery depletion is almost constant/varies little over a short time window (e.g., 1 month), and the power consumption of the mobile phone due to similar usage behavior of the mobile phone should be approximately comparable.
In the embodiment of the application, the top5 power consumption curve closest to the mobile phone usage behavior in the historical data can be found out according to the mobile phone usage behavior of the user, so that the power consumption estimation in each hour can be more accurate (under the current behavior situation of the user), and the available time of the remaining power can be more accurately calculated.
In the embodiment of the application, the using behavior characteristics of the mobile phone of the user can be vectorized, the top5 characteristic vector which is most similar to the using behavior characteristics in the historical data is found through characteristic vector matching, then the power consumption estimated value in each small time period is obtained through the power consumption curve weighted average corresponding to the top5 characteristic vector, and finally the available duration of the residual power of the mobile phone can be calculated by combining the residual power and the time point. Of course, in the embodiment of the application, a more reliable power consumption curve subset is found by considering the use behavior of the mobile phone of the user, instead of averaging all historical data, so that the remaining available time can be calculated more accurately.
It can be seen that, in the endurance determining method described in the embodiment of the present application, usage behavior data of the electronic device in a preset time period is obtained, a first feature vector is constructed according to the usage behavior data, the first feature vector is matched with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to the usage behavior data of the electronic device in a historical time period, the Q second feature vectors include P second feature vectors, P, Q are positive integers, power consumption data corresponding to the P second feature vectors are obtained to obtain P sets of power consumption data, a current remaining energy is obtained, the remaining endurance of the electronic device is determined according to the current remaining energy and the P sets of power consumption data, so that a curve closest to the power consumption data in the historical data can be found according to the usage behavior of the electronic device by a user, and estimating the remaining endurance time based on the power consumption curve and the current remaining power, and calculating the available time of the remaining power more accurately, so that the estimation accuracy of the endurance time can be improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a duration determination method provided in an embodiment of the present application, and is applied to an electronic device, where as shown in the figure, the duration determination method includes:
401. acquiring the use behavior data of the electronic equipment in a preset time period.
402. A first feature vector is constructed from the usage behavior data.
403. And matching the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, wherein the preset feature vector library comprises Q second feature vectors, each second feature vector corresponds to the use behavior data of the electronic equipment in a historical time period, the Q second feature vectors comprise the P second feature vectors, and the P and the Q are positive integers.
404. And acquiring power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data.
405. And acquiring the current residual capacity and the current time point.
406. And determining the remaining duration of the electronic equipment according to the current remaining power, the current time point and the P groups of power consumption data.
The detailed description of the steps 401 to 406 may refer to the corresponding steps of the endurance duration determining method shown in fig. 3A, which are not described herein again.
It can be seen that, in the endurance determining method described in this embodiment of the present application, usage behavior data of an electronic device in a preset time period is obtained, a first feature vector is constructed according to the usage behavior data, the first feature vector is matched with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to the usage behavior data of the electronic device in a historical time period, the Q second feature vectors include P second feature vectors, P, Q are positive integers, power consumption data corresponding to the P second feature vectors are obtained to obtain P sets of power consumption data, a current remaining energy and a current time point are obtained, and a remaining endurance of the electronic device is determined according to the current remaining energy, the current time point and the P sets of power consumption data, therefore, the power consumption curve closest to the power consumption curve in the historical data can be found out according to the using behavior of the user using the electronic equipment, the remaining endurance time can be estimated based on the power consumption curve and the current remaining power, the available time of the remaining power can be calculated more accurately, and therefore the accuracy of estimating the endurance time can be improved.
In accordance with the foregoing embodiments, please refer to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and in an embodiment of the present application, the programs include instructions for performing the following steps:
acquiring use behavior data of the electronic equipment in a preset time period;
constructing a first feature vector according to the using behavior data;
matching the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, wherein the preset feature vector library comprises Q second feature vectors, each second feature vector corresponds to the use behavior data of the electronic equipment in a historical time period, the Q second feature vectors comprise the P second feature vectors, and the P and the Q are positive integers;
acquiring power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data;
acquiring current residual electric quantity;
and determining the remaining endurance time of the electronic equipment according to the current remaining power and the P groups of power consumption data.
Optionally, in the aspect of determining the remaining duration of the electronic device according to the current remaining power and the P sets of power consumption data, the program includes instructions for performing the following steps:
determining P power consumption curves according to the P groups of power consumption data, wherein each group of power consumption data corresponds to one power consumption curve;
determining a target power consumption curve according to the P power consumption curves;
acquiring a current time point;
intercepting a reference power consumption curve behind the current time point in the target power consumption curve according to the current time point;
and determining the remaining endurance time according to the current remaining power and the reference power consumption curve.
Optionally, in the aspect of determining the target power consumption curve according to the P power consumption curves, the program includes instructions for performing the following steps:
distributing a weight to each power consumption curve in the P power consumption curves to obtain P weights;
and performing weighting operation according to the P weights and the P power consumption curves to obtain the target power consumption curve.
Optionally, in the aspect that a weight is assigned to each of the P power consumption curves to obtain P weights, the program includes instructions for executing the following steps:
acquiring the environmental parameters of each power consumption curve in the P power consumption curves to obtain P environmental parameters;
determining an influence factor corresponding to each environmental parameter in the P environmental parameters to obtain P influence factors;
and determining the P weights according to the P influence factors.
Optionally, in the aspect that a weight is assigned to each of the P power consumption curves to obtain P weights, the program includes instructions for executing the following steps:
acquiring time points of the P power consumption curves to obtain P time points;
determining a difference value between each time point in the P time points and the current time point to obtain a plurality of difference values;
determining the importance corresponding to each difference value in the P difference values to obtain P importance;
and determining the P weight values according to the P importance degrees.
Optionally, in the aspect of constructing the first feature vector according to the usage behavior data, the program includes instructions for performing the following steps:
dividing the using behavior data into a plurality of segments according to the time sequence to obtain a plurality of segment using behavior data;
converting each piece of use behavior data in the plurality of pieces of use behavior data into a feature vector of at least one dimension to obtain a plurality of feature vectors;
constructing the first feature vector from the plurality of feature vectors.
Optionally, the usage behavior data includes at least one of: the screen on-off times, the unlocking times, the application use condition and the activity condition are determined.
It can be seen that, in the electronic device described in the embodiment of the present application, usage behavior data of the electronic device in a preset time period is obtained, a first feature vector is constructed according to the usage behavior data, the first feature vector is matched with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to the usage behavior data of the electronic device in a historical time period, the Q second feature vectors include P second feature vectors, P, Q are positive integers, power consumption data corresponding to the P second feature vectors are obtained to obtain P sets of power consumption data, a current remaining power is obtained, a remaining endurance time of the electronic device is determined according to the current remaining power and the P sets of power consumption data, and therefore, a power consumption curve closest to the current remaining power in the historical data can be found according to the usage behavior of the electronic device used by a user, and estimating the remaining endurance time based on the power consumption curve and the current remaining power, and calculating the available time of the remaining power more accurately, so that the estimation accuracy of the endurance time can be improved.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 6 is a block diagram of functional units of a cruising duration determination apparatus 600 according to an embodiment of the present application. The duration determination device 600 includes: an acquisition unit 601, a construction unit 602, a matching unit 603, and a determination unit 604, wherein,
the obtaining unit 601 is configured to obtain usage behavior data of the electronic device in a preset time period;
the constructing unit 602 is configured to construct a first feature vector according to the usage behavior data;
the matching unit 603 is configured to match the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with a highest matching degree, where the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to usage behavior data of the electronic device in a historical time period, the Q second feature vectors include the P second feature vectors, and P and Q are positive integers;
the obtaining unit 601 is further configured to obtain power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data; acquiring the current residual electric quantity;
the determining unit 604 is configured to determine the remaining duration of the electronic device according to the current remaining power and the P groups of power consumption data.
Optionally, in the aspect of determining the remaining duration of the electronic device according to the current remaining power and the P groups of power consumption data, the determining unit 604 is specifically configured to:
determining P power consumption curves according to the P groups of power consumption data, wherein each group of power consumption data corresponds to one power consumption curve;
determining a target power consumption curve according to the P power consumption curves;
acquiring a current time point;
intercepting a reference power consumption curve behind the current time point in the target power consumption curve according to the current time point;
and determining the remaining endurance time according to the current remaining power and the reference power consumption curve.
Optionally, in the aspect of determining the target power consumption curve according to the P power consumption curves, the determining unit 604 is specifically configured to:
distributing a weight to each power consumption curve in the P power consumption curves to obtain P weights;
and performing weighting operation according to the P weights and the P power consumption curves to obtain the target power consumption curve.
Optionally, in the aspect that a weight is assigned to each power consumption curve in the P power consumption curves to obtain P weights, the determining unit 604 is specifically configured to:
acquiring the environmental parameters of each power consumption curve in the P power consumption curves to obtain P environmental parameters;
determining an influence factor corresponding to each environmental parameter in the P environmental parameters to obtain P influence factors;
and determining the P weights according to the P influence factors.
Optionally, in the aspect that a weight is assigned to each power consumption curve in the P power consumption curves to obtain P weights, the determining unit 604 is specifically configured to:
acquiring time points of the P power consumption curves to obtain P time points;
determining a difference value between each time point in the P time points and the current time point to obtain a plurality of difference values;
determining the importance corresponding to each difference value in the P difference values to obtain P importance;
and determining the P weight values according to the P importance degrees.
Optionally, in the aspect of constructing the first feature vector according to the usage behavior data, the determining unit 604 is specifically configured to:
dividing the using behavior data into a plurality of segments according to the time sequence to obtain a plurality of segment using behavior data;
converting each piece of use behavior data in the plurality of pieces of use behavior data into a feature vector of at least one dimension to obtain a plurality of feature vectors;
constructing the first feature vector from the plurality of feature vectors.
Optionally, the usage behavior data includes at least one of: the screen on-off times, the unlocking times, the application use condition and the activity condition are determined.
It can be seen that, the endurance determining apparatus described in the embodiment of the present application obtains the usage behavior data of the electronic device in the preset time period, constructs the first feature vector according to the usage behavior data, matches the first feature vector with the feature vectors in the preset feature vector library to obtain P second feature vectors with the highest matching degree, where the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to the usage behavior data of the electronic device in one historical time period, Q second feature vectors include P second feature vectors, P, Q are positive integers, obtains the power consumption data corresponding to P second feature vectors, obtains P groups of power consumption data, obtains the current remaining power, and determines the remaining endurance of the electronic device according to the current remaining power and the P groups of power consumption data, so that a curve closest to the power consumption in the historical data can be found according to the usage behavior of the electronic device by the user, and estimating the remaining endurance time based on the power consumption curve and the current remaining power, and calculating the available time of the remaining power more accurately, so that the estimation accuracy of the endurance time can be improved.
It should be noted that the electronic device described in the embodiments of the present application is presented in the form of a functional unit. The term "unit" as used herein is to be understood in its broadest possible sense, and objects used to implement the functions described by the respective "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated, or chipset) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality.
The obtaining unit 601 may be a memory or a processor, and the constructing unit 602, the matching unit 603, and the determining unit 604 may be a processor, based on which the function or the step of any of the above methods can be implemented.
The present embodiment also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to execute the embodiments of the present application to implement any one of the methods in the embodiments.
The present embodiment also provides a computer program product, which when run on a computer causes the computer to execute the relevant steps described above to implement any of the methods in the above embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory, so that the chip can execute any one of the methods in the above method embodiments.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding method provided above, so that the beneficial effects achieved by the electronic device, the computer storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Through the description of the above embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A duration determination method, characterized in that the method comprises:
acquiring use behavior data of the electronic equipment in a preset time period;
constructing a first feature vector according to the using behavior data;
matching the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with the highest matching degree, wherein the preset feature vector library comprises Q second feature vectors, each second feature vector corresponds to the use behavior data of the electronic equipment in a historical time period, the Q second feature vectors comprise the P second feature vectors, and the P and the Q are positive integers;
acquiring power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data;
acquiring current residual electric quantity;
and determining the remaining endurance time of the electronic equipment according to the current remaining power and the P groups of power consumption data.
2. The method of claim 1, wherein determining the remaining endurance time of the electronic device according to the current remaining power and the P sets of power consumption data comprises:
determining P power consumption curves according to the P groups of power consumption data, wherein each group of power consumption data corresponds to one power consumption curve;
determining a target power consumption curve according to the P power consumption curves;
acquiring a current time point;
intercepting a reference power consumption curve behind the current time point in the target power consumption curve according to the current time point;
and determining the remaining endurance time according to the current remaining power and the reference power consumption curve.
3. The method of claim 2, wherein determining a target power consumption profile from the P power consumption profiles comprises:
distributing a weight to each power consumption curve in the P power consumption curves to obtain P weights;
and performing weighting operation according to the P weights and the P power consumption curves to obtain the target power consumption curve.
4. The method according to claim 3, wherein the assigning a weight to each of the P power consumption curves to obtain P weights comprises:
acquiring the environmental parameters of each power consumption curve in the P power consumption curves to obtain P environmental parameters;
determining an influence factor corresponding to each environmental parameter in the P environmental parameters to obtain P influence factors;
and determining the P weights according to the P influence factors.
5. The method according to claim 3, wherein the assigning a weight to each of the P power consumption curves to obtain P weights comprises:
acquiring time points of the P power consumption curves to obtain P time points;
determining a difference value between each time point in the P time points and the current time point to obtain a plurality of difference values;
determining the importance corresponding to each difference value in the P difference values to obtain P importance;
and determining the P weight values according to the P importance degrees.
6. The method according to any of claims 1-5, wherein said constructing a first feature vector from said usage behavior data comprises:
dividing the using behavior data into a plurality of segments according to the time sequence to obtain a plurality of segment using behavior data;
converting each piece of use behavior data in the plurality of pieces of use behavior data into a feature vector of at least one dimension to obtain a plurality of feature vectors;
constructing the first feature vector from the plurality of feature vectors.
7. The method of any of claims 1-5, wherein the usage behavior data comprises at least one of: the screen on-off times, the unlocking times, the application use condition and the activity condition are determined.
8. An endurance determination apparatus, comprising: an acquisition unit, a construction unit, a matching unit and a determination unit, wherein,
the acquisition unit is used for acquiring the use behavior data of the electronic equipment in a preset time period;
the construction unit is used for constructing a first feature vector according to the using behavior data;
the matching unit is configured to match the first feature vector with feature vectors in a preset feature vector library to obtain P second feature vectors with a highest matching degree, where the preset feature vector library includes Q second feature vectors, each second feature vector corresponds to usage behavior data of the electronic device in a historical time period, the Q second feature vectors include the P second feature vectors, and P and Q are positive integers;
the acquiring unit is further configured to acquire power consumption data corresponding to the P second eigenvectors to obtain P groups of power consumption data; acquiring the current residual electric quantity;
the determining unit is used for determining the remaining endurance time of the electronic equipment according to the current remaining power and the P groups of power consumption data.
9. An electronic device, comprising a processor, a memory for storing one or more programs and configured for execution by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN202111125984.2A 2021-09-24 2021-09-24 Duration determination method and device, electronic equipment and storage medium Pending CN113873083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111125984.2A CN113873083A (en) 2021-09-24 2021-09-24 Duration determination method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111125984.2A CN113873083A (en) 2021-09-24 2021-09-24 Duration determination method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113873083A true CN113873083A (en) 2021-12-31

Family

ID=78994308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111125984.2A Pending CN113873083A (en) 2021-09-24 2021-09-24 Duration determination method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113873083A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104237789A (en) * 2013-06-09 2014-12-24 腾讯科技(深圳)有限公司 Battery endurance time forecasting method and device
CN108932048A (en) * 2018-06-11 2018-12-04 Oppo(重庆)智能科技有限公司 Determine the method and Related product of battery available duration
CN109361818A (en) * 2018-10-26 2019-02-19 深圳壹账通智能科技有限公司 Charging reminding method, device, storage medium and terminal
CN109884543A (en) * 2019-01-25 2019-06-14 努比亚技术有限公司 A kind of method and apparatus that remaining battery uses duration prediction
CN112053011A (en) * 2020-10-14 2020-12-08 腾讯科技(深圳)有限公司 Power supply optimization management method and device, electronic equipment and storage medium
CN112764513A (en) * 2021-01-28 2021-05-07 维沃移动通信有限公司 Prompting method and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104237789A (en) * 2013-06-09 2014-12-24 腾讯科技(深圳)有限公司 Battery endurance time forecasting method and device
CN108932048A (en) * 2018-06-11 2018-12-04 Oppo(重庆)智能科技有限公司 Determine the method and Related product of battery available duration
CN109361818A (en) * 2018-10-26 2019-02-19 深圳壹账通智能科技有限公司 Charging reminding method, device, storage medium and terminal
CN109884543A (en) * 2019-01-25 2019-06-14 努比亚技术有限公司 A kind of method and apparatus that remaining battery uses duration prediction
CN112053011A (en) * 2020-10-14 2020-12-08 腾讯科技(深圳)有限公司 Power supply optimization management method and device, electronic equipment and storage medium
CN112764513A (en) * 2021-01-28 2021-05-07 维沃移动通信有限公司 Prompting method and electronic equipment

Similar Documents

Publication Publication Date Title
CN111738122B (en) Image processing method and related device
CN111782879B (en) Model training method and device
CN111553846B (en) Super-resolution processing method and device
CN111400605A (en) Recommendation method and device based on eyeball tracking
CN111882642B (en) Texture filling method and device for three-dimensional model
CN111431968B (en) Cross-device distribution method of service elements, terminal device and storage medium
CN113177229A (en) Data processing method and related device
CN111768352A (en) Image processing method and device
CN115333941A (en) Method for acquiring application running condition and related equipment
CN111612723B (en) Image restoration method and device
CN111524528B (en) Voice awakening method and device for preventing recording detection
CN114548141A (en) Method and device for generating waveform file, electronic equipment and readable storage medium
CN111880661A (en) Gesture recognition method and device
CN114422686A (en) Parameter adjusting method and related device
CN113781959B (en) Interface processing method and device
CN111836226B (en) Data transmission control method, device and storage medium
CN111581119B (en) Page recovery method and device
CN113873083A (en) Duration determination method and device, electronic equipment and storage medium
CN114384465A (en) Azimuth angle determination method and device
CN114630152A (en) Parameter transmission method and device for image processor and storage medium
CN114336998A (en) Charging control method, charging control device and storage medium
CN114827442B (en) Method for generating image and electronic equipment
CN111459271B (en) Gaze offset error determination method and device
CN115175164B (en) Communication control method and related device
CN112712258A (en) One-stop comprehensive operation service system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20211231

RJ01 Rejection of invention patent application after publication