WO2021052489A1 - 一种确定多核处理器中故障计算核的方法及电子设备 - Google Patents

一种确定多核处理器中故障计算核的方法及电子设备 Download PDF

Info

Publication number
WO2021052489A1
WO2021052489A1 PCT/CN2020/116343 CN2020116343W WO2021052489A1 WO 2021052489 A1 WO2021052489 A1 WO 2021052489A1 CN 2020116343 W CN2020116343 W CN 2020116343W WO 2021052489 A1 WO2021052489 A1 WO 2021052489A1
Authority
WO
WIPO (PCT)
Prior art keywords
core
electronic device
computing
file
abnormal operation
Prior art date
Application number
PCT/CN2020/116343
Other languages
English (en)
French (fr)
Inventor
张志斌
张晓波
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20866341.9A priority Critical patent/EP4020215A4/en
Priority to US17/761,683 priority patent/US11815990B2/en
Publication of WO2021052489A1 publication Critical patent/WO2021052489A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0721Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment within a central processing unit [CPU]
    • G06F11/0724Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment within a central processing unit [CPU] in a multiprocessor or a multi-core unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/076Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Definitions

  • This application relates to the detection technology of faulty devices in electronic equipment, and in particular to a method for determining faulty computing cores in a multi-core processor and electronic equipment.
  • the probability of abnormal operation such as automatic restart is about 300 per million. If the annual shipment volume is 200 million units, there will be approximately 60,000 mobile phones with abnormal operation such as automatic restart.
  • double data rate synchronous dynamic random access memory double data rate synchronous dynamic random access memory
  • UFS universal flash storage
  • mobile phone repair outlets are still unable to detect and calculate nuclear faults, and need to be returned to the factory for inspection. And return to the factory inspection requires the assistance of special tools and repeated pressure testing to do experiments, and a professional manual analysis to locate the cause of abnormal operation such as automatic restart.
  • the embodiments of the present application provide a method and electronic device for determining a fault calculation core, which can automatically and quickly determine a specific fault calculation core.
  • an embodiment of the present application provides a method for determining a faulty computing core in a multi-core processor, which is applied to an electronic device equipped with a multi-core processor, and the multi-core processor integrates multiple computing cores.
  • the computing cores in the computing cores are independent of each other, and the multiple computing cores include a first computing core; wherein, when the electronic device is running, at least one computing core of the multiple computing cores executes program instructions,
  • the program instructions are allocated based on a dynamic scheduling strategy; the method includes: determining the computing core corresponding to each operating abnormality among the N operating abnormalities, and the operating abnormality is executed by any computing core among the plurality of computing cores.
  • the multi-core processor is a central processing unit or a graphics processor.
  • the faulty CPU core can be determined, and the faulty GPU core can also be determined.
  • the dynamic scheduling strategy is a completely fair scheduling strategy.
  • the electronic device schedules the computing cores in the multi-core processor based on a completely fair scheduling strategy, which can improve the accuracy of determining the faulty computing core.
  • the abnormal operation corresponding to the first computing core is a continuously occurring abnormal operation corresponding to the first computing core.
  • the number of abnormal operations corresponding to the first computing core is equal to N.
  • the accuracy of the fault computing core can be improved.
  • the abnormal operation corresponding to the first computing core is an abnormal operation corresponding to the first computing core that occurs within a preset period .
  • the fault calculation core can be determined by operating abnormalities that occur within a preset period, thereby avoiding the effect of long-running abnormalities on the results.
  • the method further includes: shielding the first computing core.
  • the faulty computing core can be shielded, so that abnormal operation caused by running program instructions on the faulty computing core can be avoided, and the user experience is improved.
  • the abnormal operation is an abnormal restart of the electronic device.
  • the faulty computing core is determined by the common operating abnormality among the operating abnormalities triggered by the faulty computing core, which is an abnormal restart, which can improve the determination efficiency.
  • the electronic device includes a first file and a second file; wherein, the first file records each of the N operation abnormalities The occurrence time and cause of the occurrence; the second file records the identification of the computing core and the occurrence time of the abnormal operation; the determination of the computing core corresponding to each operation abnormality in the N operation abnormalities includes: the operation abnormality recorded according to the first file The reason for the occurrence of the abnormal operation is determined from the first file; according to the occurrence time of the operation abnormality recorded in the first file and the occurrence time of the operation abnormality recorded in the second file, from the second file Determine the computing core corresponding to each operation abnormality in the N times of operation abnormality.
  • the first file records the related information of the abnormal operation
  • the second file records the computing core information corresponding to the abnormal operation.
  • the abnormal operation can be correlated with the computing core information through the occurrence time of the abnormal operation, which improves the determination of the failure. Calculate the efficiency of the core.
  • the information of the fault calculation core is recorded in a third file, and the third file can be called and/or sent to other electronic devices.
  • the information of the faulty computing core can be recorded in a file, which is convenient to call and send to other devices.
  • the embodiment of the present application improves a method for determining a faulty computing core in a multi-core processor, which is applied to a first electronic device; the method includes: obtaining a log file of a second electronic device; wherein, the second electronic device An electronic device configured with a multi-core processor, the multi-core processor integrates a plurality of computing cores, each of the plurality of computing cores is independent of each other, and the plurality of computing cores includes a first computing core Wherein, when the electronic device is running, at least one of the plurality of computing cores executes program instructions, the program instructions are allocated based on a dynamic scheduling strategy; the log file records the second electronic N operation abnormalities of the equipment, the operation abnormality is caused by an abnormality that occurs when any of the plurality of computing cores executes program instructions; determining the computing core corresponding to each operation abnormality in the N operation abnormalities; When the number of abnormal operation corresponding to the first calculation core in the N times of abnormal operation is greater than or equal to M, it is
  • the electronic device can obtain log files of other electronic devices, and determine the fault calculation core of the other electronic devices based on the abnormal operation recorded in the log files.
  • the multi-core processor is a central processing unit or a graphics processor.
  • the dynamic scheduling strategy is a completely fair scheduling strategy.
  • the abnormal operation corresponding to the first computing core is a continuously occurring abnormal operation corresponding to the first computing core.
  • the number of abnormal operation corresponding to the first computing core is equal to N.
  • the abnormal operation corresponding to the first computing core is an abnormal operation corresponding to the first computing core that occurs within a preset period .
  • the method further includes: sending the identification information of the first computing core to the second electronic device, so that the second electronic device Shield the first calculation core.
  • the abnormal operation is an abnormal restart of the second electronic device.
  • the log file includes a first file and a second file; wherein, the first file records each of the N operation abnormalities The occurrence time and the cause of the occurrence; the second file records the identification of the computing core and the occurrence time of the abnormal operation;
  • the determining the computing core corresponding to each of the N operation abnormalities includes:
  • the computing core corresponding to each of the N operation abnormalities is determined from the second file.
  • an embodiment of the present application provides an apparatus for determining a faulty computing core in a multi-core processor, which is provided in an electronic device configured with a multi-core processor, and the multi-core processor integrates multiple computing cores.
  • the computing cores in the computing cores are independent of each other, and the multiple computing cores include a first computing core; wherein, when the electronic device is running, at least one computing core of the multiple computing cores executes program instructions, The program instructions are allocated based on a dynamic scheduling strategy; the device includes:
  • the first determining unit is configured to determine the computing core corresponding to each operating abnormality in the N times of operating abnormalities, and the operating abnormality is caused by an abnormality that occurs when any computing core of the plurality of computing cores executes a program instruction;
  • the second determining unit is configured to determine that the first computing core is a faulty computing core when the number of operating abnormalities corresponding to the first computing core in the N operating abnormalities is greater than or equal to M, and M is a preset value.
  • an embodiment of the present application provides a device for determining a faulty computing core in a multi-core processor, which is provided in a first electronic device; the device includes:
  • the acquiring unit is configured to acquire the log file of the second electronic device; wherein the second electronic device is configured with an electronic device with a multi-core processor, the multi-core processor is integrated with multiple computing cores, and among the multiple computing cores
  • the computing cores are independent of each other, and the multiple computing cores include a first computing core; wherein, when the electronic device is running, at least one computing core of the multiple computing cores executes program instructions, and the program Instructions are allocated based on a dynamic scheduling strategy;
  • the log file records N operation abnormalities of the second electronic device, and the operation abnormality occurs when any of the plurality of computing cores executes program instructions Caused by an exception;
  • the first determining unit is configured to determine the computing core corresponding to each abnormal operation in the N times of abnormal operation
  • the second determining unit is configured to determine that the first computing core is a faulty computing core when the number of operating abnormalities corresponding to the first computing core in the N operating abnormalities is greater than or equal to M, and M is a preset value.
  • an embodiment of the present application provides an electronic device, including at least one processor and a memory; the at least one processor includes a multi-core processor, the multi-core processor integrates multiple computing cores, and the multiple The computing cores in the computing cores are independent of each other, and the multiple computing cores include a first computing core; wherein, when the electronic device is running, at least one computing core of the multiple computing cores executes program instructions, The program instructions are allocated based on a dynamic scheduling strategy;
  • the memory is configured to store computer-executable instructions, and when the electronic device is running, the at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method described in the first aspect .
  • an embodiment of the present application provides an electronic device, including a processor, a memory, and a transceiver; the memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the memory The stored computer-executable instructions enable the electronic device to execute the method described in the second aspect.
  • an embodiment of the present application provides a computer storage medium, the computer storage medium includes computer instructions, and when the computer instructions run on an electronic device, the electronic device is caused to execute the method described in the first aspect Or the method described in the second aspect.
  • the embodiments of the present application provide a computer program product.
  • the program code contained in the computer program product is executed by a processor in an electronic device, it implements the method described in the first aspect or the method described in the second aspect. method.
  • the method for determining a faulty computing core in a multi-core processor can analyze the operating abnormality when an electronic device has multiple operating abnormalities related to an abnormality that occurs when the computing core of the multi-core processor executes program instructions.
  • Corresponding computing core if in multiple operation abnormalities, the computing core corresponding to the preset number of operating abnormalities is the same computing core, it can be determined that the computing core is a faulty computing core, thus realizing that there is no need for professionals and Without special testing, the fault calculation core can be determined automatically and quickly.
  • FIG. 1 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the application.
  • FIG. 2 is a block diagram of the software structure of an electronic device provided by an embodiment of the application.
  • FIG. 3 is a flowchart of a method for determining a faulty computing core in a multi-core processor according to an embodiment of the application;
  • FIG. 4 is a schematic block diagram of a method for determining a faulty computing core in a multi-core processor provided by an embodiment of the application;
  • FIG. 5 is a flowchart of a method for determining a faulty computing core in a multi-core processor according to an embodiment of the application
  • FIG. 6 is a schematic block diagram of an apparatus for determining a faulty computing core in a multi-core processor according to an embodiment of the application;
  • FIG. 7 is a schematic block diagram of an apparatus for determining a faulty computing core in a multi-core processor according to an embodiment of the application;
  • FIG. 8 is a schematic block diagram of an electronic device provided by an embodiment of this application.
  • FIG. 9 is a schematic block diagram of an electronic device according to an embodiment of the application.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features.
  • the terms “including”, “including”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized.
  • the embodiment of the present application provides a method for determining a faulty computing core in a multi-core processor.
  • an electronic device has multiple operating abnormalities related to an abnormality that occurs when the computing core of the multi-core processor executes program instructions, the operation is analyzed
  • the calculation core corresponding to the abnormality if among multiple operation abnormalities, the calculation cores corresponding to the preset number of operation abnormalities are the same calculation core, it can be determined that the calculation core is a fault calculation core.
  • the faulty calculation core refers to that the calculation core itself has a fault.
  • the method for determining a faulty computing core in a multi-core processor can be applied to an electronic device equipped with a multi-core processor.
  • the electronic device may be a portable electronic device such as a mobile phone, a tablet computer, a digital camera, a personal digital assistant (PDA), a wearable device, and a laptop computer.
  • portable electronic devices include, but are not limited to, portable electronic devices equipped with iOS, android, microsoft or other operating systems.
  • the aforementioned portable electronic device may also be other portable electronic devices, such as a laptop with a touch-sensitive surface (such as a touch panel).
  • the electronic device may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (such as a touch panel).
  • a touch-sensitive surface such as a touch panel.
  • the embodiment of the present application does not specifically limit the type of electronic device.
  • FIG. 1 shows a schematic diagram of the structure 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 charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include a central processing unit (CPU).
  • the CPU may be integrated with multiple computing cores, and each of the multiple computing cores may be independent of each other.
  • the program instructions can be allocated to one or more computing cores of the CPU to execute the program instructions.
  • the processor 110 may also include a graphics processing unit (GPU).
  • the GPU may integrate multiple computing cores, and each of the multiple computing cores may be independent of each other.
  • the electronic device When the electronic device is performing graphics processing, it can allocate graphics processing-related program instructions to one or more computing cores of the GPU to execute the program instructions.
  • the processor 110 may also be a modem processor, an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or Neural-network processing unit (NPU), etc.
  • ISP image signal processor
  • DSP digital signal processor
  • NPU Neural-network processing unit
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface can include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter (universal asynchronous) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may couple the touch sensor 180K, the charger, the flash, the camera 193, etc., respectively through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • the MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and so on.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones. This interface can also be used to connect to other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • 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 charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the central processing unit.
  • the central processing unit outputs sound signals through audio equipment (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194.
  • the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • 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, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), fifth generation, new air interface ( new radio, NR), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA broadband Code division multiple access
  • TD-SCDMA time-division code division multiple access
  • LTE long term evolution
  • 5 generation new air interface (new radio, NR), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, a central processing unit, and the like.
  • the GPU is an image processing microprocessor, which is connected to the display screen 194 and the central processing unit.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change 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 can use liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the display screen 194 when the display panel adopts OLED, AMOLED, FLED and other materials, the display screen 194 may be bent, that is, the electronic device 100 may be configured with a foldable display screen.
  • the display screen 194 can be bent means that the display screen can be bent to any angle at a fixed part or any part, and can be maintained at that angle.
  • the foldable display has two modes: unfolded state and folded state. Among them, when the bending angle formed when the foldable display screen is bent is greater than the preset value, it can be regarded as being in the unfolded state, and when the bending angle formed when the foldable display screen is bent is smaller than the preset value, it can be regarded as being in the folded state.
  • the bending angle may refer to the angle formed at the bending position on the side of the foldable screen that is not used for displaying content.
  • the preset value can be defined in advance, for example, it can be 90 degrees, 80 degrees, and so on.
  • an angle sensor may be provided at the bending position of the foldable display screen, and the electronic device can detect the bending angle through the angle sensor, and can determine whether the foldable display screen is in the unfolded state according to the bending angle. Or folded state.
  • the user interface provided by the operating system of the electronic device can be displayed in full screen.
  • the full-screen display user interface can mean that the user interface occupies the entire display area of the foldable display screen, or it can mean that the user interface occupies most of the display area of the display screen, for example, when the foldable display screen is a special-shaped cut screen (Notch screen) ,
  • the user interface is displayed in the middle part of the special-shaped cutting screen, and when one or both sides of the edge part are black, it can also be regarded as the foldable display screen displaying the user interface in full screen.
  • the electronic device can only display the user interface provided by the operating system on one of the foldable display screens, or it can display on both displays of the foldable display screen
  • the user interface provided by the operating system of the electronic device is not limited in the embodiment of the present application.
  • the electronic device may change from displaying the user interface in full screen on the foldable display screen to displaying on one of the display screens on the foldable display screen.
  • the user interface when the foldable display screen is changed from the unfolded state to the folded state, the electronic device may change from displaying the user interface in full screen on the foldable display screen to displaying on one of the display screens on the foldable display screen.
  • the electronic device 100 may be configured with two independent display screens, and the two display screens are located on two sides of the electronic device 100 respectively.
  • the two display screens may have the same configuration or different configurations.
  • the two display screens may use the same or different materials, and may have the same or different screen sizes.
  • one display screen is a 6-inch OLED screen, and the other display screen is a 3.3-inch LCD screen. No restrictions.
  • the electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and a central processing unit.
  • the ISP is used to process the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • 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 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the central processing unit. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example, when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the pressure sensor 180A can detect the detection signal of the user's finger contacting the display screen 194 to determine the contact area and contact area of the finger contacting the display screen 194, thereby determining whether the finger is clamped in the electronic device 100 in the folded configuration. between.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers and so on.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can transmit the detected touch operation to the central processing unit to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
  • the central processing unit can analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations that act on different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the electronic device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 may also be compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present application takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 by way of example.
  • FIG. 2 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime library and system library, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as mobile phone manager, call, map, instant messaging, and camera.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include content providers, view systems, and managers, where the managers include activity managers, phone managers ( telephony manager), notification manager (notification manager), resource manager (resoure manager), window manager (window manager), etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include videos, images, audios, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the activity manager is used to manage the life cycle of the application, and the activity stack management.
  • the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can disappear automatically after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, and so on.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • text messages are displayed in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • Window manager content provider, view system, phone manager, resource manager, notification manager, etc.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library may include a fault calculation core location module and other functional modules.
  • other functional modules may include a surface manager (surface manager), media libraries (media libraries), a three-dimensional graphics processing library (for example: OpenGL ES), a two-dimensional graphics engine (for example: SGL), and so on.
  • the fault computing core location module can determine the information of the computing core corresponding to each abnormal operation according to the information of the abnormal operation recorded by the kernel layer and the information of the computing core corresponding to the abnormal operation recorded by the kernel layer.
  • the computing core may be a computing core of a multi-core CPU or a multi-core GPU. Wherein, when the number of operation abnormalities corresponding to any one of the multi-core CPU or multi-core GPU meets a preset rule, it can be determined that the computing core is a faulty computing core.
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the two-dimensional graphics engine is a graphics engine for two-dimensional graphics.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least log management module, exception handling module, processor driver, display driver, key mapping driver, camera driver, audio driver, flash memory driver, Wi-Fi driver, Bluetooth driver, sensor driver, power manager driver, etc.
  • the corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes the touch operation into the original input event (including touch coordinates, time stamp of the touch operation, etc.).
  • the original input events are stored in the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera 193 captures still images or videos.
  • the exception handling module in the kernel layer may record information about abnormal operation in file A, and the abnormal operation may include an abnormal operation in the kernel layer.
  • the information about the abnormal operation may include information such as the occurrence time and cause of the abnormal operation.
  • the exception handling module can call the oops function to record the abnormal information in the file A.
  • the log management module may record information of the computing core corresponding to the abnormal operation in the file B, such as the occurrence time of the abnormal operation, the identification of the computing core, and so on.
  • the log management module can call the printk function to record the information of the computing core in the file B.
  • the fault calculation core location module in the system library can read the information recorded in file A and file B.
  • a preset type of abnormal operation for example, panic restart
  • the time of the abnormal operation is filtered from the file A.
  • the core information corresponding to the abnormal operation is determined from the file B according to the time of the abnormal operation. If the computing cores corresponding to the first number of operating abnormalities in the preset type of operating abnormalities for multiple consecutive times are the same computing core, it can be determined that the computing core is a faulty computing core (the computing core itself has a failure).
  • the fault calculation core location module can record the information of the fault calculation core in file C.
  • File C can be accessed by applications at the application layer, and can be sent to other electronic devices (such as the data center of the device manufacturer, etc.).
  • the method can be applied to electronic devices equipped with multi-core processors.
  • the multi-core processor may be integrated with multiple computing cores (cores).
  • the computing core may also be referred to as the processing core.
  • the multiple computing cores are independent of each other and can execute program instructions in parallel.
  • the electronic device can use a dynamic scheduling strategy to allocate the program instructions that need to be executed to at least one of the plurality of computing cores, so as to execute the program instructions.
  • the dynamic scheduling strategy can also be called a non-static allocation strategy, which refers to a scheduling strategy that can prevent one or more processes from always running on a certain computing core of a multi-core processor.
  • the dynamic scheduling strategy may be a multi-core processor load balancing scheduling algorithm based on the kernel layer.
  • the multi-core processor load balancing scheduling algorithm based on the kernel layer may be a completely fair scheduler (CFS).
  • the kernel layer of the electronic device can allocate the program instructions that need to be executed to one or more of the multiple computing cores according to the completely fair scheduling strategy, which can realize random allocation. Each computing core of the multiple computing cores is assigned to the program instruction. The probability is equal or roughly equal.
  • the dynamic scheduling strategy may be a polling strategy.
  • the multi-core processor may be a multi-core CPU.
  • the computing core is a CPU core, which may also be referred to as a CPU core or a CPU processing core.
  • the multi-core processor may be a multi-core GPU.
  • the computing core is a GPU core, which may also be referred to as a GPU core or a GPU processing core.
  • the method also includes the following steps.
  • Step 301 Determine the computing core corresponding to each operating abnormality in the N times of operating abnormalities, and the operating abnormality is caused by an abnormality that occurs when any computing core of the plurality of computing cores executes a program instruction.
  • N can be a preset integer, such as 3, 5, 10, and so on.
  • exceptions that occur when the computing core executes program instructions can include the following situations:
  • the failure of the computing core itself can cause abnormalities in the execution of program instructions
  • the storage area for storing data or instructions is faulty.
  • data or instructions for example, a partition of DDR
  • an exception may occur.
  • Abnormalities that occur when the computing core executes the program instructions can cause the electronic equipment to operate abnormally.
  • the abnormal operation can be an abnormal restart, a black screen, a frozen screen, etc. Among them, abnormal restart is the most common.
  • the abnormal restart of the electronic device caused by the abnormality that occurs when the computing core executes the program instructions may be referred to as a panic restart.
  • the abnormality of the camera of the electronic device can also cause the abnormal operation of the electronic device, such as abnormal restart.
  • the electronic device can record the related information of the abnormal operation, including the time of occurrence and the reason for the abnormal operation.
  • the electronic device may also record information of the device corresponding to the abnormal operation. For example, if the abnormal operation is caused by an abnormality that occurs when the computing core executes program instructions, the electronic device may record the information of the computing core.
  • the occurrence time may be the time when the abnormal operation occurs.
  • the kernel layer can call the system restart process to restart. Before performing the restart, the kernel layer can call the oops function to record the cause of the restart and the time when the restart occurred in the file A, and save the file A.
  • File A can be a text file.
  • the electronic device can record the occurrence time of the abnormal operation and the information of the device corresponding to the abnormal operation in a file B, and save the file B.
  • the information of the device may specifically be the identification of the device.
  • File B can be a text file.
  • the kernel layer can call the system restart process to restart.
  • the kernel layer may record information such as the identification of the computing core corresponding to the abnormal restart and the occurrence time of the abnormal restart in the file B.
  • the kernel layer may call the printk function to record the identification of the device corresponding to the abnormal restart and the occurrence time of the abnormal restart in file B.
  • the information of the device corresponding to the abnormal operation recorded in the file B may include the abnormality.
  • Device camera or microphone, battery, etc. information and information about the computing core that was executing program instructions when the abnormality occurred.
  • file A and file B may be different files.
  • the file A may record relevant information about at least one operation abnormality, where the relevant information about each operation abnormality may include information such as the cause and time of the occurrence of the operation abnormality.
  • File B may record the occurrence time of at least one abnormal operation and the information of the device corresponding to the at least one abnormal operation.
  • the information of the device corresponding to each abnormal operation may include the identification of the device, such as the number of the computing core.
  • At least part of the data recording format of file A may be as shown in Table 1
  • at least part of the data recording format of file B may be as shown in Table 2.
  • reason is the cause of the abnormal operation
  • time is the time when the abnormal operation occurred.
  • AP in reason is an abbreviation of application processor.
  • the application processor may also be referred to as a CPU.
  • the reason may indicate that the cause of the abnormal operation is that an abnormality occurs when the application processor or the computing core of the CPU executes the program instruction.
  • time is the time when the operation restart occurs
  • data is the number of a computing core in the multi-core CPU, which can be used as the identification of the computing core.
  • the file A may be a set of files, and each set of files records information related to an abnormal operation.
  • a group of files corresponding to file A can be compressed.
  • File B may be a set of files, in which each set of files records the occurrence time of an abnormal operation and the information of the device corresponding to the abnormal operation.
  • a group of files corresponding to file B can be compressed.
  • file A or file B may also be other forms of data or logs or records.
  • the occurrence time may be the occurrence time of the cause of the abnormal operation.
  • the reason for the abnormal operation can be specifically the abnormality of the aforementioned computing core when executing the program instructions, the abnormality of the camera, the abnormality of the microphone, the abnormality of the current or voltage of the battery, and so on.
  • the kernel layer can call the oops function to record the cause of the abnormal operation and the time when the cause occurred in the file a, and save the file a.
  • file a please refer to the introduction to file A above, so I won't repeat it here.
  • the electronic device may record the occurrence time of the cause of the abnormal operation and the information of the device corresponding to the abnormal operation in a file b.
  • the kernel layer can record information such as the identification of the device corresponding to the operation and the occurrence time of the abnormal operation in the file b, and save the file b.
  • file b please refer to the introduction to file B above.
  • the information of the device corresponding to the abnormal operation recorded in the file b may include the abnormality.
  • Device camera or microphone, battery, etc.
  • the electronic device can determine a plurality of abnormal operation caused by an abnormality that occurs when the computing core executes the program instruction according to the cause of the abnormal operation. And determine the computing core corresponding to each operation abnormality in the multiple operation abnormalities.
  • step 301 may be executed after the operation ends abnormally. Taking an abnormal restart as an example, step 301 may be executed after the electronic device completes the restart.
  • a plurality of abnormal operation caused by the abnormality that occurs when the computing core executes the program instruction can be determined from the file A. Then, according to the occurrence time of the operation abnormality, from the file B, the calculation core corresponding to each operation abnormality in the plurality of operation abnormalities is determined. For any operation abnormality in the multiple operation abnormalities, its occurrence time is recorded in file A and file B, and file B records the information of the computing core. Therefore, the calculation core corresponding to the abnormal operation can be determined according to the occurrence time of the abnormal operation.
  • multiple operation abnormalities caused by the abnormalities that occur when the computing core executes the program instructions can be determined from the file a. Then, according to the occurrence time of the operation abnormality, from the file b, the calculation core corresponding to each operation abnormality in the plurality of operation abnormalities is determined. For any operation abnormality among the multiple operation abnormalities, the occurrence time of the cause is recorded in file a and file b, and file b records the information of the computing core. Therefore, the calculation core corresponding to the abnormal operation can be determined according to the occurrence time of the cause of the abnormal operation.
  • the determined multiple operation abnormalities caused by abnormalities that occur when the computing core executes the program instructions may be continuously occurring operation abnormalities.
  • the determined multiple abnormal restarts are abnormal restarts that occur continuously.
  • the determined multiple operation abnormalities caused by abnormalities that occur when the computing core executes the program instructions may be operation abnormalities that occur within a preset period.
  • the preset period may be a period in which the preset duration is calculated forward in the time dimension starting from the current moment, for example, the last 7 days, 10 days, or 3 days.
  • Step 303 When the number of abnormal operation corresponding to the first computing core in the N times of abnormal operation is greater than or equal to M, it is determined that the first computing core is a faulty computing core, and M is a preset value.
  • the kernel layer allocates program instructions to each of the multi-core processors based on the dynamic scheduling strategy.
  • a certain program instruction does not always run on a certain computing core, and the data or instructions on one or more partitions of DDR and other memory are also It is not always called by a certain computing core. If more or all of the N operation abnormalities are caused by the abnormality that occurs when the first computing core runs the program instructions, it can indicate or reflect that the abnormal probability is caused by the failure of the first computing core itself. .
  • M can be an integer preset according to the value of N.
  • M can be equal to or less than N, for example, N is 3, and M can be 3.
  • N is 5 and M can be 4.
  • N is 10 and M can be 8. Wait, I won't list them all here. Developers can set the values of N and M according to relevant indicators. For example, in order to reduce the misjudgment rate, N and M can be set higher. For another example, in order to quickly determine the fault calculation core, N and M can be set lower.
  • the abnormal operation corresponding to the first computing core may be a continuously occurring abnormal operation corresponding to the first computing core.
  • the probability that a program instruction with loopholes will be run by any of the 8 computing cores twice in a row is: Or, the probability that data or instructions on one or more faulty partitions of a memory such as DDR are called by any one of the eight computing cores is Therefore, if at least 2 consecutive operation abnormalities correspond to the first calculation core, the first calculation core is determined to be the fault calculation core.
  • the misjudgment rate is not greater than That is, the misjudgment rate is not more than 12.5%.
  • M may be set to 3. Still taking the processor integrated with 8 computing cores as an example, under the dynamic scheduling strategy, the misjudgment rate is not greater than That is, the misjudgment rate is not more than 1.6%.
  • the number of abnormal operation corresponding to the first computing core is equal to N.
  • N can be set to 3, and the misjudgment rate is not greater than 1.6%.
  • N M
  • M M
  • N may be set to 10 and M may be set to 9. Still taking a processor integrated with 8 calculation sums as an example, the false alarm rate is close to zero.
  • the abnormal operation corresponding to the first computing core is an abnormal operation corresponding to the first computing core occurring within a preset period.
  • the preset period may be a period in which the preset duration is calculated forward in the time dimension starting from the current moment, for example, the last 7 days, 10 days, or 3 days. In order to avoid the interference of long-term abnormal operation.
  • step 303 can be replaced by some equivalent judgment methods.
  • an equivalent judgment method that can replace step 303 may be: among multiple operation abnormalities that occur within a preset time, the number of abnormalities corresponding to the first calculation core ⁇ K.
  • the preset time may be a period (for example, the last 7 days, 10 days, or 3 days, etc.) in which the preset time length is calculated forward in the time dimension, starting from the current time.
  • K is a preset value (for example, it can be 3, 5, 6, etc.).
  • an equivalent judgment method that can replace step 303 may be: among multiple operation abnormalities that occur within a preset time, the proportion of abnormalities corresponding to the first calculation core is ⁇ Z%.
  • the preset time may be a period (for example, the last 7 days, 10 days, or 3 days, etc.) in which the preset time length is calculated forward in the time dimension, starting from the current time.
  • Z% is a preset value (for example, it can be 70%, 80%, 90%, etc.).
  • the faulty computing core when a faulty computing core is determined, can be shielded, so that the kernel layer can ignore the faulty computing core when assigning program instructions, thereby avoiding abnormal operation caused by the faulty computing core.
  • the callable kernel layer processor driver can use the echo command to disable or deactivate the faulty computing core. Disabling or deactivating the fault calculation core can be referred to as shielding the fault calculation core.
  • the echo command can be echo 0>/sys/devices/system/cpu/cpu3/online. Among them, cpu3 represents the CPU core numbered 3.
  • file C when a faulty computing core is determined, information about the faulty computing core, such as the identification of the computing core, etc., may be recorded in file C, and file C may be saved.
  • file C please refer to the introduction to file A above, so I won't repeat it here.
  • an application at the application layer can read the file C through an API interface to read the information of the faulty computing core.
  • the application reads the information of the faulty computing core and can display the faulty computing core so that users or maintenance personnel can understand the faulty computing core.
  • the application at the application layer may be notified so that the application can read it.
  • the electronic device may also send the file C to other electronic devices, for example, to the data center server of the device manufacturer, so that the device manufacturer can perform relevant statistics.
  • sending the file C to another electronic device may be an operation performed in response to an operation initiated by the user, that is, the user may actively send the file C to other electronic devices.
  • the electronic device may request the user's authorization, and upon obtaining the user's authorization, send the file C to other electronic devices.
  • the electronic device may display authorization request information on the display screen, including risk warning information, rejected function options, and agreed function options. After detecting that the user clicks or touches the consent function option, the file C can be sent to other electronic devices.
  • the data center server of the equipment manufacturer may be notified so that the data center server can read the faulty computing core information in the file C.
  • the method described in FIG. 3 may be specifically executed by a fault calculation core location module in a system library (also referred to as a native layer).
  • a system library also referred to as a native layer
  • the fault calculation core location module may be a native layer application.
  • the fault calculation core location module can be written in C language or C++ language.
  • the fault computing core location module can read file A to determine the abnormal operation caused by the abnormality that occurs when the computing core executes the program instructions, and the time when the abnormal operation occurs.
  • the fault calculation core location module can also read the occurrence time of the abnormal operation recorded in the file B and the cpu core information corresponding to the abnormal operation.
  • the fault calculation core location module can determine the cpu core information corresponding to the abnormal operation through the occurrence time of any abnormal operation. In this way, the cpu core corresponding to each abnormal operation can be determined.
  • the kernel layer can include log management modules, exception handling oops functions, CPU drivers, and so on.
  • the exception handling function oops can record the abnormal restart of the electronic device to file A, and the log management module calls the printk function to record the cpu core information (including the cpu core identifier) corresponding to the abnormal restart to file B.
  • the format of file A is shown in Table 1 below.
  • the key information is reason and time.
  • the format of file B is shown in Table 2, and the key information is Time and Data.
  • the software code of the electronic device runs to the faulty cpu core
  • an exception occurs, causing the data/instruction address accessed by the software code to be illegal, triggering the exception handling oops function to record the abnormal restart event to file A, and triggering the log management module to call the printk function Record the nuclear information and occurrence events corresponding to the abnormal restart event to file B.
  • the kernel layer calls the system restart process to actively restart the electronic device.
  • the fault calculation core location module collects the abnormal restart event by reading file A, records the occurrence time of the abnormal restart event, and reads file B based on the occurrence time of the abnormal restart event.
  • the identifier of the cpu core recorded in, for example, the identifier of the cpu core may be a number, and more specifically, it may be a number 3.
  • step 2) Repeat step 2) until the third abnormal restart occurs, the fault calculation core location module calculates the time interval between the third abnormal restart and the first abnormal restart within 7 days, and the third abnormal restart occurs at the same time Then, read the cpu core number recorded in file B as 3, which is the same as the previous two times, then it is judged that the cpu core numbered 3 is faulty, write the result to file C, and notify the application of the java layer or the big data website
  • Java layer applications can be system management applications provided by third parties such as mobile phone butlers.
  • the big data website can be the data center of the equipment manufacturer.
  • the electronic device may request the user's authorization, and after obtaining the user's authorization, may allow the database of the big data website to read the file C.
  • the echo command provided by the cpu driver module can be called to turn off the cpu core numbered 3 (that is, the cpu core numbered 3 is shielded), and the cpu core numbered 3 is prohibited from running.
  • the fault of the cpu core can be accurately located through the locating algorithm of the kernel system restart fault type. Judging from the verification effect of the faulty machine sampled, the accuracy rate is more than 95%, and the fault can be automatically located and accurately repaired when the fault occurs, without the need for pressure test and analysis.
  • the method for determining a faulty computing core in a multi-core processor can analyze the operating abnormality when an electronic device has multiple operating abnormalities related to an abnormality that occurs when the computing core of the multi-core processor executes program instructions.
  • Corresponding computing core if in multiple operation abnormalities, the computing core corresponding to the preset number of operating abnormalities is the same computing core, it can be determined that the computing core is a faulty computing core, thus realizing that there is no need for professionals and Without special testing, the fault calculation core can be determined automatically and quickly.
  • the implementation principle of the method for determining a faulty computing core in a multi-core processor provided in the embodiments of the present application is introduced by an example.
  • the software framework of the electronic device may include a java application layer, a native application layer, and a kernel layer.
  • the java application layer may include java applications, for example, an apk application for branch maintenance.
  • the Native application layer includes native applications.
  • Native applications can be written in C language or C++ language.
  • Native applications can collect restart information and use restart positioning algorithms to locate restarts caused by CPU core failures and record them in text files, and notify java applications or big data website databases to read them.
  • the Native application reads the text file A and the text file B, collects restart failure and corresponding cpu core information, uses the restart location algorithm of the Native application to locate the cpu core failure, and records it in the text file C. Then use the echo command of the kernel cpu driver module to disable the failed cpu core to ensure the user's stable experience.
  • the Native application reports the cpu core failure result text file to the outlet maintenance tool (ie, outlet maintenance apk application) to provide an accurate maintenance plan.
  • the kernel layer can include log management modules, exception handling functions oops, CPU drivers, and so on.
  • the key is the restart positioning algorithm, which associates the restart fault type with the CPU core information through empirical values. details as follows.
  • the kernel exception handling function oops records the abnormal restart of the system to text file A, and the kernel log management module calls the printk function to record cpu core information to text file B.
  • the format of text file A is shown in Table 1 below.
  • the key information is reason and time.
  • the format of text file B is shown in Table 2, and the key information is Time and Data.
  • step 2) until the third abnormal restart of the system occurs, the Native layer application calculates the time interval between the third abnormal restart and the first abnormal restart within 7 days, and the third abnormal restart occurs at the same time Then, read the cpu core number recorded in the text file B as 3, which is the same as the previous two times, then it is judged that the cpu3 is faulty, the result is written to the text file C, and the java application or the database of the big data website is notified to read.
  • the number of CPU cores included in the system on chip (SOC) is at least 8, to ensure that the probability of the same core appearing randomly 3 times in a non-fault condition, that is, the false alarm rate is not greater than the number of (cpu cores) /cpu to the third power of the number of cores), that is, 8/512, or 1.6%.
  • the solution of this embodiment collects the failure type of the kernel system restart, and associates the experience value with the cpu core information, so that the cpu core failure can be accurately located.
  • automatic banning of cores can ensure the user's stable experience; and the file recording the faulty CPU core can be provided to the outlet maintenance tool for accurate maintenance; and the file recording the faulty CPU core can be reported to the big data website for R&D analysis.
  • the embodiment of the present application provides a method for determining a faulty calculation core in a multi-core processor, which may be executed by a first electronic device.
  • the first electronic device can be any device, device, platform, or device cluster with computing and processing capabilities.
  • the first electronic device may be an electronic device located at a terminal maintenance outlet such as a mobile phone.
  • the first electronic device may be an electronic device of a terminal manufacturer such as a mobile phone.
  • the first electronic device may be an electronic device usable by the user.
  • the method includes the following steps.
  • Step 501 Obtain a log file of a second electronic device; wherein the second electronic device is configured with an electronic device with a multi-core processor, the multi-core processor integrates multiple computing cores, and each of the multiple computing cores The computing cores are independent of each other, and the multiple computing cores include a first computing core; wherein, when the second electronic device is running, at least one computing core of the multiple computing cores executes program instructions, and the program Instructions are allocated based on a dynamic scheduling strategy; the log file records N operation abnormalities of the second electronic device, and the operation abnormality occurs when any of the plurality of computing cores executes program instructions Caused by an exception.
  • the second electronic device refers to the introduction of the electronic device 100 shown in FIG. 1.
  • the manner of distributing program instructions to multiple computing cores and the execution of the computing verification program instructions can be referred to the above description of the embodiment shown in FIG. 3.
  • a network connection may be established so that the second electronic device can send the log file to the first electronic device. For example, establish a connection via Bluetooth, etc.
  • the first electronic device before the first electronic device acquires the second electronic device, it may be connected via a data cable, so that the second electronic device can send the log file to the first electronic device.
  • a connection is established via a USB data cable.
  • the first electronic device may be a server device corresponding to the second electronic device.
  • the first electronic device may be a device of a second electronic device manufacturer that provides cloud services for the second electronic device.
  • the second electronic device may send the log file to the first electronic device.
  • the first electronic device may request the user's authorization, and upon obtaining the user's authorization, send the log file to the second electronic device.
  • the electronic device may display authorization request information on the display screen, including risk warning information, rejected function options, and agreed function options. After detecting that the user clicks or touches the consent function option, the log file can be sent to other electronic devices.
  • Step 503 Determine the computing core corresponding to each abnormal operation in the N times of abnormal operation.
  • step 503 refer to the above description of step 301, which will not be repeated here.
  • Step 505 When the number of abnormal operation corresponding to the first calculation core in the N times of abnormal operation is greater than or equal to M, it is determined that the first calculation core is a faulty calculation core, and M is a preset value.
  • step 505 reference may be made to the above description of step 303, which will not be repeated here.
  • the multi-core processor is a central processing unit or a graphics processor.
  • the dynamic scheduling strategy is a completely fair scheduling strategy.
  • the abnormal operation corresponding to the first computing core is a continuously occurring abnormal operation corresponding to the first computing core.
  • the introduction of step 303 above please refer to the introduction of step 303 above, which will not be repeated here.
  • the number of abnormal operation corresponding to the first computing core is equal to N.
  • N the number of abnormal operation corresponding to the first computing core
  • the abnormal operation corresponding to the first computing core is an abnormal operation corresponding to the first computing core that occurs within a preset period.
  • the introduction of step 303 above please refer to the introduction of step 303 above, which will not be repeated here.
  • the method further includes: sending identification information of the first computing core to the second electronic device, so that the second electronic device shields the first computing core.
  • the first electronic device may send the identification information of the faulty calculation core to the second electronic device.
  • the second electronic device can identify the fault calculation core according to the identification information, and shield the fault calculation core.
  • the abnormal operation is an abnormal restart of the second electronic device.
  • the log file includes a first file and a second file; wherein, the first file records the occurrence time and cause of each of the N operation abnormalities; the second file The identification of the computing core and the occurrence time of the abnormal operation are recorded; the first file and the second file can refer to the introduction of file A (or file a) and file B (or file b) above.
  • the determining the computing core corresponding to each of the N operation abnormalities includes: determining the N operation abnormality from the first file according to the cause of the operation abnormality recorded in the first file; and according to the record in the first file
  • the time of occurrence of the abnormal operation and the time of occurrence of the abnormal operation recorded in the second file are determined from the second file, and the computing core corresponding to each of the N operation abnormalities is determined from the second file.
  • the method for determining a faulty computing core in a multi-core processor can obtain log files of other electronic devices, and determine the faulty cores of the other electronic devices according to the abnormal operation recorded in the log files, thereby realizing Professionals and without special testing, automatically and quickly determine the fault calculation core.
  • the embodiment of the present application provides an apparatus 600 for determining a faulty computing core in a multi-core processor.
  • the device 600 can be installed in an electronic device equipped with a multi-core processor, the multi-core processor integrates multiple computing cores, and each of the multiple computing cores is independent of each other, and the multiple computing cores include A first computing core; wherein, when the electronic device is running, at least one computing core of the plurality of computing cores executes program instructions, and the program instructions are allocated based on a dynamic scheduling strategy.
  • the device 600 includes:
  • the first determining unit 610 is configured to determine the computing core corresponding to each operating abnormality in N times of operating abnormalities, the operating abnormality being caused by an abnormality that occurs when any computing core of the plurality of computing cores executes program instructions;
  • the second determining unit 620 is configured to determine that the first computing core is a faulty computing core when the number of operating abnormalities corresponding to the first computing core among the N operating abnormalities is greater than or equal to M, and M is a preset value .
  • each electronic device includes a hardware structure and/or software module corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiments of the present application can divide the functional modules of electronic devices and the like according to the method embodiments shown in FIG. 3.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one.
  • Processing module can be implemented in the form of hardware or software function modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • the device provided in the embodiment of the present application can analyze the computing core corresponding to the abnormal operation when the electronic device has multiple operating abnormalities related to the abnormalities that occur when the computing core of the multi-core processor executes the program instructions.
  • the calculation cores corresponding to the preset number of operation abnormalities are the same calculation core, and the calculation core can be determined to be the fault calculation core, so as to realize the automatic operation without the need of professionals and special tests. , Quickly determine the fault calculation core.
  • the embodiment of the present application provides an apparatus 700 for determining a faulty computing core in a multi-core processor.
  • the device 700 can be installed in a first electronic device. Referring to FIG. 7, the device 700 includes:
  • the obtaining unit 710 is configured to obtain a log file of a second electronic device; wherein the second electronic device is configured with an electronic device with a multi-core processor, the multi-core processor integrates multiple computing cores, and the multiple computing cores
  • the computing cores in are independent of each other, and the multiple computing cores include a first computing core; wherein, when the second electronic device is running, at least one computing core of the multiple computing cores executes program instructions,
  • the program instructions are allocated based on a dynamic scheduling strategy;
  • the log file records N operating abnormalities of the second electronic device, and the operating abnormalities are executed by any of the multiple computing cores. Caused by the exception that occurred at the time;
  • the first determining unit 720 is configured to determine the computing core corresponding to each abnormal operation among the N operation abnormalities;
  • the second determining unit 730 is configured to determine that the first computing core is a faulty computing core when the number of operating abnormalities corresponding to the first computing core in the N operating abnormalities is greater than or equal to M, and M is a preset value .
  • each electronic device includes a hardware structure and/or software module corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiments of the present application may divide the functional modules of electronic devices and the like according to the method embodiments shown in FIG. 5.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one.
  • Processing module The above-mentioned integrated modules can be implemented in the form of hardware or software function modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • the device provided in the embodiment of the present application can obtain log files of other electronic equipment, and determine the fault core of the other electronic equipment according to the abnormal operation recorded in the log file, thereby realizing the situation where no professional is required and no special test is required. Automatically and quickly determine the fault calculation core.
  • the electronic device may include at least one processor 810 and a memory 820.
  • the at least one processor 810 includes a multi-core processor.
  • the multi-core processor integrates multiple computing cores, and each of the multiple computing cores is independent of each other, and the multiple computing cores include a first computing core; wherein, when the electronic device is running, At least one computing core of the plurality of computing cores executes program instructions, and the program instructions are allocated based on a dynamic scheduling strategy.
  • the memory 820 is configured to store computer execution instructions; when the electronic device is running, the at least one processor 810 executes the computer execution instructions stored in the memory 820, so that the electronic device executes the instructions shown in FIG. 3 Methods.
  • the at least one processor 810 is configured to determine the computing core corresponding to each operating abnormality in the N operating abnormalities, and the operating abnormality is caused by an abnormality that occurs when any computing core of the plurality of computing cores executes program instructions.
  • the at least one processor 810 is further configured to determine that the first computing core is a faulty computing core when the number of operating abnormalities corresponding to the first computing core in the N operating abnormalities is greater than or equal to M Is the default value.
  • the electronic device further includes a communication bus 830, wherein the at least one processor 810 can communicate with the memory 820 via the communication bus 830, so as to obtain the computer-executable instructions stored in the memory 820 and execute the computer-executable instructions. .
  • the electronic device may include a processor 910 and a memory 920.
  • the memory 920 is used to store computer execution instructions; when the electronic device is running, the processor 910 executes the computer execution instructions stored in the memory 920, so that the electronic device executes the method shown in FIG. 5 .
  • the processor 910 is used to obtain a log file of a second electronic device; wherein, the second electronic device is configured with an electronic device with a multi-core processor, the multi-core processor is integrated with multiple computing cores, and the multiple Each of the computing cores is independent of each other, and the multiple computing cores include a first computing core; wherein, when the second electronic device is running, at least one computing core of the multiple computing cores executes Program instructions, the program instructions are allocated based on a dynamic scheduling strategy; the log file records N operating abnormalities of the second electronic device, and the operating abnormalities are caused by any of the multiple computing cores
  • the processor 910 is also used to determine the computing core corresponding to each abnormal operation in the N operation abnormalities; the processor 910 is also used when the abnormal operation occurs during the N operation abnormalities. When the number of abnormal operation corresponding to the first calculation core ⁇ M, it is determined that the first calculation core is a faulty calculation core, and M is a preset value.
  • the electronic device further includes a communication bus 930, wherein the processor 910 can communicate with the memory 920 via the communication bus 930, so as to obtain a computer-executable instruction stored in the memory 920 and execute the computer-executable instruction.
  • log files of other electronic devices can be obtained, and the fault cores of other electronic devices can be determined based on the abnormal operation recorded in the log files, thereby realizing automatic and fast operation without the need for professionals and special tests. Determine the fault calculation core.
  • the method steps in the embodiments of the present application can be implemented by hardware, or can be implemented by a processor executing software instructions.
  • Software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (programmable rom) , PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM or well-known in the art Any other form of storage medium.
  • An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and can write information to the storage medium.
  • the storage medium may also be an integral part of the processor.
  • the processor and the storage medium may be located in the ASIC.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium.
  • the computer instructions can be sent from a website site, computer, server, or data center to another website site via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) , Computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

