Equipment detection method and related device

通过设备安全模块获取和分析硬件模块的状态参数,解决了现有技术中设备检测精准度低的问题,实现了更准确的硬件健康状况评估和用户体验提升。

CN119471086APending Publication Date: 2025-02-18GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311016880.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art only relies on the existence of the underlying modules of the system in equipment security detection, and does not consider the health of the hardware, resulting in low accuracy of equipment detection and affecting user experience.

Method used

The device security module obtains the target status parameters of the specified device hardware module, including the target module identification and operation parameters, and sets the hardware identification value according to preset conditions to indicate the health or abnormal status of the hardware module.

Benefits of technology

Improve the accuracy of equipment detection, ensure the security and functional reliability of hardware modules, thereby improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119471086A_ABST
    Figure CN119471086A_ABST
Patent Text Reader

Abstract

The invention discloses a device detection method and a related device, the device detection method is applied to an electronic device, the electronic device comprises a device security module, and the method comprises the following steps: obtaining a target state parameter of a specified device hardware module through the device security module, the target state parameter comprises a target module identifier and a target operation parameter of the specified equipment hardware module; when the target state parameter meets a first preset condition, a hardware identification value of the specified equipment hardware module is set as a first hardware identification value, and the first hardware identification value indicates that the specified equipment hardware module is in a healthy state; when the target state parameter does not meet the first preset condition, a hardware identification value of the specified equipment hardware module is set to be a second hardware identification value, and the second hardware identification value indicates that the specified equipment hardware module is in an abnormal state. By adopting the embodiment of the invention, the equipment detection accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology or communication technology, and in particular to a device detection method and related apparatus. Background Art

[0002] With the widespread popularization of electronic devices (such as mobile phones, tablet computers, etc.), electronic devices can support more and more applications and have more and more powerful functions. Electronic devices are developing in a diversified and personalized direction and have become an indispensable electronic product in users' lives.

[0003] In actual applications, in terms of device security detection, the hardware identification of the system layer is set only based on the presence or absence of the system's underlying modules, without considering the health of the hardware. When the hardware fails, the identification still displays normally, which may cause some functions of the upper-level APP that rely on the hardware module to be unavailable or abnormal. As a result, the device detection accuracy is low, which reduces the user experience. Therefore, the problem of how to improve the accuracy of device detection needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide a device detection method and related apparatus, which can improve the accuracy of device detection.

[0005] In a first aspect, an embodiment of the present application provides a device detection method, which is applied to an electronic device, wherein the electronic device includes a device security module, and the method includes:

[0006] Acquire target state parameters of a specified device hardware module through the device security module, wherein the target state parameters include a target module identifier and target operating parameters of the specified device hardware module;

[0007] When the target state parameter satisfies a first preset condition, setting the hardware identification value of the designated device hardware module to a first hardware identification value, wherein the first hardware identification value indicates that the designated device hardware module is in a healthy state;

[0008] When the target state parameter does not satisfy the first preset condition, the hardware identification value of the designated device hardware module is set to a second hardware identification value, where the second hardware identification value indicates that the designated device hardware module is in an abnormal state.

[0009] In a second aspect, an embodiment of the present application provides a device detection apparatus,

[0010] Applied to an electronic device, the electronic device includes a device security module, the device includes: an acquisition unit, a first setting unit and a second setting unit, wherein:

[0011] The acquisition unit is used to acquire target state parameters of a specified device hardware module through the device security module, wherein the target state parameters include a target module identifier and target operating parameters of the specified device hardware module;

[0012] The first setting unit is used to set the hardware identification value of the hardware module of the specified device to a first hardware identification value when the target state parameter meets the first preset condition, and the first hardware identification value indicates that the hardware module of the specified device is in a healthy state;

[0013] The second setting unit is used to set the hardware identification value of the designated device hardware module to a second hardware identification value when the target state parameter does not meet the first preset condition, and the second hardware identification value indicates that the designated device hardware module is in an abnormal state.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the program includes a method for executing some or all of the steps described by the first party.

[0015] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiment of the present application.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0017] The implementation of the embodiments of the present application has the following beneficial effects:

[0018] It can be seen that the device detection method and related devices described in the embodiments of the present application are applied to electronic devices, and the electronic devices include a device security module. The target state parameters of the specified device hardware module are obtained through the device security module. The target state parameters include the target module identification and target operation parameters of the specified device hardware module. When the target state parameters meet the first preset condition, the hardware identification value of the specified device hardware module is set to the first hardware identification value, and the first hardware identification value indicates that the specified device hardware module is in a healthy state. When the target state parameters do not meet the first preset condition, the hardware identification value of the specified device hardware module is set to the second hardware identification value, and the second hardware identification value indicates that the specified device hardware module is in an abnormal state. That is, the state parameters of the specified device hardware module can be detected through the device security module, thereby setting the device health status value corresponding to the specified device hardware module to mark whether the specified device hardware module is healthy or abnormal, thereby ensuring the security of the specified device hardware module, improving the accuracy of device detection, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0021] Figure 2 It is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0022] Figure 3A It is a flow chart of a device detection method provided in an embodiment of the present application;

[0023] Figure 3B It is a structural schematic diagram of a device detection system provided in an embodiment of the present application;

[0024] Figure 4 It is a flowchart of another device detection method provided in an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application;

[0026] Figure 6 It is a block diagram of the functional units of a device detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0028] In order to better understand the solutions of the embodiments of the present application, the relevant terms and concepts that may be involved in the embodiments of the present application are first introduced below.

[0029] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0030] In a specific implementation, in an embodiment of the present application, the electronic device may include various devices with computing functions, such as handheld devices (smart phones, tablet computers, etc.), smart cars, vehicle-mounted devices (navigators, assisted reversing systems, driving recorders, car refrigerators, etc.), wearable devices (smart bracelets, wireless headphones, smart watches, smart glasses, etc.), computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (UE), mobile stations (MS), virtual reality / augmented reality devices, terminal devices, tag devices, etc. The electronic device may also be a base station or a server.

[0031] Electronic devices may also include smart home devices, which may be at least one of the following: smart speakers, smart cameras, smart rice cookers, smart wheelchairs, smart massage chairs, smart furniture, smart dishwashers, smart televisions, smart refrigerators, smart electric fans, smart heaters, smart clothes drying racks, smart lights, smart routers, smart switches, smart switch panels, smart humidifiers, smart air conditioners, smart doors, smart windows, smart stoves, smart disinfection cabinets, smart toilets, sweeping robots, etc., without limitation.

[0032] In the first part, the software and hardware operating environment of the technical solution disclosed in this application is introduced as follows.

[0033] As shown in the figure, Figure 11 shows a schematic diagram of the structure of the 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, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a compass 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195.

[0034] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0035] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor AP, a modem processor, a graphics processor GPU, an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor NPU, etc. Among them, different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110. Among them, the controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. In some other embodiments, a memory may also be provided in the processor 110 for storing instructions and data. Exemplarily, the memory in the processor 110 may be a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. In this way, repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the electronic device 100 in processing data or executing instructions is improved. The processor may further include an image processor, which may be an image preprocessor (preprocess image signal processor, Pre-ISP), which may be understood as a simplified ISP, and which may also perform some image processing operations, for example, may obtain image statistical information.

[0036] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface and / or a USB interface, etc. Among them, the USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. The USB interface 130 can also be used to connect headphones to play audio through the headphones.

[0037] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0038] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0039] 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 external memory, 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 number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0040] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.

[0041] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0042] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G / 6G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0043] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0044] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0045] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (miniLED), MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194.

[0046] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.

[0047] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0048] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include one or more cameras 193.

[0049] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0050] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0051] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0052] The external memory interface 120 can 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 implement a data storage function, such as storing music, video and other files in the external memory card.

[0053] The internal memory 121 can be used to store one or more computer programs, which include instructions. The processor 110 can execute the above instructions stored in the internal memory 121, so that the electronic device 100 executes the method of displaying page elements provided in some embodiments of the present application, as well as various applications and data processing. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system; the program storage area can also store one or more applications (such as a gallery, contacts, etc.). The data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, the processor 110 can execute the method of displaying page elements provided in the embodiments of the present application, as well as other applications and data processing by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor 110. The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0054] 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 light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0055] Among them, the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on 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. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on 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.

[0056] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., X, Y, and Z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking 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.

[0057] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all 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 the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0058] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. 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 a pocket to prevent accidental touches.

[0059] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0060] The temperature sensor 180J is used to detect temperature. In some embodiments, 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, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, 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. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0061] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0062] For example, Figure 2 The software structure diagram of the electronic device 100 is shown. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, respectively, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.

[0063] like Figure 2 As shown, the application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0064] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0065] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0066] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0067] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0068] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0069] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0070] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0071] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0072] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0073] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0074] 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.

[0075] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0076] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0077] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0078] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0079] A 2D graphics engine is a drawing engine for 2D drawings.

[0080] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0081] In the second part, the device detection method and related apparatus disclosed in the embodiments of the present application are introduced as follows.

[0082] See also Figure 3A , Figure 3A 1 is a flow chart of a device detection method provided in an embodiment of the present application, which is applied to an electronic device, wherein the electronic device includes a device security module. As shown in the figure, the device detection method may include the following steps:

[0083] 301. Obtain target state parameters of a specified device hardware module through the device security module, where the target state parameters include a target module identifier and target operating parameters of the specified device hardware module.

[0084] In an embodiment of the present application, the electronic device includes a device security module, which can be used to detect device security. In a specific implementation, the designated device hardware module can be preset or set by the system by default. For example, the device security module can scan the device and obtain multiple hardware modules, and then at least one of the multiple hardware modules can be used as the designated device hardware module. When there are multiple designated device hardware modules, batch hardware module detection can be implemented.

[0085] In a specific implementation, the target state parameters of the specified device hardware module can be obtained through the device security module. The target state parameters may include the target module identifier and target operating parameters of the specified device hardware module. The target module identifier is used to uniquely identify the specified device hardware module. The target operating parameters are used to describe the working environment or working state of the specified device hardware module. The target operating parameters may include at least one of the following: the operating power of the specified device hardware module, the operating voltage of the specified device hardware module, the operating current of the specified device hardware module, the operating power of the specified device hardware module, the operating temperature of the specified device hardware module, firmware operating parameters, etc., which are not limited here.

[0086] In a specific implementation, the target state parameter of the hardware module of the specified device can be obtained through the device security module at every preset time interval, and the preset time interval can be preset or set by the system default. Different hardware modules can correspond to different time intervals, that is, the mapping relationship between the preset time interval and the hardware module can be pre-stored, and the preset time interval corresponding to the specified hardware device module can be determined based on the mapping relationship.

[0087] Optionally, the above step 301, obtaining the target state parameter of the hardware module of the specified device through the device security module, may include the following steps:

[0088] 11. Obtain hardware identification information of the hardware module through the device security module to obtain m first hardware identification information, where m is a positive integer;

[0089] 12. Obtain hardware identification information of the hardware function support module to obtain n second hardware identification information, where n is a positive integer;

[0090] 13. Compare the m first hardware identification information with the n second hardware identification information to obtain a comparison result, and determine the target module identification of the designated device hardware module according to the comparison result;

[0091] 14. Obtain the target operating parameters of the hardware module of the designated device.

[0092] In the embodiment of the present application, the original equipment manufacturer (OEM) compiles the corresponding hardware function support module into the system image according to the hardware configuration of different models. Before leaving the factory, different models are equipped with the system image that matches their own hardware configuration.

[0093] In specific implementations, there are often differences in hardware module configurations between different models. For example, some external processing or storage chips are only available on some models. Functional code modules that match the hardware modules are provided in the operating system to provide specific hardware function support for the upper-level APP, so as to achieve the effect of differentiating the hardware configurations of different models.

[0094] APP needs to adapt to different models. The functions of APP may take different processing operations or call different hardware function support modules in the system according to the actual hardware configuration of the device. Therefore, OEM device manufacturers need to provide some hardware module identifiers in the Android system layer for APP to query the hardware configuration of the current device model.

[0095] In an embodiment of the present application, the hardware identification information of the hardware module can be obtained through the device security module to obtain m first hardware identification information, where m is a positive integer. The hardware identification information of the hardware function support module can also be obtained to obtain n second hardware identification information, where n is a positive integer. The m first hardware identification information are then compared with the n second hardware identification information to obtain a comparison result, and the target module identification of the specified device hardware module is determined based on the comparison result. That is, the comparison result can be used to detect whether the specified device hardware module has a corresponding hardware function support module, and the target module identification of the specified device hardware module can also be determined. Then, the target operating parameters of the specified device hardware module can be obtained. In this way, the target state parameters of the specified device hardware module can be obtained.

[0096] In actual applications, the system signatures of some models use the same signature key, which makes it possible for systems of different models to be flashed to each other. Therefore, there may be a situation where a certain model does not have a specific hardware module pre-installed at the factory, but is flashed with a system with the hardware module code, resulting in some functions of the upper-level APP that rely on the hardware module being unavailable or abnormal. By adopting the embodiment of the present application, the consistency between the hardware module of the specified device and its corresponding hardware function support module can be guaranteed, which helps to ensure the security of the hardware module of the specified device and helps to improve the user experience.

[0097] Optionally, before the above step 301, in which the target state parameter of the hardware module of the designated device is obtained by the device security module, the following steps may also be included:

[0098] Detect whether a specified event occurs, and when the specified event occurs, execute the step of obtaining the target state parameter of the specified device hardware module through the device security module.

[0099] In the embodiment of the present application, the specified event can be preset or set by the system default. The specified event can include at least one of the following: a power-on event, a restart event, a freeze event, a crash event, etc., which are not limited here.

[0100] In a specific implementation, it is detected whether a specified event occurs. When a specified event occurs, the step of obtaining the target state parameters of the specified device hardware module through the device security module can be executed, thereby ensuring the security of the specified device hardware module and the device security.

[0101] 302. When the target state parameter satisfies a first preset condition, set the hardware identification value of the designated device hardware module to a first hardware identification value, where the first hardware identification value indicates that the designated device hardware module is in a healthy state.

[0102] In an embodiment of the present application, the first hardware identification value can be preset or the system defaults, for example, the first hardware identification value is True, and for another example, the first hardware identification value is 1. The first preset condition can also be preset or the system defaults, for example, the target module identification matches the preset module identification, and the target operating parameter belongs to the preset range, which means that the target state parameter satisfies the first preset condition, which means that the hardware module of the specified device is in a healthy state, and the hardware identification value of the hardware module of the specified device can be set to the first hardware identification value, and the first hardware identification value indicates that the hardware module of the specified device is in a healthy state, and the first hardware identification value can also be displayed. The preset module identification and the preset range can be preset or the system defaults.

[0103] In a specific implementation, the first hardware identification value may include a field, a part of the field is used to indicate the hardware module of the specified device, and another part of the field is used to indicate that the hardware module of the specified device is in a healthy state.

[0104] In the embodiment of the present application, detection of device hardware is added, and the device identification value can represent the health status of the device hardware and supporting firmware, thereby improving the accuracy of device identification.

[0105] In the specific implementation, the device security module is used to continuously monitor the status of the device hardware and firmware. When the device is flashed with an incompatible operating system image, or when the device hardware and firmware fail, it can be detected in time and the APP and the user can be notified, which improves the security and reliability of the hardware module function.

[0106] 303. When the target state parameter does not satisfy the first preset condition, set the hardware identification value of the designated device hardware module to a second hardware identification value, where the second hardware identification value indicates that the designated device hardware module is in an abnormal state.

[0107] In an embodiment of the present application, when the target state parameter does not meet the first preset condition, it means that the hardware module of the specified device is not in a healthy state, that is, the hardware module of the specified device is in an abnormal state, then the hardware identification value of the hardware module of the specified device can be set to a second hardware identification value, and the second hardware identification value indicates that the hardware module of the specified device is in an abnormal state.

[0108] In the embodiment of the present application, the second hardware identification value can be preset or the system defaults, for example, the second hardware identification value is False, and for another example, the second hardware identification value is 0.

[0109] In a specific implementation, the second hardware identification value may include a field, part of which is used to indicate the hardware module of the specified device, and another part of which is used to indicate that the hardware module of the specified device is in an abnormal state. Of course, the string corresponding to the field is different for different abnormal degrees. Of course, the string corresponding to different abnormal causes is also different. Or, the string corresponding to different abnormal parts is also different.

[0110] In actual applications, the hardware identification of the system layer is set only based on the presence or absence of the system's underlying modules, without considering the health of the hardware. When the hardware fails, the identification still displays normal, which may cause some functions of the upper-level APP that rely on the hardware module to be unavailable or abnormal. By adopting the embodiment of the present application, the device security module can be used to accurately identify the health status of the specified hardware device module, ensure the security of the specified hardware device module, and help improve the user experience.

[0111] In actual applications, when a certain model does not have a specific hardware module pre-installed at the factory, but is flashed with a system with the hardware module code, an attacker may maliciously modify the model hardware, such as physically accessing the cracked hardware module. Then, the hacked hardware and the mixed system are used to deceive the upper-level APP, causing the APP to eventually store sensitive data in the cracked hardware module, creating a data leakage risk. Not only can sensitive data be stored in the device security module, but the consistency between the specified device hardware module and its corresponding hardware function support module can also be guaranteed, which helps to ensure the security of the specified device hardware module and help improve the user experience.

