CN110457177B - Startup abnormity detection method and device, electronic equipment and storage medium - Google Patents

Startup abnormity detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110457177B
CN110457177B CN201910671299.6A CN201910671299A CN110457177B CN 110457177 B CN110457177 B CN 110457177B CN 201910671299 A CN201910671299 A CN 201910671299A CN 110457177 B CN110457177 B CN 110457177B
Authority
CN
China
Prior art keywords
image
screen
frame
array
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910671299.6A
Other languages
Chinese (zh)
Other versions
CN110457177A (en
Inventor
范辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910671299.6A priority Critical patent/CN110457177B/en
Publication of CN110457177A publication Critical patent/CN110457177A/en
Application granted granted Critical
Publication of CN110457177B publication Critical patent/CN110457177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a method and a device for detecting startup abnormality, electronic equipment and a storage medium, and relates to the technical field of computers, wherein the method comprises the following steps: when the terminal is in a starting-up state, preprocessing each frame of image, and sending each preprocessed frame of image to a screen of the terminal to obtain a screen image corresponding to each frame; acquiring a screen image of a current frame, and determining whether the screen state of the terminal is an abnormal state or not by combining the screen image of the current frame; and if the screen state is the abnormal state, determining that the terminal is started abnormally. The method and the device can detect whether the screen is abnormal or not, and further improve the detection accuracy of starting-up abnormality.

Description

Startup abnormity detection method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a startup abnormality detection method, a startup abnormality detection device, an electronic device, and a computer readable storage medium.
Background
For various terminals, a section of transition animation is generally played from the moment that a user presses a power key to the moment that the user enters the desktop, and a common dynamic and static LOGO and progress bar are played, and when the dynamic and static LOGO is played or the progress bar is completed, the user enters the desktop to complete the startup.
In the related art, whether a system of an intelligent terminal is normally started or not is monitored and detected only by a method of limiting the starting time. The information detected by the method for limiting the starting time is not comprehensive, and the limitation is large when the screen state is judged manually, so that the detection efficiency is low and the detection result is inaccurate.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide a method and a device for detecting startup abnormality, electronic equipment and a storage medium, so as to solve the problem that whether a terminal is started up abnormally or not is inaccurate in detection result due to limitations and defects of related technologies at least to a certain extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to one aspect of the present disclosure, there is provided a startup anomaly detection method including: when the terminal is in a starting-up state, preprocessing each frame of image, and sending each preprocessed frame of image to a screen of the terminal to obtain a screen image corresponding to each frame; acquiring a screen image of a current frame, and determining whether the screen state of the terminal is an abnormal state or not by combining the screen image of the current frame; and if the screen state is the abnormal state, determining that the terminal is started abnormally.
In one exemplary embodiment of the present disclosure, preprocessing each frame of image includes: mapping each frame of image into an array; and generating a random number for representing a target pixel, and performing inverting operation on a pixel value corresponding to the random number in the array to obtain each frame of preprocessed image.
In an exemplary embodiment of the present disclosure, mapping the frame images into an array includes: calculating the number of pixels of each frame of image; forming an array according to the number of pixels of each frame of image; and mapping the position of each pixel point in each frame image and the position of the array so as to map each frame image into the array.
In one exemplary embodiment of the present disclosure, generating a random number for representing a target pixel includes: the random number is generated according to all or part of the images in each frame of image.
In one exemplary embodiment of the present disclosure, determining whether the screen state of the terminal is an abnormal state in conjunction with the screen image of the current frame includes: comparing the screen image of the current frame with the screen image of the previous frame to obtain a comparison result; and determining whether the screen state of the terminal is the abnormal state according to the comparison result.
In an exemplary embodiment of the present disclosure, comparing the screen image of the current frame with the screen image of the previous frame to obtain a comparison result includes: and calculating the difference value between the array corresponding to the screen image of the current frame and the array corresponding to the screen image of the previous frame at regular time through a timer, and determining the comparison result according to the difference value.
In an exemplary embodiment of the present disclosure, determining whether the screen state of the terminal is the abnormal state according to the comparison result includes: if the difference value is equal to a preset value, determining that the screen state is the abnormal state, wherein the abnormal state is that the screen is blocked; and if the difference value is not equal to the preset value, determining that the screen state is normal.
According to one aspect of the present disclosure, there is provided a power-on abnormality detection apparatus including: the image preprocessing module is used for preprocessing each frame of image when the terminal is in a starting state, and sending each frame of preprocessed image to a screen of the terminal to obtain a screen image corresponding to each frame; the screen abnormality determining module is used for acquiring a screen image of a current frame and determining whether the screen state of the terminal is an abnormal state or not by combining the screen image of the current frame; and the starting-up abnormality determining module is used for determining that the terminal is started up abnormally if the screen state is the abnormal state.
According to one aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the above-described power-on anomaly detection methods via execution of the executable instructions.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the startup anomaly detection method of any one of the above.
In the startup anomaly detection method, the startup anomaly detection device, the electronic device and the computer readable storage medium provided in the exemplary embodiments of the present disclosure, when a terminal is in a startup state, each frame of image after preprocessing is sent to a screen of the terminal to obtain a screen image; and determining whether the screen state of the terminal is an abnormal state according to the screen image, and determining whether the terminal is started to be abnormal according to the screen state. On the one hand, the screen state of the terminal can be determined through the preprocessed screen image so as to judge whether the screen is in an abnormal state, so that the limitation of manually identifying the fault of the terminal is avoided, and the detection efficiency, the convenience of terminal detection and the application range are improved. On the other hand, the screen state of the terminal can be accurately obtained through the preprocessed image, and whether the screen is in an abnormal state or not is judged according to the screen state, so that whether the terminal is started up abnormally or not is determined, the accuracy of terminal detection is improved, and the maintenance rate of the terminal is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
Fig. 1 schematically illustrates a schematic diagram of a startup anomaly detection method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a schematic diagram of preprocessing each frame of image in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of mapping an image and an array in an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates a first screen lock-up in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a second type of screen lock in an exemplary embodiment of the present disclosure;
fig. 6 schematically illustrates a flowchart for determining a screen state of a terminal in an exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a power-on anomaly detection device in an exemplary embodiment of the present disclosure;
fig. 8 schematically illustrates a block diagram of an electronic device in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
In the related art, a short-time combined with long-time early warning method may be used. For example, the short time is set to 10min, the long time is set to 30min, each sub-flow in the terminal starting flow is monitored and early-warned in a short time from the kernel stage, and the two stages from the kernel to the success of starting are monitored and early-warned in a long time.
And a three-section monitoring method can be used, wdt for monitoring the operation of the singlechip is started in the stage of uefi/lk, and early warning is sent out if the time-out is not completed for 20 seconds. In the kernel to active phase, monitoring is performed through a kernel thread, and if the initial phase is not started within 60 seconds, early warning is sent out. And in the period from the active to the completion of the startup, starting a service to monitor whether the startup is completed, and if the startup is not completed within 240s, sending out an early warning.
In the above two schemes, although it is possible to detect whether the system can be started normally, it is not possible to detect the state of the current screen, and it may be the case that the system is stuck when playing the dynamic and static LOGO, that is, the effect of the loop that should be playing the animation, because of some anomaly, the picture stays in a certain frame, the startup process is still running at this time, and for the user, the screen frames freeze, and the system is stuck.
In order to solve the above-mentioned problems, in this exemplary embodiment, a method for detecting a startup anomaly is provided first, which can be applied to an application scenario for detecting a startup condition of a terminal. Referring to fig. 1, the method comprises the steps of:
in step S110, when the terminal is in a power-on state, preprocessing each frame of image, and sending each preprocessed frame of image to a screen of the terminal to obtain a screen image corresponding to each frame;
in step S120, a screen image of a current frame is acquired, and whether the screen state of the terminal is an abnormal state is determined in combination with the screen image of the current frame;
in step S130, if the screen state is the abnormal state, it is determined that the terminal is started abnormally.
In the startup anomaly detection method provided in the exemplary embodiment of the present disclosure, on one hand, since the screen state of the terminal can be determined through the preprocessed screen image, so as to determine whether the screen is in an abnormal state, the limitation of manually identifying the terminal fault is avoided, and the detection efficiency, the convenience of terminal detection and the application range are improved. On the other hand, the screen state of the terminal can be accurately obtained through the preprocessed image, and whether the screen is in an abnormal state or not is judged according to the screen state, so that whether the terminal is started up abnormally or not is determined, the accuracy of terminal detection is improved, and the maintenance rate of the terminal is reduced.
Next, a startup abnormality detection method in the present exemplary embodiment will be specifically described with reference to the drawings.
In step S110, when the terminal is in a power-on state, each frame of image is preprocessed, and each preprocessed frame of image is sent to a screen of the terminal to obtain a screen image.
In this exemplary embodiment, the terminal may be an intelligent terminal installed with any operating system, for example, may include, but not limited to, an electronic device such as a mobile phone, a tablet computer, or an electronic product, and in this exemplary embodiment, a mobile phone installed with an android system is described as an example.
The terminal being in the power-on state means that the terminal is in the power-on process, i.e. the terminal is executing the power-on operation. In the starting-up process of the terminal, the screen of the terminal can play the static LOGO first, then play a section of dynamic LOGO until the system loads all system resources and then enters the desktop, so that the whole starting-up process is completed. Each frame of image can be a static LOGO or an image which can be displayed in the starting process, such as a dynamic LOGO. These images may be output to the screen of the terminal so that display on the screen generates a screen image, and 60 frames of screen images may be displayed per second on the screen of the terminal. The images of different frames may be the same or different, and are not particularly limited herein.
When the screen of the terminal is blocked, the screen image displayed on the screen is not replaced. In order to detect whether screen blocking occurs, each frame of image can be preprocessed before being sent to a screen of a terminal for display, so that each preprocessed frame of image is obtained and sent to the screen of the terminal. In the present exemplary embodiment, a screen image corresponding to each frame may be described as a static LOGO.
Fig. 2 schematically shows a flowchart of preprocessing each frame image, and referring to fig. 2, the method mainly includes the following steps:
in step S210, the frame images are mapped into an array.
In the present exemplary embodiment, a plurality of pixels may be included in each frame image, an array may be generated from the pixels of each frame image, and each frame image and the array may be mapped to obtain a mapping relationship. The specific implementation manner of step S210 may include steps S211 to S213, wherein:
in step S211, the number of pixels of each frame image is calculated;
in step S212, an array is formed according to the number of pixels of each frame of image;
in step S213, the position of each pixel point in each frame image and the position of the array are mapped, so that each frame image is mapped into the array.
In the present exemplary embodiment, the number of pixels of each frame image is first calculated, for example, the number of pixels of the image 1 shown in fig. 3 is 91. And further forming an array associated with the number of pixels according to the number of pixels of each frame of image. The array may be a one-dimensional array, and the size of the array (the number of elements in the array) is the same as the number of pixels of each frame of image. For example, if the number of pixels of image 1 is 91, the size of the array is 91. The elements in the array may be pixel values for each pixel in each frame of image, and thus the elements in the array may be values between 0 and 255. For example, the pixel value of the first pixel is 0, and the value of the first element in the array is 0.
After forming the array corresponding to each frame image, the position of each pixel point in each frame image and the position of the array can be mapped, so that each frame image is mapped into the corresponding array. Referring to the schematic diagram of mapping each frame image into an array shown in the diagram (a) in fig. 3, where 255 represents white, and may be a LOGO part in each frame image; 0 represents black and may be a background portion.
In step S220, a random number for representing the target pixel is generated, and a pixel value corresponding to the random number in the array is inverted, so as to obtain each preprocessed frame image.
In the present exemplary embodiment, the random number refers to a random value of a range located between [0, count (image) ] which represents the number of pixels of each frame image, which is randomly generated. The random number is used to represent the location or index of the target pixel (pixel to be processed) in the array. For example, the generated random number may be 31.
After obtaining the random number, the pixel corresponding to the random number may be taken as the target pixel, for example, the generated random number may be 31, and the 31 st pixel in the array is taken as the target pixel. After obtaining the random number, the pixel value corresponding to the random number in the array can be subjected to the inverting operation, and each frame of image after preprocessing, namely each frame of image after the inverting operation, is obtained according to the mapping relation between the array and each frame of image. The inverting operation is to invert the pixel value corresponding to the random number, for example, change the pixel value 0 to the pixel value 255, and change the pixel value 255 to the pixel value 0.
For example, referring to fig. 3 (B), the size of the array is 91, the random number generated randomly is 31, and then the value of index 31 (i.e. 31 st) in the array is inverted, and the value of the corresponding position (the value of 31 st pixel) in the image can be finally inverted, so that the pixel value of the position is changed from 255 to 0, because the mapping relationship is already established.
It should be noted that a random number may be generated based on all or part of the images in each frame. That is, one pixel inversion may be randomly selected based on the entire screen of each frame image; or only one part of the whole picture of each frame of image can be taken, namely a certain range in the designated image can be randomly selected to be the inverse of a pixel, and the calculation processes of the two are identical, so that the description is omitted.
By mapping the images into arrays, the operation is facilitated and the processing efficiency is improved. Through the pixel value corresponding to the random number in the array and the inversion operation and the preprocessing operation mapped to the array, the difference of each image can be represented more easily, the problem that the screen state is difficult to identify is avoided, and the accuracy, the efficiency and the convenience for determining the screen state are improved.
With continued reference to fig. 1, in step S120, a screen image of a current frame is acquired, and it is determined whether the screen state of the terminal is an abnormal state in combination with the screen image of the current frame.
In the present exemplary embodiment, each time a screen is detected, a screen image of the time may be acquired, that is, a screen image of the current frame is obtained. The screen image of the current frame refers to the screen image after preprocessing, i.e., the screen image may be represented by a corresponding inverted array. And, all the frames 'screen images are preprocessed, i.e., all the frames' screen images can be represented by an array after inversion.
The screen state may be that the screen is in an updated state or an abnormal state, where the abnormal state may be that the screen is stuck, i.e. that a screen is stuck. The screen blocking refers to the phenomenon that the terminal stops on an interface for a long time and cannot operate normally in the starting process. When the screen image is static LOGO, the image displayed on the screen is not replaced or updated any more, and the screen blocking state cannot be judged manually.
Fig. 4 schematically shows an interface diagram of the first screen lock, and referring to fig. 4, a static LOGO is shown at this time, but the screen state is not updated any more, a fixed screen occurs, human eyes cannot separately, and the system is still loaded. A second screen-stuck interface is schematically shown in fig. 5, with reference to fig. 5, where the screen shows dynamic LOGO, but the animation is stuck and the screen state is no longer updated. Namely, the dynamic and static LOGO is blocked when playing, which is the circulation effect of playing the animation, the picture stays in a certain frame due to a certain abnormality, the starting-up flow is still running at the moment, and for the user, the screen picture is frozen, and the system is blocked. I.e.
Based on this, a specific procedure of determining the screen state of the terminal is schematically shown in fig. 6, and referring to fig. 6, mainly includes the steps of:
in step S610, the screen image of the current frame is compared with the screen image of the previous frame to obtain a comparison result.
In the present exemplary embodiment, since whether or not the abnormal state is detected is determined according to whether or not the screen image is changed, the screen image of the current frame can be compared with the screen image of a certain frame that has been displayed before. In order to ensure the accuracy of detection, the screen image of the current frame and the screen image of the previous frame can be compared to obtain a comparison result between the two images. The last frame of screen image refers to the screen image displayed last adjacent to the screen image of the current frame. For example, since a screen displays 60 frames of images per second (1000 ms), i.e., one image per 33.3ms, the screen image of the current frame is 66.6ms, and the screen image of the previous frame is 33.3 ms.
Since the screen image of the current frame and the screen image of the previous frame can be preprocessed by the step in step S110 and expressed by the inverted array, the screen images can be compared based on the array corresponding to the screen image. The specific process of comparison can be as follows: and calculating the difference value between the array corresponding to the screen image of the current frame and the array corresponding to the screen image of the previous frame at regular time through a timer, and determining the comparison result according to the difference value. The timer is used for automatically triggering the screen state monitoring function. Since the screen displays one screen image every 33.3ms, the triggering time of the timer may be longer than 33.3ms, for example, 40ms, 50ms, or the like. In the present exemplary embodiment, the set timer has a time interval of 50ms, and every 50ms, the timer calls the screen state detection program to detect the screen, so as to determine the screen state.
The process of calculating the difference between the array corresponding to the screen image of the current frame and the array corresponding to the screen image of the previous frame comprises the following steps: the difference between corresponding elements in the two arrays may be calculated such that the difference between the two arrays is determined from the difference for each element. For example, the screen image 1 of the current frame corresponds to the array 1, and the screen image 2 of the previous frame corresponds to the array 2, the difference between each element in the array 1 and the array 2 may be calculated, so that the difference between the two arrays is determined according to the difference of each element. Specifically, if the difference between each element in the array 1 and the array 2 is 0, the difference between the two arrays is 0; if the difference between each element in array 1 and array 2 is not exactly 0, then the difference between the two arrays is not 0. Further, the difference between the two groups may be taken as a comparison result.
In step S620, it is determined whether the screen state of the terminal is the abnormal state according to the comparison result.
In the present exemplary embodiment, the comparison results are different, and the corresponding screen states are also different. Specifically, the specific implementation manner of step S620 may include steps S621 to S623, wherein:
in step S621, it is determined whether the difference is equal to a preset value;
in step S622, if the difference value is equal to a preset value, determining that the screen state is the abnormal state, where the abnormal state is that the screen is stuck;
in step S623, if the difference is not equal to the preset value, it is determined that the screen state is normal.
In the present exemplary embodiment, the preset value may be set to 0 or other values according to actual demands. If the difference between the array corresponding to the screen image of the current frame and the array corresponding to the screen image of the previous frame is 0, that is, the difference of each element in the two arrays is 0, it can be judged that the image displayed in the screen is not updated, that is, the screen is not refreshed any more, and the screen is in an abnormal state of seizing.
If the difference between the array corresponding to the screen image of the current frame and the array corresponding to the screen image of the previous frame is not 0 (greater than 0 or less than 0), that is, the difference of at least one element in all elements in the two arrays is not 0, it can be judged that the image displayed in the screen is always updated and the screen state is in a normal state.
In step S130, if the screen state is the abnormal state, it is determined that the terminal is started abnormally.
In this exemplary embodiment, if it is determined that the screen state has a fault such as screen blocking, it may be directly determined that the terminal is abnormal in power-on. Under the condition, the mobile phone can be directly restored or forcefully restarted to restore when the screen blocking problem is encountered by detecting the screen state when the mobile phone is started, so that the dismissal rate and the maintenance rate of the user are reduced.
In the present exemplary embodiment, the screen detection program is triggered at regular time by the timer, so that whether the screen is stuck or not can be determined according to the difference value between the screen image of the current frame and the screen image of the previous frame after preprocessing, thereby improving the accuracy and efficiency, avoiding the limitation of manually identifying the terminal fault, improving the detection efficiency and the convenience and application range of the terminal detection, and improving the accuracy and efficiency of detecting the starting-up abnormality.
In this exemplary embodiment, there is further provided a device for detecting a startup abnormality, referring to fig. 7, the device 700 mainly includes the following modules:
the image preprocessing module 701 is configured to preprocess each frame of image when the terminal is in a power-on state, and send each preprocessed frame of image to a screen of the terminal to obtain a screen image corresponding to each frame;
a screen anomaly determination module 702, configured to acquire a screen image of a current frame, and determine whether a screen state of the terminal is an anomaly state in combination with the screen image of the current frame;
the power-on abnormality determination module 703 is configured to determine that the terminal is power-on abnormal if the screen state is the abnormal state.
In one exemplary embodiment of the present disclosure, an image preprocessing module includes: the array mapping module is used for mapping each frame of image into an array; the image inverting module is used for generating a random number used for representing a target pixel and inverting pixel values corresponding to the random number in the array so as to obtain each frame of preprocessed image.
In one exemplary embodiment of the present disclosure, the array mapping module is configured to: calculating the number of pixels of each frame of image; forming an array according to the number of pixels of each frame of image; and mapping the position of each pixel point in each frame image and the position of the array so as to map each frame image into the array.
In one exemplary embodiment of the present disclosure, the image inverting module is configured to: the random number is generated according to all or part of the images in each frame of image.
In one exemplary embodiment of the present disclosure, the screen anomaly determination module includes: the image comparison module is used for comparing the screen image of the current frame with the screen image of the previous frame to obtain a comparison result; and the result determining module is used for determining whether the screen state of the terminal is the abnormal state according to the comparison result.
In one exemplary embodiment of the present disclosure, the image contrast module is configured to: and calculating the difference value between the array corresponding to the screen image of the current frame and the array corresponding to the screen image of the previous frame at regular time through a timer, and determining the comparison result according to the difference value.
In one exemplary embodiment of the present disclosure, the result determination module is configured to: if the difference value is equal to a preset value, determining that the screen state is the abnormal state, wherein the abnormal state is that the screen is blocked; and if the difference value is not equal to the preset value, determining that the screen state is normal.
It should be noted that, the specific details of each module in the above power-on anomaly detection device have been described in detail in the corresponding power-on anomaly detection method, so that the details are not repeated here.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to such an embodiment of the invention is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the electronic device 800 is embodied in the form of a general purpose computing device. Components of electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, and a bus 850 connecting the different system components, including the memory unit 820 and the processing unit 810.
Wherein the storage unit stores program code that is executable by the processing unit 810 such that the processing unit 810 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 810 may perform the steps as shown in fig. 1.
The storage unit 820 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 8201 and/or cache memory 8202, and may further include Read Only Memory (ROM) 8203.
Storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 830 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 800, and/or any device (e.g., router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 850. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 over bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 800, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (8)

1. The method for detecting the starting-up abnormality is characterized by comprising the following steps:
mapping each frame of image to an array to generate a random number for representing a target pixel when the terminal is in a starting state, performing a reversal operation on a pixel value corresponding to the random number in the array to obtain each frame of image after pretreatment, and sending each frame of image after pretreatment to a screen of the terminal to obtain a screen image corresponding to each frame; the size of the array is the same as the number of pixels of each frame of image, and the elements of the array are the pixel value of each pixel in each frame of image;
acquiring a screen image of a current frame, determining a difference value between an array corresponding to the screen image of the current frame and an array corresponding to the screen image of a previous frame to determine a comparison result according to the difference value, and determining whether the screen state of the terminal is an abnormal state according to the comparison result;
and if the screen state is the abnormal state, determining that the terminal is started abnormally.
2. The power-on anomaly detection method of claim 1, wherein mapping each frame of image into an array comprises:
calculating the number of pixels of each frame of image;
forming an array according to the number of pixels of each frame of image;
and mapping the position of each pixel point in each frame image and the position of the array so as to map each frame image into the array.
3. The power-on anomaly detection method of claim 1, wherein generating a random number for representing a target pixel comprises:
the random number is generated according to all or part of the images in each frame of image.
4. The power-on anomaly detection method according to claim 1, wherein comparing the screen image of the current frame with the screen image of the previous frame to obtain a comparison result comprises:
and calculating the difference value between the array corresponding to the screen image of the current frame and the array corresponding to the screen image of the previous frame at regular time through a timer, and determining the comparison result according to the difference value.
5. The power-on anomaly detection method according to claim 4, wherein determining whether the screen state of the terminal is the anomaly state according to the comparison result comprises:
if the difference value is equal to a preset value, determining that the screen state is the abnormal state, wherein the abnormal state is that the screen is blocked;
and if the difference value is not equal to the preset value, determining that the screen state is normal.
6. A power-on abnormality detection apparatus, comprising:
the image preprocessing module is used for mapping each frame of image into an array to generate a random number for representing a target pixel when the terminal is in a starting state, performing inverse operation on a pixel value corresponding to the random number in the array to obtain each frame of preprocessed image, and sending each frame of preprocessed image to a screen of the terminal to obtain a screen image corresponding to each frame; the size of the array is the same as the number of pixels of each frame of image, and the elements of the array are the pixel value of each pixel in each frame of image;
the screen abnormality determining module is used for acquiring a screen image of a current frame, determining a difference value between an array corresponding to the screen image of the current frame and an array corresponding to the screen image of a previous frame, determining a comparison result according to the difference value, and determining whether the screen state of the terminal is an abnormal state according to the comparison result;
and the starting-up abnormality determining module is used for determining that the terminal is started up abnormally if the screen state is the abnormal state.
7. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the power-on anomaly detection method of any one of claims 1-5 via execution of the executable instructions.
8. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the power-on anomaly detection method of any one of claims 1-5.
CN201910671299.6A 2019-07-24 2019-07-24 Startup abnormity detection method and device, electronic equipment and storage medium Active CN110457177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910671299.6A CN110457177B (en) 2019-07-24 2019-07-24 Startup abnormity detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910671299.6A CN110457177B (en) 2019-07-24 2019-07-24 Startup abnormity detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110457177A CN110457177A (en) 2019-11-15
CN110457177B true CN110457177B (en) 2024-01-09

Family

ID=68483262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910671299.6A Active CN110457177B (en) 2019-07-24 2019-07-24 Startup abnormity detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110457177B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019072169A1 (en) * 2017-10-09 2019-04-18 华为技术有限公司 Detection method and device for preventing accidental touch and terminal

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8356319B2 (en) * 2008-01-11 2013-01-15 Csr Technology Inc. Screen saver trigger using partial still picture detection
CN105979332A (en) * 2015-12-04 2016-09-28 乐视致新电子科技(天津)有限公司 Video data detection method and device
CN107704332B (en) * 2017-09-28 2021-06-15 努比亚技术有限公司 Screen freezing solution method, mobile terminal and computer readable storage medium
CN107678934A (en) * 2017-10-13 2018-02-09 北京小米移动软件有限公司 Interim card index selection method and device
CN109901955A (en) * 2017-12-07 2019-06-18 上海擎感智能科技有限公司 A kind of method and system for testing power-on screen state
CN109005457B (en) * 2018-09-19 2021-04-02 腾讯科技(北京)有限公司 Black screen detection method and device, computer equipment and storage medium
CN109522147A (en) * 2018-11-15 2019-03-26 Oppo广东移动通信有限公司 A kind of method, apparatus, storage medium and the terminal of record booting exception information

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019072169A1 (en) * 2017-10-09 2019-04-18 华为技术有限公司 Detection method and device for preventing accidental touch and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
离散分数阶随机变换与加权直方图交叉置乱的双图像加密算法;赵玉兰;苑全德;孟祥萍;;应用光学(06);全文 *

Also Published As

Publication number Publication date
CN110457177A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
US9213625B1 (en) Method and apparatus for performing automated user-interface layout testing
US9547466B2 (en) Systems and methods for using screen sampling to detect display changes
US10802847B1 (en) System and method for reproducing and resolving application errors
US20220342740A1 (en) Method and Device for Detecting Memory Downgrade Error
CN110502345A (en) A kind of overload protection method, device, computer equipment and storage medium
CN109887447B (en) Digital billboard overhauling method and troubleshooting and warning method
CN114327318A (en) Display method and system of cloud desktop
CN112665710A (en) Method and device for detecting running state of equipment, electronic equipment and storage medium
CN109165372B (en) Webpage loading method, device, equipment and storage medium
CN110457177B (en) Startup abnormity detection method and device, electronic equipment and storage medium
US20220107858A1 (en) Methods and systems for multi-resource outage detection for a system of networked computing devices and root cause identification
CN111367799B (en) Method, device, medium and electronic equipment for locating source code breakdown position
US11477104B2 (en) Data rate monitoring to determine channel failure
CN106708605B (en) Method and device for detecting resource leakage
CN114363704A (en) Video playing method, device, equipment and storage medium
CN113064798A (en) Exception handling method and device, electronic equipment and system
CN107480004B (en) Fault recovery method and device and computer equipment
CN114826886B (en) Disaster recovery method and device for application software and electronic equipment
CN112288774B (en) Mobile detection method, mobile detection device, electronic equipment and storage medium
CN114327682B (en) WebView white screen detection method, system, electronic equipment and storage medium
CN113381895B (en) Network fault detection method and device
US20230154156A1 (en) Target detection method and apparatus, and storage medium and electronic device
CN109933537B (en) Stuck detection method, related device, equipment and computer readable medium
CN116225847A (en) Image processor GPU monitoring method, device, equipment and storage medium
CN114116425A (en) Method and device for detecting application program blockage and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant