Disclosure of Invention
The application provides a frozen screen monitoring method, electronic equipment and a computer readable storage medium, and solves the problem of system breakdown in the system operation process in the prior art.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, a method for monitoring frozen screen is provided, which is applied to an electronic device, and includes:
starting a screen freezing monitoring process;
after receiving an enabling signal sent by a system service process, the screen freezing monitoring process does not monitor inter-process communication between the system service process and the screen freezing monitoring process within a first time period, or determines that the electronic equipment cannot end the process in a shutdown process, and triggers a system to restart, wherein the inter-process communication is used for indicating that the system service process normally operates, the first time period is longer than a second time period, and the second time period is a time interval of the inter-process communication between the system service process and the screen freezing monitoring process.
Therefore, when the screen freezing monitoring process monitors that the system service process is abnormally operated or the electronic equipment cannot be normally shut down, the screen freezing monitoring process triggers the system to restart in order to avoid the phenomena of screen blacking and the like caused by system crash, and therefore the problem of system crash in the system operation process is solved.
As an example of the present application, after receiving an enable signal sent by a system service process, the screen freezing monitoring process does not monitor inter-process communication between the system service process and the screen freezing monitoring process for a first time period, including:
after receiving an enabling signal sent by the system service process, the screen freezing monitoring process counts every third time length from a first value, wherein the counting comprises count-down or count-up;
in the counting process of the frozen screen monitoring process, counting is started from the first numerical value again every time the inter-process communication between the system service process and the frozen screen monitoring process is monitored;
and the screen freezing monitoring process detects that the count value reaches a second value, determines that inter-process communication between the system service process and the screen freezing monitoring process is not monitored in the first time length, and the first value, the second value and the third time length are used for determining the first time length.
Therefore, the frozen screen monitoring process determines whether the heartbeat packet sent by the system service process is not monitored in the first time length in a counting mode, so that whether the system service process runs normally is determined, the running state of the system service process is monitored, the system is conveniently triggered to restart under the condition that the system service process runs abnormally, and the phenomenon that the system is blocked due to system crash is avoided.
As an example of the present application, the counting includes a countdown, and after the freeze screen monitoring process receives an enable signal sent by a system service process, the method further includes:
the frozen screen monitoring process receives a numerical value modification instruction, updates the first numerical value to a third numerical value, wherein the numerical value modification instruction carries the third numerical value, the third numerical value is larger than the first numerical value, and the numerical value modification instruction is sent by the system service process under the condition that the system service running in the system service process is detected to be abnormal.
Therefore, when the system service operation in the system service process is detected to be abnormal, the system service process indicates the screen freezing monitoring process to adjust the first value so as to increase the first time length, and therefore the system is prevented from being restarted under the condition that the watchdog monitoring mechanism can recover the abnormity of the system service.
As an example of the present application, the method further comprises:
and the frozen screen monitoring process receives a numerical value resetting instruction, and renews the third numerical value to the first numerical value, wherein the numerical value resetting instruction is sent by the system service process under the condition that the system service is detected to be recovered to be normal.
Therefore, after the system service process monitors that the system service is recovered to be normal, the system service process indicates the screen freezing monitoring process to modify the first numerical value back to the original numerical value so as to recover the monitoring time of the screen freezing monitoring process.
As an example of the present application, after the screen freeze monitoring process does not monitor the inter-process communication between the system service process and the screen freeze monitoring process within the first duration, the method further includes:
and grabbing the stack information and storing the stack information. Therefore, the stack information can be uploaded to the data platform after the subsequent system is restarted, and fault analysis can be carried out based on the stored stack information.
As an example of the present application, after receiving an enable signal sent by a system service process, the screen freezing monitoring process does not monitor inter-process communication between the system service process and the screen freezing monitoring process for a first time period, including:
after receiving an enabling signal sent by the system service process, the frozen screen monitoring process starts timing;
in the process of timing, the frozen screen monitoring process restarts timing every time the inter-process communication between the system service process and the frozen screen monitoring process is monitored;
and the screen freezing monitoring process detects that the timing time reaches the first time, and determines that the inter-process communication between the system service process and the screen freezing monitoring process is not monitored in the first time.
Therefore, the frozen screen monitoring process determines whether the heartbeat packet sent by the system service process is not monitored in the first time length in a timing mode, so that whether the system service process runs normally is determined, the running state of the system service process is monitored, the system is conveniently triggered to restart under the condition that the system service process runs abnormally, and the phenomenon that the system is blocked due to system crash is avoided.
As an example of the present application, after receiving an enable signal sent by a system service process, the determining that the electronic device cannot end the process in the shutdown process by the freeze screen monitoring process includes:
after receiving an enabling signal sent by the system service process, the screen freezing monitoring process counts every third time length from a first value, wherein the counting comprises count-down or count-up;
in the counting process of the frozen screen monitoring process, counting is started from the first numerical value again every time the inter-process communication between the system service process and the frozen screen monitoring process is monitored;
and under the condition that the count value does not reach the second numerical value, the frozen screen monitoring process receives a shutdown notification, and if the system service process is detected to be finished and a process finishing instruction for finishing the frozen screen monitoring process is not received within a fourth time, the electronic equipment is determined to be incapable of finishing the process in the shutdown process.
That is, the freeze screen monitoring process performs the counting operation after receiving the enable signal sent by the system service process. In the counting process, if the counting value does not reach the second value and the shutdown notification is received, the shutdown operation is executed currently, and at this time, the screen freezing monitoring process can inquire whether the system service process is finished or not. Under the condition that the system service process is detected to be finished, if a process finishing instruction for finishing the screen freezing monitoring process is not received within the fourth time length, the system shutdown is blocked, and the electronic equipment can be determined to be incapable of finishing the process in the shutdown process.
As an example of the present application, the case that the process cannot be ended in the shutdown process of the electronic device includes: when the system service process is finished, the system service process is not found in a process running list, or the system service process is not finished in a fifth time length after an end instruction for finishing the system service process is sent, wherein the process running list comprises processes in a running state in a system.
As an example of the present application, the end timing of the freeze screen monitoring process is located after the end timing of the system service process.
Therefore, whether the system service process is normally finished or not can be detected in the process of shutting down the electronic equipment by the screen freezing monitoring process.
As an example of the present application, the freeze screen monitoring process is arranged at an end position in a target process list in the system, where the target process list is used to record an ending sequence of processes to be ended.
Therefore, the screen freezing monitoring process is arranged at the tail position in the target process list, so that more processes which cannot be finished can be monitored in the process of shutdown of the electronic equipment.
As an example of the application, the first duration is indicated by the system service process for the freeze screen monitoring process, or the first duration is preset.
In one embodiment, the first time length is indicated by the system service process, so that the frozen screen monitoring process can be monitored within the effective time length, and the monitoring accuracy is ensured.
As an example of the present application, the second duration is a duration during which all system services in the system service process are monitored in a traversal mode once, or the second duration is preset.
In an embodiment, the second duration is a duration of monitoring all system services in the system service process in a traversal manner, for example, after the watchdog monitoring mechanism monitors each system service in the system service process once, a heartbeat packet is sent to the freeze screen monitoring mechanism once under the condition that it is determined that the system service process is operating normally. Therefore, the inter-process communication with the frozen screen monitoring process is carried out under the condition that the system service is normal, so that the reliability of monitoring the running condition of the system service process is ensured.
In a second aspect, a freeze screen monitoring apparatus is provided, the freeze screen monitoring apparatus comprising a memory and a processor; the memory is used for storing a program for supporting the device to execute the method of the first aspect and storing data for implementing the method of the first aspect; the processor is configured for:
starting a screen freezing monitoring process;
after an enabling signal sent by a system service process is received through the screen freezing monitoring process, inter-process communication between the system service process and the screen freezing monitoring process is not monitored within a first time period, or the electronic equipment is determined to be incapable of ending the process in a shutdown process, and the system is triggered to restart, wherein the inter-process communication is used for indicating that the system service process normally operates, the first time period is longer than a second time period, and the second time period is a time interval of the inter-process communication between the system service process and the screen freezing monitoring process.
As an example of the present application, the processor is configured to:
after receiving an enabling signal sent by the system service process through the screen freezing monitoring process, counting once every third time length from a first value, wherein the counting comprises count-down or count-up;
counting from the first numerical value again when the inter-process communication between the system service process and the frozen screen monitoring process is monitored in the counting process through the frozen screen monitoring process;
and determining that inter-process communication between the system service process and the screen freezing monitoring process is not monitored in the first time length when the screen freezing monitoring process detects that the count value reaches a second value, wherein the first value, the second value and the third time length are used for determining the first time length.
As one example of the application, the count comprises a countdown, the processor configured to:
receiving a numerical value modification instruction through the frozen screen monitoring process, and updating the first numerical value to a third numerical value, wherein the numerical value modification instruction carries the third numerical value, the third numerical value is larger than the first numerical value, and the numerical value modification instruction is sent by the system service process under the condition that the system service running in the system service process is detected to be abnormal.
As an example of the present application, the processor is configured to:
and receiving a numerical value resetting instruction through the frozen screen monitoring process, and updating the third numerical value to the first numerical value again, wherein the numerical value resetting instruction is sent by the system service process under the condition that the system service is detected to be recovered to be normal.
As an example of the present application, the processor is configured to:
grabbing stack information;
and storing the stack information.
As an example of the present application, the processor is configured to:
after receiving an enabling signal sent by the system service process through the frozen screen monitoring process, starting timing;
in the process of timing through the frozen screen monitoring process, restarting timing every time the inter-process communication between the system service process and the frozen screen monitoring process is monitored;
and determining that inter-process communication between the system service process and the frozen screen monitoring process is not monitored in the first time length when the frozen screen monitoring process detects that the timing time length reaches the first time length.
As an example of the present application, the processor is configured to:
after receiving an enabling signal sent by the system service process through the screen freezing monitoring process, counting once every third time length from a first value, wherein the counting comprises count-down or count-up;
counting from the first numerical value again when the interprocess communication between the system service process and the frozen screen monitoring process is monitored in the counting process through the frozen screen monitoring process;
and under the condition that the count value does not reach the second numerical value, the frozen screen monitoring process receives a shutdown notification, and if the system service process is detected to be finished and a process finishing instruction for finishing the frozen screen monitoring process is not received within a fourth time, the electronic equipment is determined to be incapable of finishing the process in the shutdown process.
As an example of the present application, the case that the process cannot be ended in the shutdown process of the electronic device includes: when the system service process is finished, the system service process is not found in a process running list, or the system service process is not finished in a fifth time length after an end instruction for finishing the system service process is sent, wherein the process running list comprises processes in a running state in a system.
As an example of the present application, the end timing of the freeze screen monitoring process is located after the end timing of the system service process.
As an example of the present application, the freeze screen monitoring process is arranged at an end position in a target process list in the system, where the target process list is used to record an ending sequence of processes to be ended.
As an example of the application, the first duration is indicated by the system service process for the freeze screen monitoring process, or the first duration is preset.
As an example of the present application, the second duration is a duration during which all system services in the system service process are monitored in a traversal mode once, or the second duration is preset.
In a third aspect, an electronic device is provided, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to the first aspect when executing the computer program.
In a fourth aspect, there is provided a computer readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects above.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
The technical effects obtained by the second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described herein again.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that reference to "a plurality" in this application means two or more. In the description of the present application, "/" indicates an OR meaning, for example, A/B may indicate A or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, for the convenience of clearly describing the technical solutions of the present application, the terms "first", "second", and the like are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
First, an execution body related to the embodiment of the present application will be described. The method for monitoring the frozen screen provided by the embodiment of the application can be executed by an electronic device, and the electronic device can include, but is not limited to, a wearable device, a terminal device, and a car-mounted device. As an example, a wearable device may include, but is not limited to, a smart watch, a smart bracelet, a smart eye patch, a smart helmet, smart apparel, a smart bag. The terminal device may include, but is not limited to, a mobile phone, a tablet computer, an Augmented Reality (AR)/Virtual Reality (VR) device, an ultra-mobile personal computer (UMPC), a notebook computer, a netbook, a Personal Digital Assistant (PDA), and the like, which are not limited in this embodiment.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device 100 may include aprocessor 110, anexternal memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, acharging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, amobile communication module 150, awireless communication module 160, anaudio module 170, aspeaker 170A, areceiver 170B, amicrophone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM)card interface 195, and the like. 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.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: theprocessor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided inprocessor 110 for storing instructions and data. In some embodiments, the memory in theprocessor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by theprocessor 110. If theprocessor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of theprocessor 110, thereby increasing the efficiency of the system.
In some embodiments,processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments,processor 110 may include multiple sets of I2C buses. Theprocessor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: theprocessor 110 may be coupled to the touch sensor 180K via an I2C interface, such that theprocessor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments,processor 110 may include multiple sets of I2S buses. Theprocessor 110 may be coupled to theaudio module 170 via an I2S bus to enable communication between theprocessor 110 and theaudio module 170. In some embodiments, theaudio module 170 may communicate audio signals to thewireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, theaudio module 170 and thewireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, theaudio module 170 may also transmit audio signals to thewireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect theprocessor 110 with thewireless communication module 160. For example: theprocessor 110 communicates with a bluetooth module in thewireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, theaudio module 170 may transmit the audio signal to thewireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connectprocessor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments,processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. Theprocessor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect theprocessor 110 with the camera 193, the display 194, thewireless communication module 160, theaudio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
Thecharging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, thecharging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, thecharging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. Thecharging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, thecharging management module 140 and theprocessor 110. The power management module 141 receives input from the battery 142 and/or thecharge management module 140 and provides power to theprocessor 110, the internal memory 121, the external memory, the display 194, the camera 193, thewireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in theprocessor 110. In other embodiments, the power management module 141 and thecharging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, themobile communication module 150, thewireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
Themobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. Themobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. Themobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. Themobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of themobile communication module 150 may be disposed in theprocessor 110. In some embodiments, at least some of the functional modules of themobile communication module 150 may be disposed in the same device as at least some of the modules of theprocessor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to thespeaker 170A, thereceiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as themobile communication module 150 or other functional modules, independent of theprocessor 110.
Thewireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. Thewireless communication module 160 may be one or more devices integrating at least one communication processing module. Thewireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to theprocessor 110. Thewireless communication module 160 may also receive a signal to be transmitted from theprocessor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled tomobile communication module 150 and antenna 2 is coupled towireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Theprocessor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
Theexternal memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with theprocessor 110 through theexternal memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. Theprocessor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device 100 may implement audio functions via theaudio module 170, thespeaker 170A, thereceiver 170B, themicrophone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
Theaudio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. Theaudio module 170 may also be used to encode and decode audio signals. In some embodiments, theaudio module 170 may be disposed in theprocessor 110, or some functional modules of theaudio module 170 may be disposed in theprocessor 110.
Thespeaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through thespeaker 170A or listen to a handsfree call.
Thereceiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing thereceiver 170B close to the ear of the person.
Themicrophone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to themicrophone 170C by speaking the user's mouth near themicrophone 170C. The electronic device 100 may be provided with at least onemicrophone 170C. In other embodiments, the electronic device 100 may be provided with twomicrophones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four ormore microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment 100, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. Theaudio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
TheSIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into theSIM card interface 195 or being pulled out of theSIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. TheSIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The sameSIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. TheSIM card interface 195 may also be compatible with different types of SIM cards. TheSIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily illustrate a software structure of the electronic device 100.
Fig. 2 is a block diagram of a software structure of the electronic device 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, which are an application layer, an application framework layer, a middleware layer, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 2, the application framework layer includes a system service module, a media framework, and a display framework.
The system service module runs in a system service (system server) process, the system service process is a core process in the electronic device, and the system service process can create a plurality of system services known by an application layer after being started, such as system services including but not limited to power management services and screen brightness management services.
In one example, the system services module may include a window manager, a resource manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The middleware layer includes a system library. In some embodiments, the middleware layer is also referred to as a native framework layer.
In the embodiment of the application, the middleware layer comprises a frozen screen monitoring module, and the frozen screen monitoring module runs in a frozen screen monitoring process. In one example, the frozen screen monitoring process is used for monitoring the system service process so as to trigger the system to restart when the system service process is in a zombie state, thereby avoiding system crash and further avoiding the phenomena of screen freezing, screen blacking, no response and the like. Wherein, no response means that the screen is not lightened when the power key is clicked, and no response is caused when the screen is clicked.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following describes exemplary workflow of the software and hardware of the electronic device 100 in connection with capturing a photo scene.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera drive by calling a kernel layer, and captures a still image or a video through the camera 193.
After the execution main body related to the embodiment of the present application is described, a method for monitoring freeze-shielding provided by the embodiment of the present application is described below with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a schematic flow chart of a freeze screen monitoring method provided in an embodiment of the present application, which may be applied to the electronic device, by way of example and not limitation, and the method may include the following steps:
step 301: and starting a screen freezing monitoring process.
In the embodiment of the application, the screen freezing monitoring process is used for monitoring whether a system crash event occurs in the electronic device and correspondingly processing the system crash event when the system crash event is monitored, so as to avoid system jamming.
In one embodiment, the electronic device initiates a freeze screen monitoring process through an initialization (init) process. The init process is a user-level process started by a kernel, and is also a first started process of the electronic equipment in the starting process. After the init process is started, other processes in the system can be started by the init process. For example, referring to fig. 4, in the embodiment of the present application, the electronic device starts a screen freeze monitoring process through an init process, and in addition, the init process starts an incubation (zygate) process to start a system service process through the zygate process.
As an example of the present application, the freeze screen monitoring process is initiated before the system service process. Of course, in another embodiment, the freeze screen monitoring process may also be initiated in parallel with the system services process.
Step 302: after the freeze screen monitoring process receives an enabling signal sent by the system service process, the inter-process communication between the system service process and the freeze screen monitoring process is not monitored within a first time period, and the system is triggered to restart.
The inter-process communication is used for indicating that the system service process runs normally. The first duration is longer than the second duration, and the second duration is a time interval of interprocess communication between the system service process and the screen freezing monitoring process.
The inter-process communication can be realized by calling a function, and the commonly used inter-process communication comprises sending a heartbeat packet and sharing storage. In this embodiment, an example of sending a heartbeat packet to indicate that a system service process is operating normally is taken as an example for explanation.
That is, after the system service process is started, an enable signal is sent to the screen freezing monitoring process. And the system service process sends heartbeat packets to the frozen screen monitoring process every second time interval under the condition of normal operation so as to carry out interprocess communication with the frozen screen monitoring process.
By way of example and not limitation, referring to fig. 4, a system service process initiates a service monitoring mechanism in the system service process, where the service monitoring mechanism is used to manage system services running in the system service process. Illustratively, the service monitoring mechanism is a watchdog monitoring mechanism. The watchdog monitoring mechanism can be used for monitoring system services running in a system service process and capturing stack information under the condition that the system services are monitored to be abnormal. In addition, the watchdog monitoring mechanism restarts the system service if it monitors that the system service is abnormal and is not automatically recovered within a specified time (e.g., 60 s).
In some cases, the system service process may not run due to an exception, so that the watchdog monitoring mechanism fails to monitor the running condition of the service, and the service cannot be restarted, thereby causing a system crash and affecting user experience. In the embodiment of the application, after the watchdog monitoring mechanism in the system service process is initialized successfully, the watchdog monitoring mechanism sends an enabling signal to the screen freezing monitoring process. In addition, a watchdog monitoring mechanism in the system service process monitors the running state of the system service running in the system service process, and sends a heartbeat packet to the screen freezing monitoring process every second time period under the condition that the system service process is determined to run normally.
In an embodiment, the second duration is a duration of monitoring all system services in the system service process in a traversal manner, for example, after the watchdog monitoring mechanism monitors each system service in the system service process once, a heartbeat packet is sent to the freeze screen monitoring mechanism once under the condition that it is determined that the system service process is operating normally.
In another embodiment, the second time period is preset, and illustratively, the second time period is 30 seconds.
And after receiving the enabling signal, the frozen screen monitoring process starts to execute a monitoring function so as to monitor whether the system service process normally operates or not, or monitor whether a watchdog monitoring mechanism is invalid or not. As an example of the present application, if the freeze screen monitoring mechanism does not receive a heartbeat packet sent by the system service process within the first duration, it indicates that the system service process cannot operate normally, and at this time, it may be determined that the system service process is abnormal, and in order to avoid system jamming, the freeze screen monitoring process triggers a system restart, for example, the freeze screen monitoring process calls a bottom power-down related interface to power down and shut down the system, and then calls a bottom power-up interface at regular time, so as to restart the system.
In one embodiment, the first duration is indicated by the system service process for the freeze screen monitoring process. Illustratively, the system service process may indicate the first duration to the freeze screen monitoring process by an enable signal; or, the system service process may also separately indicate the first duration to the frozen screen monitoring process, for example, the system service process may indicate the first duration to the frozen screen monitoring process after sending the enable signal to the frozen screen monitoring process.
As a possible implementation manner, the indicating, by the system service process, the first duration for the frozen screen monitoring process includes: and the system service process directly determines the first time length and sends the determined first time length to the screen freezing monitoring process. For example, the system service process determines that the first duration is 150 seconds and sends 150 seconds to the freeze monitor process.
As another possible implementation manner, the indicating, by the system service process, the first duration for the frozen screen monitoring process includes: and the system service process sends a numerical value for determining the first time length to the frozen screen monitoring process, so that the frozen screen monitoring process determines the first time length according to a preset algorithm according to the numerical value sent by the system service process. For example, the value sent by the system service process to the freeze screen monitoring process is 5, and the freeze screen monitoring process determines the first time length according to a preset algorithm according to 5. The preset algorithm can be set according to actual requirements. In another embodiment, the first duration may also be preset. Such as a first duration of 150 seconds.
In a possible implementation manner, if the freeze screen monitoring process does not monitor the heartbeat packet sent by the system service process within the first time period, the stack information can be captured and stored in addition to triggering the system to restart, so that the stack information can be uploaded to a data platform after a subsequent system is restarted, and fault analysis is performed based on the stored stack information.
In the embodiment of the application, a freeze screen monitoring process is started. After the frozen screen monitoring process receives an enabling signal sent by a system service process, if a heartbeat packet sent by the system service process is received within a first time period, the system service process is determined to be abnormal in operation, and at the moment, the frozen screen monitoring process triggers the system to restart in order to avoid the phenomena of screen blacking and the like caused by system crash, so that the problem that the system crash is caused by the fact that the system service process cannot normally operate is solved.
On the basis of the embodiment shown in fig. 3, please refer to fig. 5, where fig. 5 is a schematic flow chart of a freeze screen monitoring method according to another exemplary embodiment, by way of example and not limitation, the method may be applied to the electronic device, and the method may include the following:
step 501: and starting a screen freezing monitoring process.
The specific implementation of this method can be seen instep 301 in the embodiment shown in fig. 3, and details are not repeated here.
Step 502: and counting every third time length from the first value after the freeze screen monitoring process receives the enabling signal sent by the system service process.
The third time period may be set according to actual requirements, and is exemplarily the same as the second time period, for example, the third time period may be 30 seconds.
Wherein counting comprises incrementing or decrementing. In addition, the increment value or the decrement value can be set according to actual requirements, and exemplarily, the increment value or the decrement value can be 1, that is, the first value is increased by 1 or decreased by 1 each time.
As an example of the present application, the first value may be a value sent by the system service process to the freeze monitor process, for example, the system service process may carry the first value by an enable signal, and the first value is used for determining the first duration. As another example of the present application, the first numerical value may also be set in advance.
Illustratively, the first value is 5, the third time period is 30 seconds, and the count is a countdown. After the system service process sends the enabling signal to the screen freezing monitoring process, the screen freezing monitoring process starts from 5, and subtracts 1 from the first numerical value every 30 seconds, that is, after 30 seconds, the first numerical value is updated to 4, after 60 seconds, the first numerical value is updated to 3, and so on.
Step 503: and in the counting process, the screen freezing monitoring process monitors whether the interprocess communication between the system service process and the screen freezing monitoring process is monitored.
And in the counting process of the frozen screen monitoring process, counting is started from the first numerical value again every time the interprocess communication between the system service process and the frozen screen monitoring process is monitored.
As an implementation manner, in the counting process, each time a heartbeat packet sent by the system service process is received, it indicates that the system service process is currently in a normal running state, that is, the system service process is not abnormal. In this case, the freeze monitoring process starts counting again from the first value, i.e., starts counting up again from the first value, and counts down or counts up every third time period. For example, taking the first value as an example, the freeze screen monitoring process starts from 5 again and counts down every 30 seconds every time a heartbeat packet sent by the system service process is received.
Step 504: and if the screen freezing monitoring process detects that the count value reaches a second value, determining that inter-process communication between the system service process and the screen freezing monitoring process is not monitored in the first time length, wherein the first value, the second value and the third time length are used for determining the first time length.
In one embodiment, the second value may be set according to actual requirements, and is exemplarily 0.
In one embodiment, where counting is performed in a count-down manner, it is understood that the second value is greater than the first value. At this time, the difference value obtained by subtracting the first numerical value from the second numerical value is multiplied by the third time length to obtain the first time length. For example, if the second value is 5, the first value is 0, and the third duration is 30 seconds, the first duration can be determined to be 150 seconds.
Of course, in another embodiment, the second value may also be sent to the freeze screen monitoring process by the system service process, and for example, the system service process may send the second value to the freeze screen monitoring process by using an enable signal, which is not limited in this embodiment of the present application.
The first time length is determined based on the first numerical value, the second numerical value and the third time length, and in addition, in the counting process, the screen freezing monitoring process restarts counting every time the screen freezing monitoring process receives the heartbeat packet sent by the system service process, so that if the screen freezing monitoring process detects that the counting value reaches the second numerical value, the heartbeat packet sent by the system service process is not monitored in the first time length.
It is worth mentioning that the frozen screen monitoring process determines whether the heartbeat packet sent by the system service process is not monitored in the first time period in a counting mode, so as to determine whether the system service process operates normally, and monitor the operating state of the system service process, so that the system is triggered to restart under the condition that the system service process operates abnormally, and the phenomenon that the system is blocked due to system crash is avoided.
It should be noted that, in the above steps 502 to 504, after the freeze screen monitoring process receives the enable signal sent by the system service process, the inter-process communication between the system service process and the freeze screen monitoring process is not monitored within the first time period.
Step 505: and triggering the system to restart by the frozen screen monitoring process.
In the counting process, the frozen screen monitoring process restarts counting every time the frozen screen monitoring process receives the heartbeat packet sent by the system service process, so that if the frozen screen monitoring process detects that the count value reaches the second value, the heartbeat packet sent by the system service process is not received for a long time, and the system service process can be determined to be abnormally operated, for example, the heartbeat packet cannot be sent to the frozen screen monitoring mechanism due to the failure of the watchdog monitoring mechanism. At the moment, in order to avoid the phenomena of screen blackness and the like caused by the system being stuck, the screen freezing monitoring process triggers the system to restart. For example, the frozen screen monitoring process calls the power-down interface to power down the system and then calls the underlying power-up interface periodically to restart the system.
As an example of the present application, taking counting including count down as an example, after the freeze-screen monitoring process receives an enable signal sent by the system service process, if the freeze-screen monitoring process receives a numerical value modification instruction, the first numerical value is updated to a third numerical value, the numerical value modification instruction carries the third numerical value, the third numerical value is greater than the first numerical value, the numerical value modification instruction is sent by the system service process when detecting that the system service running in the system service process is abnormal, where the abnormality is a situation that the system service process is blocked or a lock is held for a long time.
As described above, the electronic device may monitor the system service process running in the system service process through the watchdog monitoring mechanism in the system service process. When the watchdog monitoring mechanism monitors that the system service is abnormal, because part of the reliability detection scheme in the system starts to work at the moment, in order to not affect the normal operation of the reliability measurement scheme, in addition, the watchdog monitoring mechanism needs to execute other operations, such as needing to grab stack information, restoring the system service, and the like, and therefore the watchdog monitoring process needs to wait for a while, and a certain time is provided for the watchdog monitoring mechanism to restore the system service. Therefore, the system service process sends a numerical value modification instruction to the screen freezing monitoring mechanism to increase the first time length, so that the screen freezing monitoring process can monitor for a period of time more and then determine whether the system service process is abnormal.
As an example, referring to fig. 6, the system service process enables the freeze screen monitoring process and sends a first value of 5 to the freeze screen monitoring process, i.e. indicates the first value for the freeze screen monitoring process. The system service process starts a service monitoring mechanism, and the service monitoring mechanism monitors the system service in the system service process. When the service monitoring mechanism monitors that the system service in the system service process is abnormal in operation, the stack information is captured, and the screen freezing monitoring process is instructed to modify the first numerical value, for example, the first numerical value is 5, and the third numerical value is 6, that is, the system service process instructs the screen freezing monitoring process to modify the first numerical value to 6. In addition, it is understood that, in this case, the first time period is determined based on the modified first value, the modified second value, and the modified third time period.
As another example of the application, when the counting includes incremental counting, after the freeze-screen monitoring process receives an enable signal sent by the system service process, if the freeze-screen monitoring process receives a numerical value modification instruction, the first numerical value is updated to a fourth numerical value, the fourth numerical value is carried in the numerical value modification instruction, and the fourth numerical value is smaller than the first numerical value, where the numerical value modification instruction is sent by the system service process when the system service process detects that the system service in the system service process is abnormal.
That is, during the count-up process, to allow the first duration to increase, the system service process instructs the freeze monitor process to reduce the first value, e.g., the first value is 5 and the fourth value may be 4.
It is worth mentioning that, when the system service running abnormality in the system service process is detected, the system service process instructs the screen freezing monitoring process to adjust the first value so as to increase the first duration, thereby avoiding the system restarting under the condition that the watchdog monitoring mechanism can recover the abnormality of the system service.
It should be noted that, the above is described by taking the example of adjusting the first value when the system service is abnormal, and in another embodiment, if the second value is indicated by the system service process, the second value may be adjusted, or the first value and the second value may be adjusted to increase the first duration.
As an example of the present application, the frozen screen monitoring process receives a value resetting instruction, and updates the third value to the first value, where the value resetting instruction is sent by the system service process when it is detected that the system service is restored to normal.
For example, referring to fig. 6 again, after the service monitoring mechanism restarts the system service, the system service in the system service process returns to normal operation, and then the system service process sends a numerical value resetting instruction to the frozen screen monitoring process. After receiving the value reset command, the freeze monitor process modifies the first value to the value before receiving the value modification command, such as to 5, and starts to count again from 5.
It is worth mentioning that the system service process indicates the screen freezing monitoring process to modify the first value back to the original value after monitoring that the system service is recovered to be normal, so as to recover the monitoring duration of the screen freezing monitoring process.
In the embodiment of the application, a freeze screen monitoring process is started. After the frozen screen monitoring process receives an enabling signal sent by a system service process, if a heartbeat packet sent by the system service process is received within a first time period, the system service process is determined to be abnormal in operation, and at the moment, the frozen screen monitoring process triggers the system to restart in order to avoid the phenomena of screen blacking and the like caused by system crash, so that the problem that the system crash is caused by the fact that the system service process cannot normally operate is solved.
On the basis of the embodiment shown in fig. 3, please refer to fig. 7, fig. 7 is a flowchart illustrating a freeze screen monitoring method according to another exemplary embodiment, which is performed by the electronic device, by way of example and not limitation, and the method may include the following:
step 701: and starting a screen freezing monitoring process.
Step 702: and after the frozen screen monitoring process receives the enabling signal sent by the system service process, timing is started.
As an example, the freeze screen monitoring process starts to count up, for example, from 0, after receiving the enable signal sent by the system service process.
As another example, the freeze screen monitor process starts a countdown, such as from 150 seconds, after receiving the enable signal sent by the system service process.
Step 703: and in the timing process of the frozen screen monitoring process, whether the interprocess communication between the system service process and the frozen screen monitoring process is monitored.
And in the process of timing, the frozen screen monitoring process restarts timing every time the communication between the system service process and the frozen screen monitoring process is monitored.
As an implementation manner, in the timing process, each time a heartbeat packet sent by the system service process is received, the frozen screen monitoring process indicates that the system service process is currently in a normal running state, that is, the system service process is not abnormal. In this case, the freeze screen monitoring process restarts timing. Illustratively, the count-up timer is restarted, or the count-down timer is restarted.
Step 704: and the screen freezing monitoring process detects that the timing time reaches a first time, and determines that the inter-process communication between the system service process and the screen freezing monitoring process is not monitored in the first time.
In an embodiment, since the freeze screen monitoring process restarts timing after receiving a heartbeat packet sent by the system service process every time in the timing process, if the freeze screen monitoring process detects that the timing duration reaches the first duration, it indicates that the freeze screen monitoring process does not receive the heartbeat packet sent by the system service process within a longer period of time, that is, it is determined that the heartbeat packet sent by the system service process is not monitored within the first duration.
It should be noted that, in the above steps 702 to 704, after the freeze screen monitoring process receives the enable signal sent by the system service process, the interprocess communication between the system service process and the freeze screen monitoring process is not monitored in the first time period.
Step 705: and triggering the system to restart by the frozen screen monitoring process.
In an embodiment, in the timing process, timing is restarted when the frozen screen monitoring process receives the heartbeat packet sent by the system service process, so that if the frozen screen monitoring process detects that the timing duration reaches the first duration, it indicates that the heartbeat packet sent by the system service process has not been received within a longer time, and at this time, it may be determined that the system service process is abnormally operated. At the moment, in order to avoid the phenomena of screen blackness and the like caused by the system being stuck, the screen freezing monitoring process triggers the system to restart.
As an example of the present application, after the freeze screen monitoring process receives an enable signal sent by the system service process, if the freeze screen monitoring process receives a numerical modification instruction, the first time length is updated to a sixth time length, the numerical modification instruction carries the sixth time length, the sixth time length is greater than the first time length, and the numerical modification instruction is sent by the system service process when the abnormality of the system service running in the system service process is detected.
As another possible implementation mode, after the screen freezing monitoring process is enabled, when the system service process and the screen freezing monitoring process normally carry out interprocess communication, timing is not started, timing is started when the system service process is detected to be abnormal, and the system is triggered to restart when the first time length is exceeded.
In the embodiment of the application, a freeze screen monitoring process is started. After the frozen screen monitoring process receives an enabling signal sent by a system service process, if a heartbeat packet sent by the system service process is received within a first time period, the system service process is determined to be abnormal in operation, and at the moment, the frozen screen monitoring process triggers the system to restart in order to avoid the phenomena of screen blacking and the like caused by system crash, so that the problem that the system crash is caused by the fact that the system service process cannot normally operate is solved.
Referring to fig. 8, fig. 8 is a flowchart illustrating a method for freeze screen monitoring according to another exemplary embodiment, which is performed by the electronic device and is applied to a scenario of freeze screen monitoring during shutdown of the device, by way of example and not limitation, and the method may include:
step 801: and starting a screen freezing monitoring process.
The specific implementation of this method can refer to step 301 in the embodiment shown in fig. 3, and details are not repeated here.
Step 802: and after the frozen screen monitoring process receives an enabling signal sent by the system service process, determining that the electronic equipment cannot finish the process in the shutdown process, and triggering the system to restart.
In some embodiments, the ending process may also be referred to as a kill process, or may also be referred to as a kill process.
During the shutdown process of the electronic device, the init process usually ends up other processes. For example, in the shutdown process, the init process may send an end instruction to other processes in order according to a target process list in the system to end the other processes, where the target process list is used to record an end order of processes to be ended.
If the jelly screen monitoring process determines that the electronic equipment cannot end the process in the shutdown process, the shutdown is blocked, and the frozen screen monitoring process can trigger the system to restart.
As an example of the present application, the end timing of the freeze screen monitoring process is located after the end timing of the system service process. Normally, the system service process is located at the front of the target process list, i.e. the system service process is generally preferentially ended by the init process.
In the shutdown process, the time for the init process to finish the system service dropping process is earlier than the time for finishing the screen freezing monitoring process, that is, the system service process is finished before the screen freezing monitoring process.
As an example of the present application, the freeze monitor process is arranged at the end of a list of target processes in the system. That is, the frozen screen monitoring process is the last process that is ended by the init process.
It is worth mentioning that the screen freezing monitoring process is arranged at the tail position in the target process list, so that the screen freezing monitoring process can monitor more processes which cannot be finished in the shutdown process of the electronic equipment.
As an example of the present application, a case where a process cannot be ended during shutdown of an electronic device includes the following cases:
in the first case: and when the system service process is to be finished, the system service process is not found in the process running list.
Illustratively, when the init process determines the order of reaching the kill system service process according to the process sequence in the target process list, the system service process to be ended is illustrated. At this time, if the init process cannot find the system service process in the process running list, it indicates that the system service process is abnormally ended, and at this time, the electronic device may not end the process.
In the second case: and the system service process is not ended in a fifth time period after an ending instruction for ending the system service process is sent, wherein the fifth time period is longer than the time for normally ending the system service process.
Illustratively, the shutdown identifier is set, when the init process determines the order of reaching the kill system service process according to the process sequence in the target process list, the system service process to be ended is described, the init process finds the system service process in the process running list, and the init process sends an ending instruction for ending the system service process, but the kill system service process cannot be ended, so that the system service process is still in a running state within a fifth time period, and at this time, the system service process cannot be ended normally.
As an example of the present application, the process of determining that the electronic device cannot end the process in the shutdown process by the freeze screen monitoring process may be inferred based on a kill condition of the electronic device to itself (i.e., the freeze screen monitoring process) in the shutdown process. In one example, the specific implementation of determining that the electronic device cannot end the process during shutdown may include: and after receiving the enabling signal sent by the system service process, the screen freezing monitoring process counts every third time length from the first value, wherein the counting comprises count-down or count-up. And in the counting process of the frozen screen monitoring process, counting is started from the first numerical value again every time the heartbeat packet sent by the system service process is received. And under the condition that the count value does not reach the second numerical value, the frozen screen monitoring process receives a shutdown notification, and if the system service process is detected to be finished and a process finishing instruction for finishing the frozen screen monitoring process is not received within the fourth time, the process cannot be finished in the shutdown process.
The fourth time period may be set according to actual requirements, and is exemplarily the same as the first time period.
That is, the freeze screen monitoring process performs the counting operation after receiving the enable signal sent by the system service process. In the counting process, if the counting value does not reach the second value and the shutdown notification is received, the shutdown operation is executed currently, and at this time, the screen freezing monitoring process can inquire whether the system service process is finished or not. Under the condition that the system service process is detected to be finished, if a process finishing instruction for finishing the screen freezing monitoring process is not received within the fourth time length, the system shutdown is blocked, and the electronic equipment can be determined to be incapable of finishing the process in the shutdown process.
In one embodiment, the freeze screen monitoring process receives a shutdown notification from the init process. That is, in the shutdown process, the init process may send a shutdown notification to the frozen screen monitoring process in addition to ending other processes according to the target process list, so as to notify the frozen screen monitoring process that the shutdown operation is currently being performed. For example, the received shutdown notification may be a shutdown flag.
As an example of the present application, a specific implementation of the frozen screen monitoring process for querying whether the system service process is finished may include: and the frozen screen monitoring process inquires whether a system service process exists in the process running list, and if the system service process does not exist in the process running list, the system service process can be determined to be finished. Of course, if there is a system service process in the process run list, it may be determined that the system service process is not finished. Wherein, the process running list comprises the process in running state in the system.
In an embodiment, the fourth duration is the same as the first duration, and the specific implementation of the frozen-screen monitoring process detecting whether the process end instruction is received within the fourth duration may include: the frozen screen monitoring process starts counting from the first value, and if the process ending instruction is not received when the counting value reaches the second value, it can be determined that the process ending instruction is not received within the fourth time length. Conversely, if the process end instruction is received before the count value does not reach the second value, it may be determined that the process end instruction is received within the fourth time period.
It should be noted that, the above is an example process description that whether the process end instruction is received within the fourth time period by determining, in a counting manner, that the frozen-screen monitoring process detects whether the process end instruction is received within the fourth time period, in another embodiment, whether the frozen-screen monitoring process detects whether the process end instruction is received within the fourth time period may also be determined in a timing manner, which is not limited in this embodiment of the application.
Of course, it is understood that, in the case that the count value reaches the second value and the shutdown notification is not received, it indicates that the electronic device is not shutdown in the counting process, that is, the electronic device does not enter the shutdown procedure. In addition, in the counting process, counting can be restarted when the heartbeat packet sent by the system service process is received, so that the heartbeat packet sent by the system service process can be determined not to be received within the first time length, and in this case, the frozen screen monitoring process triggers the system to restart.
In one embodiment, the first duration is indicated by the system service process for the freeze screen monitoring process, or the first duration is preset.
In another embodiment, the second duration is a duration during which all system services in the system service process are monitored once, or the second duration is preset.
In the embodiment of the application, a freeze screen monitoring process is started. After the frozen screen monitoring process receives an enabling signal sent by a system service process, if it is determined that the electronic equipment cannot end the process in the shutdown process, the electronic equipment is shut down and stuck, and the frozen screen monitoring process triggers the system to restart, so that the problem of system crash caused by the fact that the process cannot be normally ended in the shutdown process is solved.
Referring to fig. 9, fig. 9 is a flowchart illustrating a method for freeze screen monitoring according to another exemplary embodiment, which may be applied to the electronic device, by way of example and not limitation, the method includes performing freeze screen monitoring during shutdown, and the method may include the following:
step 901: and starting a screen freezing monitoring process.
Step 902: and after the frozen screen monitoring process receives the enabling signal sent by the system service process, timing is started.
Step 903: and in the timing process of the frozen screen monitoring process, the timing is restarted every time the heartbeat packet sent by the system service process is received.
Specific implementation of steps 901 to 903 may refer to steps 601 to 603 in the embodiment shown in fig. 6, and details are not repeated here.
Step 904: and under the condition that the timing duration does not reach the first duration, the frozen screen monitoring process receives a shutdown notification, and if the system service process is detected to be finished and a process finishing instruction for finishing the frozen screen monitoring process is not received within the fourth duration, the process cannot be finished in the shutdown process.
That is, the freeze screen monitoring process executes the timing operation after receiving the enable signal sent by the system service process. In the timing process, if the timing duration does not reach the first duration and the shutdown notification is received, it indicates that the shutdown operation is currently being performed, and at this time, the frozen screen monitoring process may query whether the system service process is finished. Under the condition that the system service process is detected to be finished, if a process finishing instruction for finishing the screen freezing monitoring process is not received within the fourth time length, the system shutdown is blocked, and the electronic equipment can be determined to be incapable of finishing the process in the shutdown process.
In one embodiment, the freeze screen monitoring process receives a shutdown notification sent by the init process. That is, in the shutdown process, the init process may send a shutdown notification to the frozen screen monitoring process in addition to ending other processes according to the target process list, so as to notify the frozen screen monitoring process that the shutdown operation is currently being performed. For example, the received shutdown notification may be a shutdown flag.
As an example of the present application, a specific implementation of the frozen screen monitoring process for querying whether the system service process is finished may include: and the frozen screen monitoring process inquires whether a system service process exists in the process running list, and if the system service process does not exist in the process running list, the system service process can be determined to be finished. Of course, if there is a system service process in the process run list, it may be determined that the system service process is not finished. Wherein, the process running list comprises the process in running state in the system.
In an embodiment, a specific implementation that the frozen-screen monitoring process detects whether the process end instruction is received within the fourth duration may include: and starting timing by the frozen screen monitoring process, and if the process ending instruction is not received when the timing duration reaches the fourth duration, determining that the process ending instruction is not received in the fourth duration. Conversely, if the process end instruction is received before the timing length does not reach the fourth length, it may be determined that the process end instruction is received within the fourth length.
It should be noted that, the above is an example process description that whether the process end instruction is received within the fourth time period by determining, in a timing manner, whether the freeze-screen monitoring process detects that the process end instruction is received within the fourth time period, in another embodiment, whether the freeze-screen monitoring process detects that the process end instruction is received within the fourth time period may also be determined in a counting manner, which is not limited in this embodiment of the application.
Of course, it is understood that if the timing duration reaches the first duration and the shutdown notification is not received, it indicates that the electronic device is not shutdown in the counting process, that is, the electronic device does not enter the shutdown procedure. In the timing process, timing can be restarted when a heartbeat packet sent by the system service process is received, so that the heartbeat packet sent by the system service process can be determined not to be received within a long period of time.
It should be noted that, in the foregoing steps 902 to 904, after the freeze screen monitoring process receives the enable signal sent by the system service process, an exemplary specific implementation manner that the electronic device cannot end the process in the shutdown process is determined.
Step 905: and triggering the system to restart by the frozen screen monitoring process.
In the embodiment of the application, a freeze screen monitoring process is started. After the frozen screen monitoring process receives an enabling signal sent by a system service process, if it is determined that the electronic equipment cannot end the process in the shutdown process, the shutdown of the electronic equipment is blocked, and the frozen screen monitoring process triggers the system to restart, so that the problem of system crash caused by the fact that the process cannot be normally ended in the shutdown process is solved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 10 is a structural block diagram of a freeze screen monitoring device provided in an embodiment of the present application, corresponding to the freeze screen monitoring method described in the foregoing embodiment, and only the portions related to the embodiment of the present application are shown for convenience of description.
Referring to fig. 10, including amemory 1010 and aprocessor 1020; thememory 1010 is used for storing a program for supporting the apparatus to execute the method of the first aspect, and storing data for implementing the method of the first aspect; theprocessor 1020 is configured for:
starting a screen freezing monitoring process;
after an enabling signal sent by a system service process is received through the screen freezing monitoring process, inter-process communication between the system service process and the screen freezing monitoring process is not monitored within a first time period, or the electronic equipment is determined to be incapable of ending the process in a shutdown process, and the system is triggered to restart, wherein the inter-process communication is used for indicating that the system service process normally operates, the first time period is longer than a second time period, and the second time period is a time interval of the inter-process communication between the system service process and the screen freezing monitoring process.
As an example of the present application, theprocessor 1020 is configured to:
after receiving an enabling signal sent by the system service process through the screen freezing monitoring process, counting once every third time length from a first value, wherein the counting comprises count-down or count-up;
counting from the first numerical value again when the inter-process communication between the system service process and the frozen screen monitoring process is monitored in the counting process through the frozen screen monitoring process;
and determining that inter-process communication between the system service process and the screen freezing monitoring process is not monitored in the first time length when the screen freezing monitoring process detects that the count value reaches a second value, wherein the first value, the second value and the third time length are used for determining the first time length.
As an example of the present application, the count comprises a countdown, and theprocessor 1020 is configured to:
receiving a numerical value modification instruction through the frozen screen monitoring process, and updating the first numerical value to a third numerical value, wherein the numerical value modification instruction carries the third numerical value, the third numerical value is larger than the first numerical value, and the numerical value modification instruction is sent by the system service process under the condition that the system service running in the system service process is detected to be abnormal.
As an example of the present application, theprocessor 1020 is configured to:
and receiving a numerical value resetting instruction through the frozen screen monitoring process, and updating the third numerical value to the first numerical value again, wherein the numerical value resetting instruction is sent by the system service process under the condition that the system service is detected to be recovered to be normal.
As an example of the present application, theprocessor 1020 is configured to:
grabbing stack information;
and storing the stack information.
As an example of the present application, theprocessor 1020 is configured to:
after receiving an enabling signal sent by the system service process through the frozen screen monitoring process, starting timing;
in the process of timing through the frozen screen monitoring process, restarting timing every time the inter-process communication between the system service process and the frozen screen monitoring process is monitored;
and determining that inter-process communication between the system service process and the frozen screen monitoring process is not monitored in the first time length when the frozen screen monitoring process detects that the timing time length reaches the first time length.
As an example of the present application, theprocessor 1020 is configured to:
after receiving an enabling signal sent by the system service process through the screen freezing monitoring process, counting once every third time length from a first value, wherein the counting comprises count-down or count-up;
counting from the first numerical value again when the interprocess communication between the system service process and the frozen screen monitoring process is monitored in the counting process through the frozen screen monitoring process;
and under the condition that the count value does not reach the second numerical value, the frozen screen monitoring process receives a shutdown notification, and if the system service process is detected to be finished and a process finishing instruction for finishing the frozen screen monitoring process is not received within a fourth time, the electronic equipment is determined to be incapable of finishing the process in the shutdown process.
As an example of the present application, the case that the process cannot be ended in the shutdown process of the electronic device includes: when the system service process is finished, the system service process is not found in a process running list, or the system service process is not finished in a fifth time length after an end instruction for finishing the system service process is sent, wherein the process running list comprises processes in a running state in a system.
As an example of the present application, the end timing of the freeze screen monitoring process is located after the end timing of the system service process.
As an example of the present application, the freeze screen monitoring process is arranged at an end position in a target process list in the system, where the target process list is used to record an ending sequence of processes to be ended.
As an example of the application, the first duration is indicated by the system service process for the freeze screen monitoring process, or the first duration is preset.
As an example of the present application, the second duration is a duration during which all system services in the system service process are monitored in a traversal mode once, or the second duration is preset.
In the embodiment of the application, a freeze screen monitoring process is started. When the screen freezing monitoring process monitors that the system service process is abnormally operated or the electronic equipment cannot be normally shut down, the screen freezing monitoring process triggers the system to restart in order to avoid the phenomena of screen blacking and the like caused by system crash, and therefore the problem of system crash in the system operation process is solved.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or apparatus capable of carrying computer program code to an electronic device, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, and software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
Finally, it should be noted that: the above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.