[0112] For example, the device operating system provides hardware identification values ​​of some hardware modules, which can be recorded as features, to determine whether there is a hardware function support module matching the specified device hardware module in the current system. If so, the value of the feature is True; if not, the value of the feature is False.

[0113] Let's take an example. Figure 3BAs shown, the device detection system may include an electronic device and a cloud, the electronic device includes a device security module, and the cloud can formulate various detection strategies, which can instruct the device security module to perform security detection. The device security module can regularly detect the presence of device hardware modules and the health status of the hardware in combination with the strategy issued by the cloud, and maintain and refresh the value of the feature. When the hardware module exists and the hardware operates normally, the value of the feature is set to True, otherwise the value of the feature is set to False. In an embodiment of the present application, if the device security module detects and collects unconventional situations such as device disassembly, removal and replacement of hardware modules, the information will be reported to the cloud for comprehensive judgment and timely notification to the user, thereby improving the safety of the device.

[0114] To give another example, when developing an APP, developers design different implementation paths for some APP functions based on the hardware function support modules of different device models. For example, in the sensitive data storage function, depending on the configuration differences of different models, the APP may call the corresponding system API to provide different degrees of secure storage protection for the keys used for data encryption and decryption, including storing them in the system default storage path, storing them in different security hardware modules, etc. When the APP is actually running, the APP queries the value of the feature to determine whether the specified device hardware module exists in order to call the corresponding API.

[0115] For example, when the operating system is updated, the device restarts and the device security module is triggered to detect the hardware health status. If there are abnormal situations such as the device security module and the hardware function support module are not compatible, or the device security module and the hardware function support module fail, the device security module pops up a window to inform the user and sets the feature value to False.

[0116] Optionally, the following steps may also be included:

[0117] A1. Obtaining the last refresh time of the hardware identification value of the hardware module of the specified device through the device security module;

[0118] A2. Determine the time interval between the last refresh time and the current time;

[0119] A3. When the time interval is longer than a preset time, refresh the hardware identification value of the hardware module of the designated device.

[0120] In the embodiment of the present application, the preset time length can be preset or set by system default.

[0121] In a specific implementation, the last refresh time of the hardware identification value of the specified device hardware module can be obtained through the device security module, and the length of the time interval between the last refresh time and the current time can be determined. When the time interval is greater than the preset time length, it means that the security status of the specified device hardware module has not been detected for a long time, and the hardware identification value of the specified device hardware module can be refreshed.

[0122] For example, when the APP queries a feature, the device security module is triggered to check the last refresh time of the feature. If the feature has not been refreshed for a certain period of time, the device security module detects and refreshes the feature value stored in the system.

[0123] Optionally, the following steps may also be included:

[0124] B1. Obtaining the target usage frequency of the hardware module of the designated device;

[0125] B2. Determine the preset time length corresponding to the target usage frequency.

[0126] In an embodiment of the present application, the target usage frequency of the hardware module of the specified device can be obtained, and the mapping relationship between the preset usage frequency and the time length threshold can be pre-stored. Then, the preset time length corresponding to the target usage frequency can be determined based on the mapping relationship. Therefore, based on the usage of the hardware module of the specified device, the corresponding detection frequency can be dynamically set, which helps to ensure the security of the hardware module of the specified device.

[0127] Optionally, the above step B2, determining the preset time length corresponding to the target usage frequency, may include the following steps:

[0128] B21. Determine a reference time length corresponding to the target usage frequency according to a preset mapping relationship between usage frequency and time length;

[0129] B22. Acquire target usage environment parameters of the electronic device, where the target usage environment parameters include target external environment parameters and target internal environment parameters;

[0130] B23, determining a target first adjustment factor corresponding to the target external environment parameter;

[0131] B24, determining a target second adjustment factor corresponding to the target internal environment parameter;

[0132] B25. Dynamically optimize the reference time length according to the target first adjustment factor and the target second adjustment factor to obtain the preset time length.

[0133] In an embodiment of the present application, a mapping relationship between a preset usage frequency and a time length can be pre-stored. Then, according to the mapping relationship between the preset usage frequency and the time length, a reference time length corresponding to the target usage frequency can be determined. The target usage environment parameters of the electronic device can also be obtained. The target usage environment parameters include target external environment parameters and target internal environment parameters.

[0134] Among them, the target external environmental parameters may include at least one of the following: ambient temperature, ambient humidity, magnetic field interference intensity, geographical location, atmospheric pressure, weather, etc., which are not limited here. The target internal environmental parameters may include at least one of the following: hardware configuration parameters, software configuration parameters, etc., which are not limited here. The hardware configuration parameters may include at least one of the following: CPU configuration parameters, GPU configuration parameters, NPU configuration parameters, memory size, etc., which are not limited here. The software configuration parameters may include at least one of the following: system version, cache size, number of applications, etc., which are not limited here.

[0135] In the embodiment of the present application, a first mapping relationship between a preset external environment parameter and a first adjustment factor can be pre-stored, and then a target first adjustment factor corresponding to the target external environment parameter can be determined based on the first mapping relationship. A second mapping relationship between a preset internal environment parameter and a second adjustment factor can also be pre-stored, and then a target second adjustment factor corresponding to the target internal environment parameter can be determined based on the second mapping relationship, and a second adjustment factor corresponding to the target internal environment parameter can be determined based on the second mapping relationship. Wherein, the adjustment range of the first adjustment factor is smaller than the adjustment range of the second adjustment factor, for example, the adjustment range of the first adjustment factor is -0.01 to 0.01, and the adjustment range of the second adjustment factor is -0.1 to 0.1.

[0136] Furthermore, the reference time length can be dynamically optimized according to the first adjustment factor and the second adjustment factor to obtain a preset time length, as follows: preset time length = reference time length * (1 + target second adjustment factor) * target first adjustment factor. In this way, on the one hand, the corresponding detection frequency can be dynamically set based on the usage of the specified device hardware module, which helps to ensure the security of the specified device hardware module. On the other hand, the time length can be further dynamically optimized based on external environmental parameters and internal environmental parameters, so that the optimized time length is more in line with the working environment of the specified hardware device module and user usage habits, which helps to achieve accurate device detection and ensure safety.