Abstract

一种确定多核处理器中故障计算核的方法及电子设备,该方法应用于配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述方法包括:确定N次运行异常中各运行异常对应的计算核,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致(301);当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值(303)。

Description

一种确定多核处理器中故障计算核的方法及电子设备
本申请要求在2019年9月19日提交中国国家知识产权局、申请号为201910888839.6的中国专利申请的优先权,发明名称为“一种确定多核处理器中故障计算核的方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备故障器件检测技术,具体涉及一种确定多核处理器中故障计算核的方法及电子设备。
背景技术
根据统计,发生自动重启等运行异常的概率约为300/百万。若一年的出货量为2亿台的话,则发生自动重启等运行异常的手机约为6万部。
目前,手机已普遍采用集成了8个计算核(core)的处理器。尽管处理器是多核的,但该多核中任何一个核发生了可靠性故障,都会导致手机自动重启等运行异常。随着手机片上系统(system on chip,SOC)制程工艺不断演进,一枚处理器中集成的计算核核越来越多,相应地,对于手机而言,其发生计算核的可靠性故障的机率也越来越高。这必将严重影响用户体验,提高返修率和退机率。
手机的双倍数据率同步动态随机存取存储器(double data rate synchronous dynamic random access memory,DDR SDRAM)以及通用闪存存储(universal flash storage,UFS)等器件发生故障时,往往也表现为自动重启等运行异常。这导致检测计算核故障的难度较大。目前,手机的维修网点尚无法检测计算核核故障,需要返厂进行检查。而返厂检测需要专门工具协助并反复压测做实验,并由专业人员人工分析才能定位自动重启等运行异常的原因。
发明内容
本申请实施例提供了一种确定故障计算核方法及电子设备,可以自动、快速确定出具体故障计算核。
第一方面,本申请实施例提供了一种确定多核处理器中故障计算核的方法,应用于配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述方法包括:确定N次运行异常中各运行异常对应的计算核,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
结合第一方面,在第一方面第一种可能的实现方式中,所述多核处理器为中央处理器或图形处理器。
在该实现方式中,可以确定故障CPU核,也可以确定故障GPU核。
结合第一方面,在第一方面第二种可能的实现方式中,所述动态调度策略为完全公平调度策略。
在该实现方式中,电子设备基于完全公平调度策略调度多核处理器中的计算核,可提高 确定故障计算核的准确率。
结合第一方面,在第一方面第三种可能的实现方式中,所述对应于所述第一计算核的运行异常为连续发生的对应于所述第一计算核的运行异常。
在该实现方式中,通过判断某一计算核是否对应了连续发生的多次运行异常,来确定该计算核是否为故障核,可提高确定故障计算核的准确率。
结合第一方面,在第一方面第四种可能的实现方式中,所述对应于所述第一计算核的运行异常的次数等于N。
在该实现方式中,通过判断该电子设备已发生的多次运行异常是否对应于某一计算核,而确定该计算核为故障计算核,可提高故障计算核的准确率。
结合第一方面,在第一方面第五种可能的实现方式中,所述对应于所述第一计算核的运行异常为发生在预设期间内的对应于所述第一计算核的运行异常。
在该实现方式中,可以通过发生在预设期间内的运行异常来确定故障计算核,从而可以避免发生时间比较久远的运行异常对结果的影响。
结合第一方面,在第一方面第六种可能的实现方式中,所述方法还包括:屏蔽所述第一计算核。
在该实现方式中,在确定出故障计算核后,可以屏蔽该故障计算核,从而可避免在该故障计算核上运行程序指令而导致的异常运行,提高了用户体验。
结合第一方面,在第一方面第七种可能的实现方式中,所述运行异常为电子设备的异常重启。
在该实现方式中,通过异常重启这一故障计算核触发的运行异常中常见运行异常来确定故障计算核,可提高确定效率。
结合第一方面,在第一方面第八种可能的实现方式中,所述电子设备包括第一文件和第二文件;其中,所述第一文件记录有所述N次运行异常中各运行异常的发生时间和产生原因;所述第二文件记录有计算核的标识和运行异常的发生时间;所述确定N次运行异常中各运行异常对应的计算核包括:根据第一文件记录的运行异常的产生原因,从第一文件中确定所述N次运行异常;根据第一文件中记录的运行异常的发生时间和所述第二文件记录的运行异常的发生时间,从所述第二文件中确定所述N次运行异常中各运行异常对应的计算核。
在该实现方式中,通过第一文件记录运行异常的相关信息,通过第二文件记录运行异常对应的计算核信息,可通过运行异常的发生时间将运行异常和计算核信息关联,提高了确定故障计算核的效率。
结合第一方面,在第一方面第九种可能的实现方式中,所述故障计算核的信息记录在第三文件中,所述第三文件可被调用和/或发送给其他电子设备。
在该实现方式中,故障计算核的信息可以被记录的文件中,方便调用和发送给其他设备。
第二方面,本申请实施例提高了一种确定多核处理器中故障计算核的方法,应用于第一电子设备;所述方法包括:获取第二电子设备的日志文件;其中,所述第二电子设备配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述日志文件记录有所述第二电子设备的N次运行异常,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;确定所述N次运行异常中各运行异常对应的计算核;当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述 第一计算核为故障计算核,M为预设值。
在该方案中,电子设备可以获取其他电子设备的日志文件,并根据日志文件中记录的运行异常,确定该其他电子设备的故障计算核。
结合第二方面,在第二方面第一种可能的实现方式中,所述多核处理器为中央处理器或图形处理器。
结合第二方面,在第二方面第二种可能的实现方式中,所述动态调度策略为完全公平调度策略。
结合第二方面,在第二方面第三种可能的实现方式中,所述对应于所述第一计算核的运行异常为连续发生的对应于所述第一计算核的运行异常。
结合第二方面,在第二方面第四种可能的实现方式中,所述对应于所述第一计算核的运行异常的次数等于N。
结合第二方面,在第二方面第五种可能的实现方式中,所述对应于所述第一计算核的运行异常为发生在预设期间内的对应于所述第一计算核的运行异常。
结合第二方面,在第二方面第六种可能的实现方式中,所述方法还包括:向所述第二电子设备发送所述第一计算核的标识信息,以使所述第二电子设备屏蔽所述第一计算核。
结合第二方面,在第二方面第七种可能的实现方式中,所述运行异常为所述第二电子设备的异常重启。
结合第二方面,在第二方面第八种可能的实现方式中,所述日志文件包括第一文件和第二文件;其中,所述第一文件记录有所述N次运行异常中各运行异常的发生时间和产生原因;所述第二文件记录有计算核的标识和运行异常的发生时间;
所述确定所述N次运行异常中各运行异常对应的计算核包括:
根据第一文件记录的运行异常的产生原因,从第一文件中确定所述N次运行异常;
根据第一文件中记录的运行异常的发生时间和所述第二文件记录的运行异常的发生时间,从所述第二文件中确定所述N次运行异常中各运行异常对应的计算核。
第三方面,本申请实施例提供了一种确定多核处理器中故障计算核的装置,设置于配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述装置包括:
第一确定单元,用于确定N次运行异常中各运行异常对应的计算核,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;
第二确定单元,用于当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
第四方面,本申请实施例提供了一种确定多核处理器中故障计算核的装置,设置于第一电子设备;所述装置包括:
获取单元,用于获取第二电子设备的日志文件;其中,所述第二电子设备配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述日志文件记录有所述第二电子设备的N次运行异常,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;
第一确定单元,用于确定所述N次运行异常中各运行异常对应的计算核;
第二确定单元,用于当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
第五方面,本申请实施例提供了一种电子设备,包括至少一个处理器、存储器;所述至少一个处理器包括多核处理器,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;
所述存储器用于存储计算机执行指令,当所述电子设备运行时,所述至少一个处理器执行所述存储器存储的所述计算机执行指令,以使所述电子设备执行第一方面所述的方法。
第六方面,本申请实施例提供了一种电子设备,包括处理器、存储器、收发器;所述存储器用于存储计算机执行指令,当所述电子设备运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述电子设备执行第二方面所述的方法。
第七方面,本申请实施例提供了一种计算机存储介质,所述计算机存储介质包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行第一方面所述的方法或第二方面所述的方法。
第七方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品包含的程序代码被电子设备中的处理器执行时,实现第一方面所述的方法或第二方面所述的方法。
本申请实施例提供的确定多核处理器中故障计算核的方法,可以在电子设备发生了多次与多核处理器的计算核执行程序指令时出现的异常相关的运行异常时,通过分析该运行异常对应的计算核,若在多次运行异常中,有达到预设数量的运行异常对应的计算核为同一个计算核,则可以确定该计算核为故障计算核,从而实现了在无需专业人员以及无需专门的测试的情况下,自动、快速确定故障计算核。
附图说明
图1为本申请实施例提供的一种电子设备的硬件结构示意图;
图2为本申请实施例提供的一种电子设备的软件结构框图;
图3为本申请实施例提供的一种确定多核处理器中故障计算核的方法的流程图;
图4为本申请实施例提供的一种确定多核处理器中故障计算核的方法的原理框图;
图5为本申请实施例提供的一种确定多核处理器中故障计算核的方法的流程图;
图6为本申请实施例提供的一种确定多核处理器中故障计算核的装置的示意性框图;
图7为本申请实施例提供的一种确定多核处理器中故障计算核的装置的示意性框图;
图8为本申请实施例提供的一种电子设备的示意性框图;
图9为本申请实施例提供的一种电子设备的示意性框图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。
在本说明书的描述中“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”, 除非是以其他方式另外特别强调。
其中,在本说明书的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
在本说明书的描述中,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
本申请实施例提供了一种确定多核处理器中故障计算核的方法,在电子设备发生了多次与多核处理器的计算核执行程序指令时出现的异常相关的运行异常时,通过分析该运行异常对应的计算核,若在多次运行异常中,有达到预设数量的运行异常对应的计算核为同一个计算核,则可以确定该计算核为故障计算核。在本申请实施例中,故障计算核是指计算核本身具有故障。
本申请实施例提供的确定多核处理器中故障计算核核的方法可以应用于配置有多核处理器的电子设备。电子设备可以为手机、平板电脑、数码相机、个人数字助理(personal digitalassistant,PDA)、可穿戴设备、膝上型计算机(laptop)等便携式电子设备。便携式电子设备的示例性实施例包括但不限于搭载iOS、android、microsoft或者其他操作系统的便携式电子设备。上述便携式电子设备也可以是其他便携式电子设备,诸如具有触敏表面(例如触控面板)的膝上型计算机(laptop)等。还应当理解的是,在本申请其他一些实施例中,电子设备也可以不是便携式电子设备,而是具有触敏表面(例如触控面板)的台式计算机。本申请实施例对电子设备的类型不做具体限定。
图1示出了电子设备100的结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括中央处理器(central processing unit,CPU)。CPU可以集成有多个计算核,该多个计算核的各个核可以彼此独立。电子设备在运行时,可以将程序指令分配给CPU的一个或多个计算核,以执行该程序指令。
处理器110还可以包括图形处理器(graphics processing unit,GPU)。GPU可以集成多个计算核,该多个计算核的各个核可以彼此独立。电子设备在进行图形处理时,可以将图形 处理相关的程序指令分配给GPU的一个或多个计算核,以执行该程序指令。
处理器110还可以调制解调处理器,图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。 在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给中央处理器。中央处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local  area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),第五代,新空口(new radio,NR),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及中央处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和中央处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
在本申请的一些实施例中,当显示面板采用OLED、AMOLED、FLED等材料时,显示屏194可以被弯折,即电子设备100可以配置有可折叠显示屏。这里,显示屏194可以被弯折是指显示屏可以在固定部位或者任意部位被弯折到任意角度,并可以在该角度保持。可折叠显示屏具有两种模式:展开状态和折叠状态。其中,可折叠显示屏弯折时形成的弯折角度大于预设值时可看作处于展开状态,可折叠显示屏弯折时形成的弯折角度小于预设值时可看作处于折叠状态。弯折角度可以是指可折叠屏不用于显示内容的一面在弯折部位形成的角度。预设值可以预先定义,例如可以为90度、80度等。在一些实施例中,可折叠显示屏的弯折位置处可以设置有角度传感器,电子设备可以通过该角度传感器检测该弯折角度,并可根据该弯折角度判断可折叠显示屏是处于展开状态或者折叠状态。
可折叠显示屏处于展开状态时,可以全屏显示电子设备的操作系统所提供的用户界面。全屏显示用户界面可以是指该用户界面占用可折叠显示屏的全部显示区域,也可以是指用户界面占用显示屏的大部分显示区域,例如当可折叠显示屏为异形切割屏(Notch屏)时,异形切割屏的中间部分显示该用户界面,一侧或两侧边缘部分黑屏时,也可看作该可折叠显示屏全屏显示该用户界面。
可折叠显示屏处于折叠状态时,电子设备可以仅在该可折叠显示屏的其中一个显示屏上显示操作系统所提供的用户界面,也可以在该可折叠显示屏的两个显示屏上都显示电子设备的操作系统提供的用户界面,本申请实施例不做限制。
在一些实施例中,当可折叠显示屏由展开状态变换为折叠状态时,电子设备可以从在可折叠显示屏上全屏显示用户界面变换为在该可折叠显示屏上的其中一个显示屏上显示该用户界面。
在本申请的另一些实施例中,电子设备100可以配置有两个独立的显示屏,两个显示屏分别位于电子设备100的两面。当电子设备100配置有两个显示屏时,该两个显示屏可以具有相同的配置,也可以具有不同的配置。例如,该两个显示屏可以采用相同或不同的材料,可以具有相同或不同的屏幕尺寸,比如,一个显示屏是6英寸的OLED屏幕,一个显示屏是3.3英寸的LCD屏幕,本申请实施例不做限制。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及中央处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储 在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及中央处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。在一些实施例中,压力传感器180A可以检测到用户的手指接触显示屏194的检测信号而确定手指接触显示屏194的接触面积和接触区域,进而可以确定手指是否夹在折叠形态下的电子设备100之间。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给中央处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。中央处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图2是本申请实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)库和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括手机管家,通话,地图,即时通讯、相机等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括内容提供器(content providers)、视图系统(view system)以及管理器(managers),其中,管理器包括活动管理器(activity manager)、电话管理器(telephony manager)、通知管理器(notification manager)、资源管理器(resoure manager)、窗口管理器(window manager)等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
活动管理器用于管理应用程序的生命周期,及Activity栈管理等。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提 示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
安卓运行时(Android Runtime)包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括故障计算核定位模块和其他功能模块。其中,其他功能模块可以包括表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)等。
故障计算核定位模块可以根据每次内核层记录的异常运行的信息和内核层记录的运行异常对应的计算核的信息,确定每次异常运行对应的计算核的信息。计算核可以为多核CPU或多核GPU的计算核。其中,当多核CPU或多核GPU中的任意一个计算核对应的运行异常的次数满足预设规则时,可确定该计算核为故障计算核。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
二维图形引擎是二维绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含日志管理模块,异常处理模块,处理器驱动,显示驱动,键映射驱动,摄像头驱动,音频驱动,闪存驱动,Wi-Fi驱动,蓝牙驱动,传感器驱动,电源管理器驱动等。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
内核层中的异常处理模块可在文件A中记录运行异常的信息,该运行异常可以包括内核层的运行异常。该运行异常的信息可以包括该运行异常的发生时间、发生原因等信息。在一个例子中,异常处理模块可以调用oops函数在文件A中记录运行异常的信息。日志管理模块可以在文件B中记录运行异常对应的计算核的信息,例如运行异常的发生时间、计算核的标识等。在一个例子中,日志管理模块可以调用printk函数在文件B中记录计算核的信息。系统库中的故障计算核定位模块可以读取文件A和文件B记录的信息。其中,从文件A中筛选 出预设类型的运行异常(例如panic重启)以及该运行异常的时间。然后根据该运行异常的时间从文件B中确定该运行异常对应的核信息。若连续多次的预设类型的运行异常中的第一数量的运行异常对应的计算核为同一个计算核,可以确定该计算核为故障计算核(该计算核本身发生了故障)。故障计算核定位模块可以将该故障计算核的信息记录在文件C中。文件C可被应用层的应用程序访问,以及可被发送至其他电子设备(例如设备厂商的数据中心等)。
接下来,结合图3,对本申请实施例提供的确定多核处理中故障计算核的方法进行举例说明。该方法可应用于配置有多核处理器的电子设备。该多核处理器可集成有多个计算核(core)。计算核也可以称为处理核。该多个计算核之间相互独立,可并行执行程序指令。在电子设备运行时,电子设备可以利用动态调度策略将需要执行的程序指令分配给该多个计算核中的至少一个计算核,以执行程序指令。
动态调度策略也可以称为非静态分配策略,是指可避免一个或多个进程始终运行在多核处理器上的某一个计算核上的调度策略。
在一些实施例中,动态调度策略可以为基于内核层的多核处理器负载均衡调度算法。具体地,基于内核层的多核处理器负载均衡调度算法可以为完全公平调度策略(completely fair scheduler,CFS)。电子设备的内核层可以根据完全公平调度策略将需要执行的程序指令分配给多个计算核中的一个或多个,可实现随机分配,多个计算核中各计算核被分配到该程序指令的机率相等或大致相等。
在一些实施例中,动态调度策略可以为轮询策略。
在一些实施例中,该多核处理器可以为多核CPU。相应地,计算核为CPU核,也可称为CPU核心或CPU处理核心。
在一些实施例中,该多核处理器可以为多核GPU。相应地,计算核为GPU核,也可称为GPU核心或GPU处理核心。
如图3所示,该方法还包括如下步骤。
步骤301,确定N次运行异常中各运行异常对应的计算核,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致。
N可以为预设的整数,例如3、5、10等。
通常,计算核执行程序指令时出现的异常可包括如下情况:
计算核本身的故障,可导致其在执行程序指令时出现异常;
程序指令有漏洞(bug),当该程序指令被计算核执行时,可出现异常;
存储数据或指令的存储区域(例如DDR的分区)故障,当计算核执行程序指令,调用在故障存储区域上存储的数据或指令时,可出现异常。
计算核执行程序指令时出现的异常可导致电子设备的运行异常。通常该运行异常具体可以为异常重启、黑屏、冻屏等。其中,以异常重启最为常见。
在一些实施例中,计算核执行程序指令时出现的异常导致的电子设备的异常重启可以称为panic重启。
另外,电子设备摄像头出现异常、麦克风出现异常、电池的电流或电压出现异常等也可以导致电子设备的异常运行,例如异常重启。
电子设备可以记录发生的运行异常的相关信息,其中包括发生时间,以及该运行异常的发生原因。电子设备还可以记录运行异常对应的器件的信息,例如,若该运行异常是由计算核执行程序指令时出现的异常导致的,电子设备可以记录该计算核的信息。
在一些实施例中,发生时间可以为运行异常发生的时间。以运行异常为异常重启为例, 若计算核执行程序指令时出现异常,内核层可调用系统重启流程进行重启。在执行重启之前,内核层可以调用oops函数在文件A中记录该重启的发生原因和该重启的发生时间,并保存文件A。文件A可以为文本文件。
电子设备可以将运行异常的发生时间和该运行异常对应的器件的信息,记录在一个文件B中,并保存文件B。器件的信息具体可以为器件的标识。文件B可以为文本文件。
在一个例子中,以运行异常为异常重启为例,若计算核执行程序指令时出现异常,内核层可调用系统重启流程进行重启。内核层可以在文件B记录该异常重启对应的计算核的标识以及异常重启的发生时间等信息。在一个例子中,内核层可以调用printk函数在文件B记录该异常重启对应的器件的标识以及异常重启的发生时间等信息。
在一个例子中,若运行异常的原因为摄像头出现的异常或麦克风出现的异常或电池的电流或电压出现的异常等时,记录在文件B中的运行异常对应的器件的信息可以包括出现异常的器件(摄像头或麦克风或电池等)的信息和异常出现时正在执行程序指令的计算核的信息。
在这些实施例的一个说明性示例中,文件A和文件B可以为不同的文件。文件A中可以记录了至少一次运行异常的相关信息,其中,各次运行异常的相关信息可以包括该运行异常的发生原因、发生时间等信息。文件B中可以记录了至少一次运行异常的发生时间和该至少一次运行异常对应的器件的信息,其中,各次运行异常对应的器件的信息可以包括器件的标识,例如计算核的编号。
在一个具体例子中,文件A的至少部分数据记录格式可如表1所示,文件B中的至少部分数据记录格式可如表2所示。
表1
Figure PCTCN2020116343-appb-000001
在表1中,reason为运行异常的原因,time为运行异常的发生时间。reason中的AP为应用处理器(application processor)的缩写。应用处理器也可以称为CPU。该reason可表示运行异常的原因为应用处理器或CPU的计算核执行程序指令时出现异常。
表2
Figure PCTCN2020116343-appb-000002
在表2中,time为运行重启的发生时间,data为多核CPU中的某一计算核的编号,该编号可以作为该计算核的标识。
在一些实施例中,文件A可以是一组文件,其中每一组文件中记录了一次运行异常的相关信息。文件A对应的一组文件可以进行压缩。
文件B可以是一组文件,其中每一组文件中记录了一次运行异常的发生时间,以及该次运行异常对应的器件的信息。文件B对应的一组文件可以进行压缩。
在一些实施例中,文件A或文件B也可以是其他形式的数据或日志或记录。
在一些实施例中,发生时间可以为导致该运行异常的原因发生时间。运行异常的原因具 体可以为上述的计算核执行程序指令时出现的异常、摄像头出现的异常、麦克风出现的异常、电池的电流或电压出现的异常等。在运行异常的原因发生时,内核层可以调用oops函数在文件a中记录运行异常的原因、该原因的发生时间,并保存文件a。文件a可以参考上文对文件A的介绍,在此不再赘述。
电子设备可以将导致该运行异常的原因发生时间和该运行异常对应的器件的信息,记录在一个文件b中。内核层可以在文件b记录该运行对应的器件的标识以及运行异常的原因发生时间等信息,并保存文件b。文件b可以参考上文对文件B的介绍。
在一个例子中,若运行异常的原因为摄像头出现的异常或麦克风出现的异常或电池的电流或电压出现的异常等时,记录在文件b中的运行异常对应的器件的信息可以包括出现异常的器件(摄像头或麦克风或电池等)的信息和异常出现时正在执行程序指令的计算核的信息。
在步骤301中,电子设备可以根据运行异常的原因,确定多个由计算核执行程序指令时出现的异常导致的运行异常。并确定该多个运行异常中各运行异常对应的计算核。
在一些实施例中,步骤301可以在运行异常结束后执行。以异常重启为例,步骤301可以在电子设备完成重启后执行。
在一些实施例中,可根据运行异常的原因,从文件A中确定多个由计算核执行程序指令时出现的异常导致的运行异常。然后,根据运行异常的发生时间,从文件B中,确定该多个运行异常中各运行异常对应的计算核。对于该多个运行异常中的任意运行异常,其发生时间在文件A和文件B都有记录,并且文件B记录了计算核的信息。因此,可根据该运行异常的发生时间,确定该运行异常对应的计算核。
在一些实施例中,可根据运行异常的原因,从文件a中确定多个由计算核执行程序指令时出现的异常导致的运行异常。然后,根据运行异常的发生时间,从文件b中,确定该多个运行异常中各运行异常对应的计算核。对于该多个运行异常中的任意运行异常,其原因的发生时间在文件a和文件b都有记录,并且文件b记录了计算核的信息。因此,可根据该运行异常的原因的发生时间,确定该运行异常对应的计算核。
在一些实施例中,确定的多个由计算核执行程序指令时出现的异常导致的运行异常可以为连续发生的运行异常。以异常重启为例,确定的多个异常重启为连续发生的异常重启。
在一些实施例中,确定的多个由计算核执行程序指令时出现的异常导致的运行异常可以为发生在预设期间内的运行异常。该预设期间可以为以当前时刻起点,在时间维度上,向前计算预设时长的期间,例如最近7天或10天或3天等。
步骤303,当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
容易理解,内核层基于动态调度策略为多核处理器中的各个分配程序指令,某一程序指令非始终运行在某一个计算核上,并且DDR等存储器的一个或多个分区上的数据或指令也非始终由某一个计算核调用。若N次运行异常中的较多或全部的运行异常是由第一计算核运行程序指令时出现的异常导致的,则可表明或反映出现的异常大概率是第一计算核本身的故障造成的。
M可以根据N的值预先设定的整数。M可以等于或小于N,例如N为3,M可以为3。再例如N为5,M可以为4。再例如N为10,M可以为8。等等,此处不再一一列举。开发人员可以根据相关指标来设定N和M的值。例如为了降低误判率,可以将N和M设置的高些。再例如,为了快速确定故障计算核,可以将N和M设置的低些。
在一些实施例中,对应于所述第一计算核的运行异常可以为连续发生的对应于所述第一 计算核的运行异常。
在这些实施例的一个说明性示例中,可以设定以为2。以集成了8个计算核的处理器为例,在动态调度策略下,某个具有漏洞的程序指令连续2次由8个计算核中的任一个计算核运行的概率为
Figure PCTCN2020116343-appb-000003
或者,DDR等存储器的一个或多个故障分区上的数据或指令由8个计算核中任一个计算核调用的概率为
Figure PCTCN2020116343-appb-000004
因此,若至少2次连续发生的运行异常对应第一计算核,则将第一计算核确定为故障计算核的误判率不大于
Figure PCTCN2020116343-appb-000005
即误判率不大于12.5%。
在这些实施例的一个说明性示例中,可以设定M为3。仍以集成了8个计算核的处理器为例,在动态调度策略下,误判率不大于
Figure PCTCN2020116343-appb-000006
即误判率不大于1.6%。
在一些实施例中,所述对应于所述第一计算核的运行异常的次数等于N。
在这些实施例的一个说明性示例中,可以设定N为3,则误判率不大于1.6%。
在实际实验中,按照该示例的设定,确定故障核的准确率也超过了95%。
在一些实施例中,N>M,且所述对应于所述第一计算核的运行异常的次数为M。
在这些实施例的一个说明性示例中,可以设定N为10,M为9。仍以集成了8个计算和的处理器为例,则误报率已接近于0了。
在一些实施例中,所述对应于所述第一计算核的运行异常为发生在预设期间内对应于所述第一计算核的的运行异常。
该预设期间可以为以当前时刻起点,在时间维度上,向前计算预设时长的期间,例如最近7天或10天或3天等。以避免较久远的异常运行的干扰。
在一些实施例中,步骤303可被一些等效判断方法代替。
在一个说明性示例中,可代替步骤303的等效判断方法可以为:在预设时间内发生的多次运行异常中,对应于所述第一计算核的异常的次数≥K。该预设时间可以为以当前时刻起点,在时间维度上,向前计算预设时长的期间(例如最近7天或10天或3天等)。K为预设值(例如可以为3、5、6等)。
在一个说明性示例中,可代替步骤303的等效判断方法可以为:在预设时间内发生的多次运行异常中,对应于所述第一计算核的异常的比例≥Z%。该预设时间可以为以当前时刻起点,在时间维度上,向前计算预设时长的期间(例如最近7天或10天或3天等)。Z%为预设值(例如可以为70%、80%、90%等)。
在一些实施例中,在确定出故障计算核时,可以屏蔽该故障计算核,使得内核层在分配程序指令时可以忽略该故障计算核,从而可避免该故障计算核导致的运行异常。
在一个说明性示例中,可调用内核层处理器驱动可以使用echo命令禁止或停用该故障计算核。禁止或停用该故障计算核可以称为屏蔽该故障计算核。在一个具体例子中,该echo命令可以为echo 0>/sys/devices/system/cpu/cpu3/online。其中,cpu3表示编号为3的CPU核。
在一些实施例中,在确定出故障计算核时,可以将该故障计算核的信息,例如计算核的标识等,记录在文件C中,并保存文件C。文件C可以参考上文对文件A的介绍,在此不再 赘述。
在一个说明性示例中,应用层的应用,例如手机管家等可以通过API接口读取文件C,以读取故障计算核的信息。该应用读取了故障计算核的信息,可以展示该故障计算核,以使用户或维修人员明白出故障的计算核。
在该示例的一个例子中,每当文件C记录了故障计算核的信息时,可以通知应用层的应用,以使该应用进行读取。
在一个说明性示例中,电子设备还可以将文件C发送给其他电子设备,例如发送给设备厂商的数据中心服务器,以使设备厂商进行相关统计。在一个具体例子中,将文件C发送给其他电子设备可以为响应于用户起始的操作而执行的操作,即用户可以主动将文件C发送给其他电子设备。在一个具体例子中,电子设备可以请求用户的授权,在获得用户授权的情况下,将文件C发送给其他电子设备。具体地,电子设备可以在显示屏上显示授权请求信息,其中包括风险提示信息、拒绝功能选项和同意功能选项。在检测到用户点击或触摸同意功能选项后,可将文件C发送给其他电子设备。
在一个说明性示例中,每当文件C记录了故障计算核的信息时,可以通知设备厂商的数据中心服务器,以使该数据中心服务器读取文件C中的故障计算核信息。
在一些实施例中,图3所述的方法具体可以由系统库(也可称为原生(native)层)中的故障计算核定位模块执行。
在一个说明性示例中,该故障计算核定位模块可以为原生层的应用程序。该故障计算核定位模块可以C语言或C++语言编写。该故障计算核定位模块可以读取文件A,确定由计算核执行程序指令时出现的异常导致的运行异常,以及运行异常的发生时间。该故障计算核定位模块还可以读取文件B中记录的运行异常的发生时间和运行异常对应的cpu核信息。故障计算核定位模块可以通过任意的运行异常的发生时间,确定该运行异常对应的cpu核信息。从而可确定各运行异常对应的cpu核。
内核层可以包括日志管理模块、异常处理oops函数、CPU驱动等。
异常处理函数oops可以电子设备的异常重启记录到文件A,日志管理模块调用printk函数记录该异常重启对应的cpu核信息(包括cpu核标识)到文件B。文件A的格式如下表1所示,关键信息是reason、time。文件B的格式如表2所示,关键信息是Time,Data。
在一个具体例子中。1)当电子设备的软件代码运行到故障cpu核时,发生异常,导致软件代码访问的数据/指令地址非法,触发异常处理oops函数记录异常重启事件到文件A,以及触发日志管理模块调用printk函数将该异常重启事件对应的核信息和发生事件记录到文件B。接着内核层调用系统重启流程主动重启电子设备。在发生第1次系统异常重启后,故障计算核定位模块通过读取文件A,采集到异常重启事件,记录该异常重启事件的发生时间,同时基于该异常重启事件的发生时间,读取文件B中记录的cpu核的标识,例如cpu核的标识可以为编号,更具体的,可以为编号3。
2)重复步骤2),直到发生第3次异常重启后,故障计算核定位模块计算第3次异常重启和第1次异常重启发生的时间间隔在7天之内,同时第3次异常重启发生后,读取文件B中记录的cpu核编号为3,和前面2次一样,则判断是编号为3的cpu核故障,将结果写入到文件C,通知java层的应用或者大数据网站的数据库去读取。java层的应用可以为手机管家等第三方提供的系统管理应用程序。大数据网站可以为设备厂商的数据中心。在接收到大数据网站的数据库发送的读取请求时,电子设备可以请求用户的授权,在得到用户授权后,可允许大数据网站的数据库读取文件C。
3)可调用cpu驱动模块提供的echo命令去关闭编号为3的cpu核(即屏蔽编号为3的cpu核),禁止编号为3的cpu核运行。
通过本示例中的方案,在实际实验中,通过内核系统重启故障类型的定位算法,可以准确定位出cpu核的故障。从抽样回来的故障机验证效果看,准确率达到95%以上,实现了出现该故障就可以自动定位和精准维修,无需再压测分析。
本申请实施例提供的确定多核处理器中故障计算核的方法,可以在电子设备发生了多次与多核处理器的计算核执行程序指令时出现的异常相关的运行异常时,通过分析该运行异常对应的计算核,若在多次运行异常中,有达到预设数量的运行异常对应的计算核为同一个计算核,则可以确定该计算核为故障计算核,从而实现了在无需专业人员以及无需专门的测试的情况下,自动、快速确定故障计算核。
接下来,结合图4,在一些实施例中,对本申请实施例提供的确定多核处理器中故障计算核的方法的实现原理进行举例介绍。
如图4所示,电子设备的软件框架可以包括java应用层、native应用层和内核层。
java应用层可包括java应用程序,例如网点维修apk应用。
Native应用层包括native应用程序。native应用程序可以用C语言或C++语言编写。Native应用程序可以进行重启信息收集,并利用重启定位算法,定位重启是CPU核故障导致的,并记录到文本文件,以及通知java应用程序或大数据网站数据库读取。具体地,Native应用程序读取文本文件A和文本文件B,采集重启故障和对应的cpu核信息,通过Native应用程序的重启定位算法,定位出是cpu核故障,记录到文本文件C中。接着通过内核cpu驱动模块的echo命令去禁止出故障的cpu核,保障用户的稳定性体验。或者Native应用程序把cpu核故障结果文本文件上报给网点维修工具(即网点维修apk应用),提供准确的维修方案。或者把cpu核故障结果文本文件上报大数据网站解析,提供给研发人员定位原因。
内核层可以包括日志管理模块、异常处理函数oops、CPU驱动等。
本实施例的方案中,关键之处在于重启定位算法,其将重启故障类型和CPU核信息通过经验值关联起来。具体如下。
1)内核异常处理函数oops记录系统异常重启到文本文件A,内核日志管理模块调用printk函数记录cpu核信息到文本文件B。文本文件A的格式如下表1所示,关键信息是reason、time。文本文件B的格式如表2所示,关键信息是Time,Data。
2)当设备的软件代码运行到故障cpu核发生故障,导致软件代码访问的数据/指令地址非法,触发内核调用oops函数记录异常重启事件到文本文件A,接着内核调用系统重启流程主动重启设备。在发生第1次系统异常重启后,Native层应用程序通过读取文本文件A,采集到异常重启事件,记录重启发生的时间,同时读取文本文件B中记录的cpu核编号为3
3)重复步骤2),直到发生第3次系统异常重启后,Native层应用程序计算第3次异常重启和第1次异常重启发生的时间间隔在7天之内,同时第3次异常重启发生后,读取文本文件B中记录的cpu核编号为3,和前面2次一样,则判断是cpu3故障,将结果写入到文本文件C,通知java应用或者大数据网站的数据库去读取。
4)调用内核cpu驱动模块提供的echo命令去关闭cpu3,禁止cpu3运行。
需要说明的是,定位故障CPU核可有如下前提条件,以获得较为准确的结果:
1)基于内核层的多核系统负载均衡调度算法,例如完全公平调度策略(completely fair scheduler,CFS),不会出现某个进程固定跑在某个cpu核上的情况。
2)片上系统(system on chip,SOC)包括的Cpu核的数目至少8个,保证在非故障情 况下,随机连续3次出现同一个核的概率,即误报率不大于(cpu核的数目/cpu核的数目的3次方),即8/512,即1.6%。
本实施例的方案采集内核系统重启这种故障类型,和cpu核信息进行经验值关联,可以准确定位出cpu核故障。通过本实施例的方案,自动禁核保障用户稳定性体验;并且记录故障CPU核的文件可以提供给网点维修工具,以便进行精准维修;以及记录故障CPU核的文件可以上报给大数据网站,以便研发分析。
本申请实施例提供了一种确定多核处理器中故障计算核的方法,可由第一电子设备执行。第一电子设备可以为任何具有计算、处理能力的装置、设备、平台、设备集群。在一个例子中,第一电子设备可以为位于手机等终端维修网点的电子设备。在另一个例子中,第一电子设备可以为手机等终端的生产厂商的电子设备。在另一个例子中,第一电子设备可以为用户可使用的电子设备。
参阅图5,该方法包括如下步骤。
步骤501,获取第二电子设备的日志文件;其中,所述第二电子设备配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述第二电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述日志文件记录有所述第二电子设备的N次运行异常,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致。
第二电子设备可以参考图1所示的电子设备100的介绍。第二电子设备的运行时,向多个计算核分配程序指令的方式,以及计算核对程序指令的执行等,可以参考上文对图3所示实施例的介绍。
在一些实施例中,在第一电子设备获取第二电子设备之前,可以建立网络连接,以便第二电子设备将日志文件发送给第一电子设备。例如通过蓝牙等方式建立连接。
在一些实施例中,在第一电子设备获取第二电子设备之前,可以通过数据线连接,以便第二电子设备将日志文件发送给第一电子设备。例如通过USB数据线等建立连接。
在一些实施例中,第一电子设备可以为第二电子设备对应的服务端设备。例如,第一电子设备可以为第二电子设备生产厂商的为第二电子设备提供云端服务的设备。
在一些实施例中,第二电子设备可以向第一电子设备发送日志文件。
在一个说明性示例中,第一电子设备可以请求用户的授权,在获得用户授权的情况下,将日志文件发送给第二电子设备。具体地,电子设备可以在显示屏上显示授权请求信息,其中包括风险提示信息、拒绝功能选项和同意功能选项。在检测到用户点击或触摸同意功能选项后,可将日志文件发送给其他电子设备。
步骤503,确定所述N次运行异常中各运行异常对应的计算核。
步骤503可以参考上文对步骤301的介绍,在此不再赘述。
步骤505,当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
步骤505可以参考上文对步骤303的介绍,在此不再赘述。
在一些实施例中,所述多核处理器为中央处理器或图形处理器。
在一些实施例中,所述动态调度策略为完全公平调度策略。
在一些实施例中,所述对应于所述第一计算核的运行异常为连续发生的对应于所述第一 计算核的运行异常。具体可以参考上文对步骤303的介绍,在此不再赘述。
在一些实施例中,所述对应于所述第一计算核的运行异常的次数等于N。具体可以参考上文对步骤303的介绍,在此不再赘述。
在一些实施例中,所述对应于所述第一计算核的运行异常为发生在预设期间内的对应于所述第一计算核的运行异常。具体可以参考上文对步骤303的介绍,在此不再赘述。
在一些实施例中,所述方法还包括:向所述第二电子设备发送所述第一计算核的标识信息,以使所述第二电子设备屏蔽所述第一计算核。
第一电子设备在确定出故障计算核后,可以向第二电子设备发送该故障计算核的标识信息。第二电子设备可以根据标识信息识别故障计算核,并屏蔽该故障计算核。具体可以参考上文对步骤303的介绍,在此不再赘述。
在一些实施例中,所述运行异常为所述第二电子设备的异常重启。
在一些实施例中,所述日志文件包括第一文件和第二文件;其中,所述第一文件记录有所述N次运行异常中各运行异常的发生时间和产生原因;所述第二文件记录有计算核的标识和运行异常的发生时间;第一文件和第二文件可以参考上文对文件A(或文件a)和文件B(或文件b)的介绍。
所述确定所述N次运行异常中各运行异常对应的计算核包括:根据第一文件记录的运行异常的产生原因,从第一文件中确定所述N次运行异常;根据第一文件中记录的运行异常的发生时间和所述第二文件记录的运行异常的发生时间,从所述第二文件中确定所述N次运行异常中各运行异常对应的计算核。具体可以参考上文对步骤303的介绍,在此不再赘述。
本申请实施例提供的确定多核处理器中故障计算核的方法,可以获取其他电子设备的日志文件,并根据该日志文件中记录的运行异常确定该其他电子设备的故障核,从而实现了在无需专业人员以及无需专门的测试的情况下,自动、快速确定故障计算核。
本申请实施例提供了一种确定多核处理器中故障计算核的装置600。该装置600可设置于配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的。
参阅6,所述装置600包括:
第一确定单元610,用于确定N次运行异常中各运行异常对应的计算核,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;
第二确定单元620,用于当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
上文主要从方法流程的角度对本申请实施例提供的装置600进行了介绍。可以理解的是,各个电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据图3所示的各方法实施例对电子设备等进行功能模块的划分,例 如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
本申请实施例提供的装置,可以在电子设备发生了多次与多核处理器的计算核执行程序指令时出现的异常相关的运行异常时,通过分析该运行异常对应的计算核,若在多次运行异常中,有达到预设数量的运行异常对应的计算核为同一个计算核,则可以确定该计算核为故障计算核,从而实现了在无需专业人员以及无需专门的测试的情况下,自动、快速确定故障计算核。
本申请实施例提供了一种确定多核处理器中故障计算核的装置700。该装置700可设置于第一电子设备。参阅图7,所述装置700包括:
获取单元710,用于获取第二电子设备的日志文件;其中,所述第二电子设备配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述第二电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述日志文件记录有所述第二电子设备的N次运行异常,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;
第一确定单元720,用于确定所述N次运行异常中各运行异常对应的计算核;
第二确定单元730,用于当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
上文主要从方法流程的角度对本申请实施例提供的装置700进行了介绍。可以理解的是,各个电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据图5所示的各方法实施例对电子设备等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
本申请实施例提供的装置,可以获取其他电子设备的日志文件,并根据该日志文件中记录的运行异常确定该其他电子设备的故障核,从而实现了在无需专业人员以及无需专门的测试的情况下,自动、快速确定故障计算核。
本申请实施例提供了一种电子设备。参阅图8,该电子设备可以包括至少一个处理器810、存储器820。所述至少一个处理器810包括多核处理器。所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基 于动态调度策略分配的。
所述存储器820用于存储计算机执行指令;当所述电子设备运行时,所述至少一个处理器810执行所述存储器820存储的所述计算机执行指令,以使所述电子设备执行图3所示的方法。其中,所述至少一个处理器810用于确定N次运行异常中各运行异常对应的计算核,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;所述至少一个处理器810还用于当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
在一些实施例中,该电子设备还包括通信总线830,其中,所述至少一个处理器810可通过通信总线830与存储器820,从而可获取存储器820存储的计算机执行指令,并执行该计算机执行指令。
本申请实施例的电子设备端各个部件/器件的具体实施方式,可参照上文如图3所示的各方法实施例实现,此处不再赘述。
由此,可以在电子设备发生了多次与多核处理器的计算核执行程序指令时出现的异常相关的运行异常时,通过分析该运行异常对应的计算核,若在多次运行异常中,有达到预设数量的运行异常对应的计算核为同一个计算核,则可以确定该计算核为故障计算核,从而实现了在无需专业人员以及无需专门的测试的情况下,自动、快速确定故障计算核。
本申请实施例提供了一种电子设备。参阅图9,该电子设备可以包括处理器910、存储器920。所述存储器920用于存储计算机执行指令;当所述电子设备运行时,所述处理器910执行所述存储器920存储的所述计算机执行指令,以使所述电子设备执行图5所示的方法。其中,所述处理器910用于获取第二电子设备的日志文件;其中,所述第二电子设备配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述第二电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述日志文件记录有所述第二电子设备的N次运行异常,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;所述处理器910还用于确定所述N次运行异常中各运行异常对应的计算核;所述处理器910还用于当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
在一些实施例中,该电子设备还包括通信总线930,其中,处理器910可通过通信总线930与存储器920,从而可获取存储器920存储的计算机执行指令,并执行该计算机执行指令。
本申请实施例的电子设备端各个部件/器件的具体实施方式,可参照上文如图5所示的各方法实施例实现,此处不再赘述。
由此,可以获取其他电子设备的日志文件,并根据该日志文件中记录的运行异常确定该其他电子设备的故障核,从而实现了在无需专业人员以及无需专门的测试的情况下,自动、快速确定故障计算核。
本申请的实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read-only memory,ROM)、可编程只读存储器(programmable rom,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、CD-ROM 或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。

Claims (25)

  1. 一种确定多核处理器中故障计算核的方法,其特征在于,应用于配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述方法包括:
    确定N次运行异常中各运行异常对应的计算核,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;
    当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
  2. 根据权利要求1所述的方法,其特征在于,所述多核处理器为中央处理器或图形处理器。
  3. 根据权利要求1所述的方法,其特征在于,所述动态调度策略为完全公平调度策略。
  4. 根据权利要求1所述的方法,其特征在于,所述对应于所述第一计算核的运行异常为连续发生的对应于所述第一计算核的运行异常。
  5. 根据权利要求1所述的方法,其特征在于,所述对应于所述第一计算核的运行异常的次数等于N。
  6. 根据权利要求1所述的方法,其特征在于,所述对应于所述第一计算核的运行异常为发生在预设期间内的对应于所述第一计算核的运行异常。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:屏蔽所述第一计算核。
  8. 根据权利要求1所述的方法,其特征在于,所述运行异常为电子设备的异常重启。
  9. 根据权利要求1所述的方法,其特征在于,所述电子设备包括第一文件和第二文件;其中,所述第一文件记录有所述N次运行异常中各运行异常的发生时间和产生原因;所述第二文件记录有计算核的标识和运行异常的发生时间;
    所述确定N次运行异常中各运行异常对应的计算核包括:
    根据第一文件记录的运行异常的产生原因,从第一文件中确定所述N次运行异常;
    根据第一文件中记录的运行异常的发生时间和所述第二文件记录的运行异常的发生时间,从所述第二文件中确定所述N次运行异常中各运行异常对应的计算核。
  10. 根据权利要求1所述的方法,其特征在于,所述故障计算核的信息记录在第三文件中,所述第三文件可被调用和/或发送给其他电子设备。
  11. 一种确定多核处理器中故障计算核的方法,其特征在于,应用于第一电子设备;所述方法包括:
    获取第二电子设备的日志文件;其中,所述第二电子设备配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述第二电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述日志文件记录有所述 第二电子设备的N次运行异常,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;
    确定所述N次运行异常中各运行异常对应的计算核;
    当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
  12. 根据权利要求11所述的方法,其特征在于,所述多核处理器为中央处理器或图形处理器。
  13. 根据权利要求11所述的方法,其特征在于,所述动态调度策略为完全公平调度策略。
  14. 根据权利要求11所述的方法,其特征在于,所述对应于所述第一计算核的运行异常为连续发生的对应于所述第一计算核的运行异常。
  15. 根据权利要求11所述的方法,其特征在于,所述对应于所述第一计算核的运行异常的次数等于N。
  16. 根据权利要求11所述的方法,其特征在于,所述对应于所述第一计算核的运行异常为发生在预设期间内的对应于所述第一计算核的运行异常。
  17. 根据权利要求11所述的方法,其特征在于,所述方法还包括:向所述第二电子设备发送所述第一计算核的标识信息,以使所述第二电子设备屏蔽所述第一计算核。
  18. 根据权利要求11所述的方法,其特征在于,所述运行异常为所述第二电子设备的异常重启。
  19. 根据权利要求11所述的方法,其特征在于,所述日志文件包括第一文件和第二文件;其中,所述第一文件记录有所述N次运行异常中各运行异常的发生时间和产生原因;所述第二文件记录有计算核的标识和运行异常的发生时间;
    所述确定所述N次运行异常中各运行异常对应的计算核包括:
    根据第一文件记录的运行异常的产生原因,从第一文件中确定所述N次运行异常;
    根据第一文件中记录的运行异常的发生时间和所述第二文件记录的运行异常的发生时间,从所述第二文件中确定所述N次运行异常中各运行异常对应的计算核。
  20. 一种确定多核处理器中故障计算核的装置,其特征在于,设置于配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述装置包括:
    第一确定单元,用于确定N次运行异常中各运行异常对应的计算核,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;
    第二确定单元,用于当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
  21. 一种确定多核处理器中故障计算核的装置,其特征在于,设置于第一电子设备;所述装置包括:
    获取单元,用于获取第二电子设备的日志文件;其中,所述第二电子设备配置有多核处理器的电子设备,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述第二电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;所述日志文件记录有所述第二电子设备的N次运行异常,所述运行异常由在所述多个计算核中的任意计算核执行程序指令时出现的异常所导致;
    第一确定单元,用于确定所述N次运行异常中各运行异常对应的计算核;
    第二确定单元,用于当所述N次运行异常中对应于所述第一计算核的运行异常的次数≥M时,确定所述第一计算核为故障计算核,M为预设值。
  22. 一种电子设备,其特征在于,包括至少一个处理器、存储器;所述至少一个处理器包括多核处理器,所述多核处理器集成有多个计算核,所述多个计算核中的各计算核之间相互独立,所述多个计算核包括第一计算核;其中,在所述电子设备运行时,所述多个计算核中的至少一个计算核执行程序指令,所述程序指令是基于动态调度策略分配的;
    所述存储器用于存储计算机执行指令,当所述电子设备运行时,所述至少一个处理器执行所述存储器存储的所述计算机执行指令,以使所述电子设备执行权利要求1-10任一项所述的方法。
  23. 一种电子设备,其特征在于,包括处理器、存储器;
    所述存储器用于存储计算机执行指令,当所述电子设备运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述电子设备执行权利要求11-19任一项所述的方法。
  24. 一种计算机存储介质,其特征在于,所述计算机存储介质包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行权利要求1-10任一项所述的方法或权利要求11-19任一项所述的方法。
  25. 一种计算机程序产品,其特征在于,所述计算机程序产品包含的程序代码被电子设备中的处理器执行时,实现权利要求1-10任一项所述的方法或权利要求11-19任一项所述的方法。
PCT/CN2020/116343 2019-09-19 2020-09-19 一种确定多核处理器中故障计算核的方法及电子设备 WO2021052489A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20866341.9A EP4020215A4 (en) 2019-09-19 2020-09-19 METHOD FOR DETERMINING A COMPUTER CORE OF ERRORS IN A MULTI-CORE PROCESSOR AND ELECTRONIC DEVICE
US17/761,683 US11815990B2 (en) 2019-09-19 2020-09-19 Method for determining faulty computing core in multi-core processor and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910888839.6 2019-09-19
CN201910888839.6A CN112527541A (zh) 2019-09-19 2019-09-19 一种确定多核处理器中故障计算核的方法及电子设备

Publications (1)

Publication Number Publication Date
WO2021052489A1 true WO2021052489A1 (zh) 2021-03-25

Family

ID=74884332

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/116343 WO2021052489A1 (zh) 2019-09-19 2020-09-19 一种确定多核处理器中故障计算核的方法及电子设备

Country Status (4)

Country Link
US (1) US11815990B2 (zh)
EP (1) EP4020215A4 (zh)
CN (1) CN112527541A (zh)
WO (1) WO2021052489A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116089436B (zh) * 2022-11-29 2023-11-07 荣耀终端有限公司 一种大数据量的数据稽核方法和电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629228A (zh) * 2012-04-26 2012-08-08 迈普通信技术股份有限公司 多核通信系统中检测数据核故障的方法及装置
CN104137077A (zh) * 2012-02-13 2014-11-05 三菱电机株式会社 处理器系统
CN106407088A (zh) * 2016-09-08 2017-02-15 努比亚技术有限公司 一种对多核cpu进行检测的方法和装置
CN109685399A (zh) * 2019-02-19 2019-04-26 贵州电网有限责任公司 电力系统日志整合分析方法及系统
CN110221932A (zh) * 2018-03-01 2019-09-10 欧姆龙株式会社 计算机及其控制方法

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4458119B2 (ja) * 2007-06-11 2010-04-28 トヨタ自動車株式会社 マルチプロセッサシステム及びその制御方法
US9063906B2 (en) * 2012-09-27 2015-06-23 International Business Machines Corporation Thread sparing between cores in a multi-threaded processor
CN104199768B (zh) * 2014-08-21 2017-04-05 大唐移动通信设备有限公司 多核处理器置位的方法和装置
US9658940B2 (en) * 2015-03-19 2017-05-23 International Business Machines Corporation Method to efficiently implement synchronization using software managed address translation
US9529661B1 (en) 2015-06-18 2016-12-27 Rockwell Collins, Inc. Optimal multi-core health monitor architecture
US9939867B2 (en) 2015-06-29 2018-04-10 International Business Machines Corporation Handling a failure in a system with distributed control of power and thermal management
US10552270B2 (en) * 2016-12-22 2020-02-04 Intel Corporation Systems and methods for in-field core failover
CN107908491B (zh) * 2017-10-31 2021-06-15 努比亚技术有限公司 卡屏检测与解决方法、移动终端及计算机可读存储介质
CN107977444A (zh) * 2017-12-11 2018-05-01 成都博睿德科技有限公司 基于大数据的海量数据并行处理方法
US10725848B2 (en) 2018-02-07 2020-07-28 Intel Corporation Supporting hang detection and data recovery in microprocessor systems
CN109298961A (zh) * 2018-08-28 2019-02-01 迈普通信技术股份有限公司 多核处理器的故障处理方法、装置及网络设备
CN109783210B (zh) * 2018-12-13 2023-10-20 平安科技(深圳)有限公司 多任务处理方法、装置、计算机设备及存储介质
US11119890B2 (en) * 2019-08-28 2021-09-14 International Business Machines Corporation Instruction level tracing for analyzing processor failure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104137077A (zh) * 2012-02-13 2014-11-05 三菱电机株式会社 处理器系统
CN102629228A (zh) * 2012-04-26 2012-08-08 迈普通信技术股份有限公司 多核通信系统中检测数据核故障的方法及装置
CN106407088A (zh) * 2016-09-08 2017-02-15 努比亚技术有限公司 一种对多核cpu进行检测的方法和装置
CN110221932A (zh) * 2018-03-01 2019-09-10 欧姆龙株式会社 计算机及其控制方法
CN109685399A (zh) * 2019-02-19 2019-04-26 贵州电网有限责任公司 电力系统日志整合分析方法及系统

Also Published As

Publication number Publication date
CN112527541A (zh) 2021-03-19
EP4020215A1 (en) 2022-06-29
EP4020215A4 (en) 2022-10-05
US20220342739A1 (en) 2022-10-27
US11815990B2 (en) 2023-11-14

Similar Documents

Publication Publication Date Title
WO2021017901A1 (zh) 一种屏幕显示方法及电子设备
CN113704205B (zh) 日志存储的方法、芯片、电子设备和可读存储介质
WO2021052070A1 (zh) 一种帧率识别方法及电子设备
WO2021115112A1 (zh) 安装包的下载方法、分发方法、终端设备、服务器及系统
WO2021218429A1 (zh) 应用窗口的管理方法、终端设备及计算机可读存储介质
EP4345669A1 (en) User privacy protection method and apparatus
WO2021052489A1 (zh) 一种确定多核处理器中故障计算核的方法及电子设备
WO2021238376A1 (zh) 功能包的加载方法、装置、服务器和电子设备
WO2022100141A1 (zh) 插件管理方法、系统及装置
WO2020233581A1 (zh) 一种测量高度的方法和电子设备
CN114828098B (zh) 数据传输方法和电子设备
CN114816973A (zh) 调试代码的方法、装置、电子设备和可读存储介质
CN115373957A (zh) 杀应用的方法及设备
CN113312249A (zh) 日志数据生成方法、日志数据显示方法及装置
CN115016666B (zh) 触控处理方法、终端设备以及存储介质
CN114006969B (zh) 一种窗口启动方法和电子设备
CN115792431B (zh) 一种异常位置检测方法和电子设备
WO2020233554A1 (zh) 一种角度测量方法和电子设备
CN116088955B (zh) 进程处理方法和终端设备
CN116703689B (zh) 一种着色器程序的生成方法、装置和电子设备
CN116048629B (zh) 系统服务切换方法及控制装置、电子设备和存储介质
CN116049122B (zh) 日志信息传输控制方法、电子设备和存储介质
CN116048831B (zh) 一种目标信号处理方法和电子设备
CN116662150A (zh) 应用启动耗时检测方法及相关装置
CN117251223A (zh) 一种云函数插件配置、调度方法、系统和电子设备

Legal Events

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

Ref document number: 20866341

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020866341

Country of ref document: EP

Effective date: 20220321