[0137] Optionally, the following steps may also be included:

[0138] C1. Detecting whether a preset event occurs in the electronic device, wherein the preset event includes at least one of the following: a disassembly event and a disassembly event of a hardware module of the designated device;

[0139] C2. Reporting the preset event to the cloud through the device security module to obtain the maintenance record corresponding to the preset event returned by the cloud;

[0140] C3. When the maintenance record meets the second preset condition, executing the step of setting the hardware identification value of the hardware module of the designated device to the first hardware identification value;

[0141] C4. When the maintenance record does not satisfy the second preset condition, executing the step of setting the hardware identification value of the hardware module of the designated device to the second hardware identification value.

[0142] In the embodiment of the present application, the preset event can be preset or defaulted by the system. The preset event includes at least one of the following: a disassembly event, a designated device hardware module disassembly event, a flashing event, a maintenance event, etc., which are not limited here. The second preset condition can be preset or defaulted by the system.

[0143] Furthermore, the preset event can be reported to the cloud through the device security module to obtain the maintenance record corresponding to the preset event returned by the cloud. When the maintenance record meets the second preset condition, it means that the maintenance is legal, and the step of setting the hardware identification value of the specified device hardware module to the first hardware identification value can be executed. On the contrary, when the maintenance record does not meet the second preset condition, it means that the maintenance is illegal and there is a safety hazard, and the step of setting the hardware identification value of the specified device hardware module to the second hardware identification value is executed. In this way, the security of the device can be guaranteed.

[0144] For example, if an unconventional situation such as device disassembly, removal and replacement of hardware modules is detected, the device security module will report the relevant situation to the cloud to confirm whether it is a normal situation such as returning to the factory for repair. If the cloud determines that it is an abnormal situation and there may be risks, the cloud will notify the user through user account messages, the device security module will pop up a window to inform the user, and set the feature value to False.

[0145] Optionally, the following steps may also be included:

[0146] D1. Determine a target abnormal state parameter among the target state parameters;

[0147] D2. Determine a target prompt message corresponding to the target abnormal state parameter;

[0148] D3. Push the target prompt message.

[0149] In an embodiment of the present application, the target state parameter may include at least one state parameter, and the at least one state parameter may include a normal state parameter or an abnormal state parameter. Then, the target abnormal state parameter in the target state parameter can be determined, and the mapping relationship between the preset abnormal state parameter and the prompt message can be pre-stored. Furthermore, the target prompt message corresponding to the target abnormal state parameter can be determined based on the mapping relationship, and then the target prompt message can be pushed. That is, corresponding prompts can be made based on the abnormal state parameters, which helps to accurately remind users and ensure device safety.

[0150] The prompt message is used to prompt the degree of the abnormality, or the prompt message is used to prompt the location of the abnormality, or the prompt message is used to prompt the time when the abnormality occurred, or the prompt message is used to prompt the solution to the abnormality.

[0151] Optionally, the hardware identification value includes a first field and a second field; the above step 302, setting the hardware identification value of the hardware module of the specified device to the first hardware identification value, is implemented as follows:

[0152] Setting the first field of the hardware identification value to the first hardware identification value;

[0153] Then, the following steps may also be included:

[0154] E1. Obtain target device operation parameters of the electronic device, where the target device operation parameters include: total usage time of the target device and a target device operation score;

[0155] E2. Determine a first countdown corresponding to the total usage time of the device;

[0156] E3. Determine a target adjustment parameter corresponding to the target device operation score;

[0157] E4. Adjust the first countdown according to the target adjustment parameter to obtain a second countdown;

[0158] E5. Set the second field to the second countdown, where the second countdown is used to execute the step of obtaining the target state parameter of the specified device hardware module through the device security module when the second countdown ends.

[0159] In an embodiment of the present application, the hardware identification value may include a first field and a second field, and a target device operating parameter of the electronic device may be obtained. The target device operating parameter includes: a total usage time of the target device, a target device operation score, and a mapping relationship between a preset total device usage time and a countdown may be pre-stored. Then, a first countdown corresponding to the total device usage time may be determined based on the mapping relationship. In addition, a mapping relationship between a device operation score and an adjustment parameter may be pre-stored. The value range of the adjustment parameter may be -0.15 to 0.15. A target adjustment parameter corresponding to the target device operation score is determined based on the mapping relationship. The first countdown is adjusted according to the target adjustment parameter to obtain a second countdown. For example, the second countdown = (1 + target adjustment parameter) * first countdown. Then, the second field may be set to the second countdown. The second countdown is used to execute the step of obtaining the target state parameter of the specified device hardware module through the device security module at the end of the second countdown. In this way, the corresponding detection frequency may be dynamically determined based on the operating status of the specified device hardware module, and then, the specified device hardware module may be timely security-checked to ensure device security.

[0160] In the embodiment of the present application, the device security module, in combination with the strategy issued by the cloud, regularly detects the presence of the device hardware module, as well as the health status of the hardware and firmware, and maintains and refreshes the hardware identification of the system layer; when the APP queries the hardware identification of the system layer, if the identification has not been refreshed for a certain period of time; or after the system is reinstalled, etc., the security module is triggered to detect the hardware health status, and then the security module refreshes the hardware identification value; if unconventional situations such as device disassembly, removal and replacement of hardware modules are detected, the security module reports the relevant situation to the cloud to confirm whether it is a normal situation such as returning to the factory for repair. If it is determined to be an abnormal situation, the cloud will notify the user by means of user account messages, device pop-ups, etc., thereby ensuring the security of the device.

[0161] It can be seen that the device detection method described in the embodiment of the present application is applied to an electronic device, and the electronic device includes a device security module. The target state parameters of the specified device hardware module are obtained through the device security module. The target state parameters include the target module identifier and target operating parameters of the specified device hardware module. When the target state parameters meet the first preset condition, the hardware identification value of the specified device hardware module is set to the first hardware identification value, and the first hardware identification value indicates that the specified device hardware module is in a healthy state. When the target state parameters do not meet the first preset condition, the hardware identification value of the specified device hardware module is set to the second hardware identification value, and the second hardware identification value indicates that the specified device hardware module is in an abnormal state. That is, the state parameters of the specified device hardware module can be detected through the device security module, thereby setting the device health status value corresponding to the specified device hardware module to mark whether the specified device hardware module is healthy or abnormal, thereby ensuring the security of the specified device hardware module, improving the accuracy of device detection, and improving user experience.

[0162] Consistent with the above, see Figure 4 , Figure 4 1 is a flow chart of another device detection method provided in an embodiment of the present application. As shown in the figure, it is applied to an electronic device, and the electronic device includes a device security module. The device detection method includes:

[0163] 401. Obtain target state parameters of a specified device hardware module through the device security module, where the target state parameters include a target module identifier and target operating parameters of the specified device hardware module.

[0164] 402. When the target state parameter satisfies a first preset condition, the first field of the hardware identification value is set to the first hardware identification value, wherein the first hardware identification value indicates that the hardware module of the designated device is in a healthy state; the hardware identification value includes the first field and the second field.

[0165] 403. Obtain target device operation parameters of the electronic device, where the target device operation parameters include: total usage time of the target device and a target device operation score.

[0166] 404. Determine a first countdown corresponding to the total usage time of the device.

[0167] 405. Determine a target adjustment parameter corresponding to the target device operation score.

[0168] 406. Adjust the first countdown according to the target adjustment parameter to obtain a second countdown.

[0169] 407. Set the second field to the second countdown, where the second countdown is used to execute the step of acquiring the target state parameter of the specified device hardware module through the device security module when the second countdown ends.

[0170] 408. When the target state parameter does not satisfy the first preset condition, set the hardware identification value of the designated device hardware module to a second hardware identification value, where the second hardware identification value indicates that the designated device hardware module is in an abnormal state.

[0171] The specific description of the above steps 401 to 408 can be referred to as follows Figure 3A The relevant steps of the device detection method are not repeated here.

[0172] It can be seen that the device detection method described in the embodiment of the present application is applied to an electronic device, and the electronic device includes a device security module. The target state parameters of the specified device hardware module are obtained through the device security module. The target state parameters include the target module identification and target operation parameters of the specified device hardware module. When the target state parameters meet the first preset condition, the first field of the hardware identification value is set to the first hardware identification value, and the first hardware identification value indicates that the specified device hardware module is in a healthy state; the hardware identification value includes a first field and a second field, and the target device operation parameters of the electronic device are obtained. The target device operation parameters include: the total usage time of the target device, the target device operation score, determine a first countdown corresponding to the total usage time of the device, determine a target adjustment parameter corresponding to the target device operation score, adjust the first countdown according to the target adjustment parameter, and obtain a second countdown, and set the second field to the first Second countdown, the second countdown is used to execute the step of obtaining the target state parameters of the specified device hardware module through the device security module when the second countdown ends. When the target state parameters do not meet the first preset condition, the hardware identification value of the specified device hardware module is set to the second hardware identification value. The second hardware identification value indicates that the specified device hardware module is in an abnormal state. That is, on the one hand, the state parameters of the specified device hardware module can be detected through the device security module, thereby setting the device health status value corresponding to the specified device hardware module to mark whether the specified device hardware module is healthy or abnormal, thereby ensuring the security of the specified device hardware module, improving the accuracy of device detection, and improving user experience. On the other hand, based on the operating status of the specified device hardware module, the corresponding detection frequency can be dynamically determined, and then, the specified device hardware module can be timely security-checked to ensure device security.

[0173] In accordance with the above embodiment, please refer to Figure 5 , Figure 5: is a structural schematic diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor. The electronic device also includes a device security module. In the embodiment of the present application, the program includes instructions for executing the following steps:

[0174] Acquire target state parameters of a specified device hardware module through the device security module, wherein the target state parameters include a target module identifier and target operating parameters of the specified device hardware module;

[0175] When the target state parameter satisfies a first preset condition, setting the hardware identification value of the designated device hardware module to a first hardware identification value, wherein the first hardware identification value indicates that the designated device hardware module is in a healthy state;

[0176] When the target state parameter does not satisfy the first preset condition, the hardware identification value of the designated device hardware module is set to a second hardware identification value, where the second hardware identification value indicates that the designated device hardware module is in an abnormal state.

[0177] Optionally, the program further includes instructions for executing the following steps:

[0178] Acquire, through the device security module, the last refresh time of the hardware identification value of the hardware module of the specified device;

[0179] Determine the length of the time interval between the last refresh time and the current time;

[0180] When the time interval is longer than a preset time, the hardware identification value of the hardware module of the designated device is refreshed.

[0181] Optionally, the program further includes instructions for executing the following steps:

[0182] Detecting whether a preset event occurs in the electronic device, wherein the preset event includes at least one of the following: a disassembly event and a disassembly event of a hardware module of the designated device;

[0183] Reporting the preset event to the cloud through the device security module to obtain the maintenance record corresponding to the preset event returned by the cloud;

[0184] When the maintenance record meets the second preset condition, executing the step of setting the hardware identification value of the hardware module of the designated device to the first hardware identification value;

[0185] When the maintenance record does not meet the second preset condition, the step of setting the hardware identification value of the hardware module of the designated device to the second hardware identification value is performed.

[0186] Optionally, in the aspect of acquiring the target state parameter of the hardware module of the designated device through the device security module, the program includes instructions for executing the following steps:

[0187] Obtaining hardware identification information of the hardware module through the device security module to obtain m first hardware identification information, where m is a positive integer;

[0188] Obtaining hardware identification information of the hardware function support module to obtain n second hardware identification information, where n is a positive integer;

[0189] Comparing the m first hardware identification information with the n second hardware identification information to obtain a comparison result, and determining the target module identification of the designated device hardware module according to the comparison result;

[0190] The target operating parameters of the specified device hardware module are obtained.

[0191] Optionally, the program further includes instructions for executing the following steps:

[0192] Determining a target abnormal state parameter among the target state parameters;

[0193] Determine a target prompt message corresponding to the target abnormal state parameter;

[0194] Push the target prompt message.

[0195] Optionally, the hardware identification value includes a first field and a second field; in terms of setting the hardware identification value of the specified device hardware module to the first hardware identification value, the program includes instructions for performing the following steps:

[0196] Setting the first field of the hardware identification value to the first hardware identification value;

[0197] Then, the above program also includes instructions for executing the following steps:

[0198] Acquire target device operation parameters of the electronic device, wherein the target device operation parameters include: total usage time of the target device and a target device operation score;

[0199] Determining a first countdown corresponding to the total usage time of the device;

[0200] Determining a target adjustment parameter corresponding to the target device operation score;

[0201] Adjusting the first countdown according to the target adjustment parameter to obtain a second countdown;

[0202] The second field is set to the second countdown, and the second countdown is used to execute the step of obtaining the target state parameter of the specified device hardware module through the device security module when the second countdown ends.

[0203] It can be seen that the device detection method and related devices described in the embodiments of the present application are applied to electronic devices, and the electronic devices include a device security module. The target state parameters of the specified device hardware module are obtained through the device security module. The target state parameters include the target module identification and target operation parameters of the specified device hardware module. When the target state parameters meet the first preset condition, the hardware identification value of the specified device hardware module is set to the first hardware identification value, and the first hardware identification value indicates that the specified device hardware module is in a healthy state. When the target state parameters do not meet the first preset condition, the hardware identification value of the specified device hardware module is set to the second hardware identification value, and the second hardware identification value indicates that the specified device hardware module is in an abnormal state. That is, the state parameters of the specified device hardware module can be detected through the device security module, thereby setting the device health status value corresponding to the specified device hardware module to mark whether the specified device hardware module is healthy or abnormal, thereby ensuring the security of the specified device hardware module, improving the accuracy of device detection, and improving user experience.

[0204] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0205] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0206] See also Figure 6 , Figure 6 6 is a functional unit composition block diagram of a device detection device 600 involved in an embodiment of the present application. The device detection device 600 is applied to an electronic device, and the electronic device includes a device security module. The device detection device 600 includes: an acquisition unit 601, a first setting unit 602 and a second setting unit 603, wherein:

[0207] The acquisition unit 601 is used to acquire target state parameters of a specified device hardware module through the device security module, wherein the target state parameters include a target module identifier and target operating parameters of the specified device hardware module;

[0208] The first setting unit 602 is used to set the hardware identification value of the hardware module of the specified device to a first hardware identification value when the target state parameter meets the first preset condition, and the first hardware identification value indicates that the hardware module of the specified device is in a healthy state;

[0209] The second setting unit 603 is used to set the hardware identification value of the designated device hardware module to a second hardware identification value when the target state parameter does not meet the first preset condition, and the second hardware identification value indicates that the designated device hardware module is in an abnormal state.

[0210] Optionally, the device detection apparatus 600 is further specifically used for:

[0211] Acquire, through the device security module, the last refresh time of the hardware identification value of the hardware module of the specified device;

[0212] Determine the length of the time interval between the last refresh time and the current time;

[0213] When the time interval is longer than a preset time, the hardware identification value of the hardware module of the designated device is refreshed.

[0214] Optionally, the device detection apparatus 600 is further specifically used for:

[0215] Detecting whether a preset event occurs in the electronic device, wherein the preset event includes at least one of the following: a disassembly event and a disassembly event of a hardware module of the designated device;

[0216] Reporting the preset event to the cloud through the device security module to obtain the maintenance record corresponding to the preset event returned by the cloud;

[0217] When the maintenance record meets the second preset condition, executing the step of setting the hardware identification value of the hardware module of the designated device to the first hardware identification value;

[0218] When the maintenance record does not meet the second preset condition, the step of setting the hardware identification value of the hardware module of the designated device to the second hardware identification value is performed.

[0219] Optionally, in the aspect of acquiring the target state parameter of the hardware module of the specified device through the device security module, the acquiring unit 601 is specifically used to:

[0220] Obtaining hardware identification information of the hardware module through the device security module to obtain m first hardware identification information, where m is a positive integer;

[0221] Obtaining hardware identification information of the hardware function support module to obtain n second hardware identification information, where n is a positive integer;

[0222] Comparing the m first hardware identification information with the n second hardware identification information to obtain a comparison result, and determining the target module identification of the designated device hardware module according to the comparison result;

[0223] The target operating parameters of the specified device hardware module are obtained.

[0224] Optionally, the device detection apparatus 600 is further specifically used for:

[0225] Determining a target abnormal state parameter among the target state parameters;

[0226] Determine a target prompt message corresponding to the target abnormal state parameter;

[0227] Push the target prompt message.

[0228] Optionally, the hardware identification value includes a first field and a second field; in setting the hardware identification value of the specified device hardware module to the first hardware identification value, the first setting unit 602 is specifically used to:

[0229] Setting the first field of the hardware identification value to the first hardware identification value;

[0230] Then, the device detection apparatus 600 is further specifically used for:

[0231] Acquire target device operation parameters of the electronic device, wherein the target device operation parameters include: total usage time of the target device and a target device operation score;

[0232] Determining a first countdown corresponding to the total usage time of the device;

[0233] Determining a target adjustment parameter corresponding to the target device operation score;

[0234] Adjusting the first countdown according to the target adjustment parameter to obtain a second countdown;

[0235] The second field is set to the second countdown, and the second countdown is used to execute the step of obtaining the target state parameter of the specified device hardware module through the device security module when the second countdown ends.

[0236] It can be seen that the device detection device described in the embodiment of the present application is applied to an electronic device, and the electronic device includes a device security module. The target state parameters of the specified device hardware module are obtained through the device security module. The target state parameters include the target module identification and target operation parameters of the specified device hardware module. When the target state parameters meet the first preset condition, the hardware identification value of the specified device hardware module is set to the first hardware identification value, and the first hardware identification value indicates that the specified device hardware module is in a healthy state. When the target state parameters do not meet the first preset condition, the hardware identification value of the specified device hardware module is set to the second hardware identification value, and the second hardware identification value indicates that the specified device hardware module is in an abnormal state. That is, the state parameters of the specified device hardware module can be detected through the device security module, thereby setting the device health status value corresponding to the specified device hardware module to mark whether the specified device hardware module is healthy or abnormal, thereby ensuring the security of the specified device hardware module, improving the accuracy of device detection, and improving user experience.

[0237] It should be noted that the electronic device described in the embodiments of the present application is presented in the form of a functional unit. The term "unit" used here should be understood as the broadest possible meaning, and the object used to implement the functions described by each "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated or chipset) and memory for executing one or more software or firmware programs, a combinational logic circuit, and / or other suitable components that provide the above functions.

[0238] The acquisition unit 601, the first setting unit 602 and the second setting unit 603 can all be processors, which can be artificial intelligence chips, NPUs, CPUs, GPUs, PMICs, etc., which are not limited here. Based on the above unit modules, the functions or steps of any of the above methods can be implemented.

[0239] This embodiment also provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute the embodiments of the present application to implement any method in the above-mentioned embodiments.

[0240] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement any method in the above-mentioned embodiments.

[0241] In addition, an embodiment of the present application also provides a device detection device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes any one of the methods in the above-mentioned method embodiments.

[0242] Among them, the electronic device, non-volatile computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0243] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0244] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0245] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0246] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0247] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0248] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A device detection method, characterized in that: Applied to an electronic device, the electronic device includes a device security module, and the method includes: Acquire target state parameters of a specified device hardware module through the device security module, wherein the target state parameters include a target module identifier and target operating parameters of the specified device hardware module; When the target state parameter satisfies a first preset condition, setting the hardware identification value of the designated device hardware module to a first hardware identification value, wherein the first hardware identification value indicates that the designated device hardware module is in a healthy state; When the target state parameter does not satisfy the first preset condition, the hardware identification value of the designated device hardware module is set to a second hardware identification value, where the second hardware identification value indicates that the designated device hardware module is in an abnormal state.

2. The method according to claim 1, characterized in that The method further comprises: Acquire, through the device security module, the last refresh time of the hardware identification value of the hardware module of the specified device; Determine the length of the time interval between the last refresh time and the current time; When the time interval is longer than a preset time, the hardware identification value of the hardware module of the designated device is refreshed.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Detecting whether a preset event occurs in the electronic device, wherein the preset event includes at least one of the following: a disassembly event and a disassembly event of a hardware module of the designated device; Reporting the preset event to the cloud through the device security module to obtain the maintenance record corresponding to the preset event returned by the cloud; When the maintenance record meets the second preset condition, executing the step of setting the hardware identification value of the hardware module of the designated device to the first hardware identification value; When the maintenance record does not meet the second preset condition, the step of setting the hardware identification value of the hardware module of the designated device to the second hardware identification value is performed.

4. The method according to claim 1 or 2, characterized in that: The obtaining, through the device security module, a target state parameter of a specified device hardware module includes: Obtaining hardware identification information of the hardware module through the device security module to obtain m first hardware identification information, where m is a positive integer; Obtaining hardware identification information of the hardware function support module to obtain n second hardware identification information, where n is a positive integer; Comparing the m first hardware identification information with the n second hardware identification information to obtain a comparison result, and determining the target module identification of the designated device hardware module according to the comparison result; The target operating parameters of the specified device hardware module are obtained.

5. The method according to claim 1 or 2, characterized in that: The method further comprises: Determining a target abnormal state parameter among the target state parameters; Determine a target prompt message corresponding to the target abnormal state parameter; Push the target prompt message.

6. The method according to claim 1 or 2, characterized in that: The hardware identification value includes a first field and a second field; and setting the hardware identification value of the specified device hardware module to the first hardware identification value includes: Setting the first field of the hardware identification value to the first hardware identification value; The method further comprises: Acquire target device operation parameters of the electronic device, wherein the target device operation parameters include: total usage time of the target device and a target device operation score; Determining a first countdown corresponding to the total usage time of the device; Determining a target adjustment parameter corresponding to the target device operation score; Adjusting the first countdown according to the target adjustment parameter to obtain a second countdown; The second field is set to the second countdown, and the second countdown is used to execute the step of obtaining the target state parameter of the specified device hardware module through the device security module when the second countdown ends.

7. A device detection device, characterized in that: Applied to an electronic device, the electronic device includes a device security module, the device includes: an acquisition unit, a first setting unit and a second setting unit, wherein: The acquisition unit is used to acquire target state parameters of a specified device hardware module through the device security module, wherein the target state parameters include a target module identifier and target operating parameters of the specified device hardware module; The first setting unit is used to set the hardware identification value of the hardware module of the specified device to a first hardware identification value when the target state parameter meets the first preset condition, and the first hardware identification value indicates that the hardware module of the specified device is in a healthy state; The second setting unit is used to set the hardware identification value of the designated device hardware module to a second hardware identification value when the target state parameter does not meet the first preset condition, and the second hardware identification value indicates that the designated device hardware module is in an abnormal state.

8. The device according to claim 7, characterized in that The device is also specifically used for: Acquire, through the device security module, the last refresh time of the hardware identification value of the hardware module of the specified device; Determine the length of the time interval between the last refresh time and the current time; When the time interval is longer than a preset time, the hardware identification value of the hardware module of the designated device is refreshed.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the program includes instructions for executing the steps in the method according to any one of claims 1 to 6.

10. A non-volatile computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 6.