CN110457177A - Be switched on method for detecting abnormality and device, electronic equipment, storage medium - Google Patents
Be switched on method for detecting abnormality and device, electronic equipment, storage medium Download PDFInfo
- Publication number
- CN110457177A CN110457177A CN201910671299.6A CN201910671299A CN110457177A CN 110457177 A CN110457177 A CN 110457177A CN 201910671299 A CN201910671299 A CN 201910671299A CN 110457177 A CN110457177 A CN 110457177A
- Authority
- CN
- China
- Prior art keywords
- screen
- terminal
- frame
- abnormality
- array
- 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.)
- Granted
Links
- 230000005856 abnormality Effects 0.000 title claims abstract description 61
- 238000000034 method Methods 0.000 title claims abstract description 51
- 230000002159 abnormal effect Effects 0.000 claims abstract description 25
- 238000004590 computer program Methods 0.000 claims description 4
- 238000007781 pre-processing Methods 0.000 claims description 4
- 238000001514 detection method Methods 0.000 abstract description 18
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 11
- 238000012545 processing Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 9
- 238000003491 array Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000013507 mapping Methods 0.000 description 6
- 230000003068 static effect Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000005291 magnetic effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 210000004027 cell Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 210000000352 storage cell Anatomy 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing 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 is directed to a kind of booting method for detecting abnormality and device, electronic equipment, storage mediums, it is related to field of computer technology, this method comprises: in the case where terminal is in open state, each frame image is pre-processed, and pretreated each frame image is sent to the screen of the terminal to obtain the corresponding screen picture of each frame;The screen picture of present frame is obtained, and determines whether the screen state of the terminal is abnormality in conjunction with the screen picture of the present frame;If the screen state is the abnormality, it is determined that the terminal booting is abnormal.Whether the disclosure is able to detect screen abnormal, and then improves the abnormal Detection accuracy of booting.
Description
Technical field
This disclosure relates to field of computer technology, in particular to a kind of booting method for detecting abnormality, the abnormal inspection of booting
Survey device, electronic equipment and computer readable storage medium.
Background technique
For various terminals, it is switched on from user by power key to when entering desktop, can generally plays one section of transition cartoon, often
The sound state LOGO and progress bar seen, when sound state LOGO finish or progress bar complete, then enter desktop completion open
Machine.
In the related technology, only by limiting system of the method for available machine time to intelligent terminal, whether normal boot-strap is carried out
Monitoring and detection.It is not comprehensive by the information for limiting the method detection of available machine time, and in artificial judgment screen state
Limitation is larger, so that detection efficiency is lower and testing result is inaccurate.
It should be noted that information is only used for reinforcing the reason to the background of the disclosure disclosed in above-mentioned background technology part
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The disclosure is designed to provide a kind of booting method for detecting abnormality and device, electronic equipment, storage medium, in turn
Whether be switched on to terminal caused by overcoming the limitation and defect due to the relevant technologies at least to a certain extent abnormal detection
As a result inaccurate problem.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure
Practice and acquistion.
According to one aspect of the disclosure, a kind of booting method for detecting abnormality is provided, comprising: be in open state in terminal
Under, each frame image is pre-processed, and pretreated each frame image is sent to the screen of the terminal to obtain each frame
Corresponding screen picture;The screen picture of present frame is obtained, and determines the terminal in conjunction with the screen picture of the present frame
Whether screen state is abnormality;If the screen state is the abnormality, it is determined that the terminal booting is abnormal.
In a kind of exemplary embodiment of the disclosure, carrying out pretreatment to each frame image includes: by each frame image
It is mapped in an array;The random number for indicating object pixel is generated, and corresponding to the random number in the array
Pixel value carry out inversion operation, to obtain pretreated each frame image.
In a kind of exemplary embodiment of the disclosure, it includes: to calculate that each frame image, which is mapped in an array,
The number of pixels of each frame image;An array is formed according to the number of pixels of each frame image;By each frame image
In the position of each pixel and the position of the array mapped so that each frame image is mapped to the array
In.
In a kind of exemplary embodiment of the disclosure, generating the random number for indicating object pixel includes: according to each
All images or parts of images in frame image generate the random number.
In a kind of exemplary embodiment of the disclosure, the screen of the terminal is determined in conjunction with the screen picture of the present frame
It includes: to compare the screen picture of the screen picture of the present frame and previous frame to obtain that whether tentiform state, which is abnormality,
To comparing result;Whether the screen state that the terminal is determined according to the comparing result is the abnormality.
In a kind of exemplary embodiment of the disclosure, by the screen picture of the screen picture of the present frame and previous frame
Compare with obtain comparing result include: by timer timing calculate the corresponding array of screen picture of the present frame with
Difference between the corresponding array of the screen picture of the previous frame, and the comparing result is determined according to the difference.
In a kind of exemplary embodiment of the disclosure, the screen shape of the terminal is determined according to the comparing result
If it includes: that the difference is equal to preset value that whether state, which is the abnormality, it is determined that the screen state is the abnormal shape
State, the abnormality are that the screen is stuck;If the difference is not equal to the preset value, it is determined that the screen state is just
Often.
According to one aspect of the disclosure, a kind of booting abnormal detector is provided, comprising: image pre-processing module is used
In in the case where terminal is in open state, each frame image is pre-processed, and pretreated each frame image is sent to described
The screen of terminal is to obtain the corresponding screen picture of each frame;Screen exception determining module, for obtaining the screen picture of present frame,
And determine whether the screen state of the terminal is abnormality in conjunction with the screen picture of the present frame;The abnormal determining mould of booting
Block, if being the abnormality for the screen state, it is determined that the terminal booting is abnormal.
According to one aspect of the disclosure, a kind of electronic equipment is provided, comprising: processor;And memory, for storing
The executable instruction of the processor;Wherein, the processor is configured to above-mentioned to execute via the executable instruction is executed
Booting method for detecting abnormality described in any one.
According to one aspect of the disclosure, a kind of computer readable storage medium is provided, computer program is stored thereon with,
The computer program realizes booting method for detecting abnormality described in above-mentioned any one when being executed by processor.
Booting method for detecting abnormality, the booting abnormal detector, electronic equipment provided in disclosure exemplary embodiment
And in computer readable storage medium, in the case where terminal is in open state, pretreated each frame image is sent to described
The screen of terminal is to obtain screen picture;Whether the screen state that the terminal is determined according to the screen picture is abnormal shape
State, and determine whether the terminal is switched on exception according to the screen state.On the one hand, since pretreated screen can be passed through
Curtain image determines that the screen state of terminal to judge whether screen is in abnormality, avoids manual identified terminal fault
Limitation improves the convenience and application range of detection efficiency and terminal detection.On the other hand, due to can be by locating in advance
Image after reason accurately obtains the screen state of terminal, and according to screen state judge screen whether be abnormality so that it is determined that
Whether exception, the accuracy of terminal detection is improved, to reduce the maintenance rate of terminal if being switched on.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.It should be evident that the accompanying drawings in the following description is only the disclosure
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 schematically shows a kind of schematic diagram for the method for detecting abnormality that is switched in disclosure exemplary embodiment;
Fig. 2 schematically shows in disclosure exemplary embodiment and carries out pretreated schematic diagram to each frame image;
Fig. 3 schematically shows the schematic diagram that image and array are mapped in disclosure exemplary embodiment;
Fig. 4 schematically shows the schematic diagram that the first screen is stuck in disclosure exemplary embodiment;
Fig. 5 schematically shows the schematic diagram that second of screen is stuck in disclosure exemplary embodiment;
Fig. 6 schematically shows the flow chart that the screen state of terminal is determined in disclosure exemplary embodiment;
Fig. 7 schematically shows the block diagram for the abnormal detector that is switched in disclosure exemplary embodiment;
Fig. 8 schematically shows the block diagram of a kind of electronic equipment in disclosure exemplary embodiment.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot
Structure or characteristic can be incorporated in any suitable manner in one or more embodiments.In the following description, it provides perhaps
More details fully understand embodiment of the present disclosure to provide.It will be appreciated, however, by one skilled in the art that can
It is omitted with technical solution of the disclosure one or more in the specific detail, or others side can be used
Method, constituent element, device, step etc..In other cases, be not shown in detail or describe known solution to avoid a presumptuous guest usurps the role of the host and
So that all aspects of this disclosure thicken.
In addition, attached drawing is only the schematic illustrations of the disclosure, it is not necessarily drawn to scale.Identical attached drawing mark in figure
Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in the drawings are function
Energy entity, not necessarily must be corresponding with physically or logically independent entity.These function can be realized using software form
Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place
These functional entitys are realized in reason device device and/or microcontroller device.
In the related technology, the short time can be used in conjunction with prolonged method for early warning.Such as the short time is set as 10min,
It is set as 30min for a long time, to since the kernel stage, each sub-process in terminal Booting sequence is supervised with the short time
Control and early warning, to kernel to be switched on successfully the two stages with being monitored and early warning for a long time.
The monitoring method that three-stage can also be used opens the wdt for monitoring single-chip microcontroller operation in the uefi/lk stage,
If time-out 20s does not complete to issue early warning.In kernel to the native stage, monitored by a kernel thread, if
It starts to the init stage not yet in 60s, then issues early warning.In native to booting completion stage, start a service prison
The completion that whether is switched on is controlled, if there are no bootings to complete in 240s, issues early warning.
In above two scheme, although can detecte whether system can not detect current screen with normal boot-strap
The state of curtain, it is possible to it plays stuck when sound state LOGO, i.e., should be the circulating effect of playing animation, due to
Certain exception, picture rest on a certain frame, and starting procedure is still being run at this time, and for a user, screen-picture fixes,
System is stuck.
To solve the above-mentioned problems, a kind of booting method for detecting abnormality is provided firstly in this example embodiment, it can be with
In the application scenarios detected applied to the switch on condition to terminal.With reference to shown in Fig. 1, method includes the following steps:
In step s 110, in the case where terminal is in open state, each frame image is pre-processed, and will be pretreated
Each frame image is sent to the screen of the terminal to obtain the corresponding screen picture of each frame;
In the step s 120, the screen picture of present frame is obtained, and in conjunction with described in the determination of the screen picture of the present frame
Whether the screen state of terminal is abnormality;
In step s 130, if the screen state is the abnormality, it is determined that the terminal booting is abnormal.
In the booting method for detecting abnormality provided in disclosure exemplary embodiment, on the one hand, due to can be by locating in advance
Screen picture after reason determines the screen state of terminal to judge whether screen is in abnormality, avoids manual identified end
The limitation for holding failure improves the convenience and application range of detection efficiency and terminal detection.On the other hand, due to can be with
The screen state of terminal is accurately obtained by pretreated image, and judges whether screen is abnormality according to screen state
It determines whether that booting is abnormal, the accuracy of terminal detection is improved, to reduce the maintenance rate of terminal.
Next, the booting method for detecting abnormality in the present exemplary embodiment is specifically described with reference to attached drawing.
In step s 110, in the case where terminal is in open state, each frame image is pre-processed, and will be pretreated
Each frame image is sent to the screen of the terminal to obtain screen picture.
In the present exemplary embodiment, terminal can be the intelligent terminal for being equipped with any operating system, such as may include
But it is not limited to the electronic equipments such as mobile phone, tablet computer either electronic product, to install Android system in the present exemplary embodiment
Mobile phone for be illustrated.
Terminal is in open state and refers to that terminal is in start process, i.e., terminal is carrying out power-on operation.Terminal
In start process, the screen of terminal can first play static LOGO, then play one section of dynamic LOGO again until system loads are complete
All system resource is subsequently into desktop, to complete entire start process.Wherein, each frame image can be static state LOGO,
The image that can be shown in start process for dynamic LOGO etc..These images can be exported to the screen of terminal, with
Screen picture is generated convenient for carrying out display on the screen, and per second on the screen of terminal can show 60 frame screen pictures.It is different
The image of frame may be the same or different, and be not particularly limited herein.
When card screen occurs due to the screen of terminal, the screen picture shown on screen can not replaced again.And it was switched on
That play sometimes in journey is static LOGO, what it was no variation in, so being directly that can not judge that system is by eye-observation
It is no that card screen occurs, in order to detect card screen whether occurs, can be shown in the screen that each frame image is sent to terminal
Before showing, pretreatment operation is carried out to each frame image, to obtain pretreated each frame image and send it to the screen of terminal
Curtain.In the present exemplary embodiment, it can be illustrated so that the corresponding screen picture of each frame is static state LOGO as an example.
Diagrammatically illustrated in Fig. 2 and pretreated flow chart carried out to each frame image, refering to what is shown in Fig. 2, mainly include with
Lower step:
In step S210, each frame image is mapped in an array.
It may include multiple pixels in each frame image in the present exemplary embodiment, it can be raw according to the pixel of each frame image
It is mapped at array, and by each frame image with array, to obtain mapping relations.The specific implementation of step S210 can be with
Including step S211 to step S213, in which:
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 image;
In step S213, by each frame image the position of each pixel and the position of the array reflect
It penetrates, so that each frame image is mapped in the array.
In the present exemplary embodiment, the number of pixels of each frame image is calculated first, such as the picture of image 1 shown in Fig. 3
Plain number is 91.One and the associated array of number of pixels are formed according further to the number of pixels of each frame image.The array
It can be one-dimension array, and the size (number of element in array) of array is identical as the number of pixels of each frame image.For example,
The number of pixels of image 1 is 91, then the size of array is 91.Element in array can be the picture of each pixel in each frame image
Element value, therefore element can value between 0-255 in array.For example, the pixel value of first pixel is 0, then in array
The value of first element is 0.
It, can be by the position of each of each frame image pixel and the array after forming the corresponding array of each frame image
Position mapped so that each frame image is mapped in corresponding array.Each frame figure with reference to shown in the figure (A) in Fig. 3
As the schematic diagram being mapped in array, wherein 255 indicate white, it can be the part LOGO in each frame image;0 indicates black,
It can be background parts.
In step S220, the random number for indicating object pixel is generated, and to the random number in the array
Corresponding pixel value carries out inversion operation, to obtain pretreated each frame image.
In the present exemplary embodiment, random number refers to the range between [0, count (image)] generated at random
Random value, wherein count (image) indicate be each frame image number of pixels.Random number is for indicating target in array
Position where pixel (pixel to be processed) either indexes.For example, the random number generated can be 31.
, can be using the corresponding pixel of the random number as object pixel after obtaining random number, such as the random number of generation can
Think 31, then using the 31st pixel in array as object pixel.It, can be to the random number in array after obtaining random number
Corresponding pixel value carries out inversion operation, and according to the mapping relations between array and each frame image, obtains pretreated
Each frame image, i.e., each frame image after inversion operation.Inversion operation refers to negating the corresponding pixel value of random number,
Such as pixel value 0 is changed to pixel value 255, pixel value 255 is changed to pixel value 0.
For example, with reference to shown in the figure (B) in Fig. 3, the size of array is 91, and the random number generated at random is 31, in
It is that will index the value that index is 31 (i.e. the 31st) in array to invert, due to having been set up mapping relations, may finally will schemes
Value (value of the 31st pixel) reversion of corresponding position as in, so that the pixel value of the position becomes 0 from 255.
It should be noted that one can be generated at random according to the either parts of images of all images in each frame image
Number.It is negated that is, a pixel can be selected at random based on the entire picture of each frame image;Each frame figure can also only be taken
A part in the entire picture of picture, it can some range in specified image is selected a pixel at random and negated, the two
Calculating process it is identical, details are not described herein again.
By mapping an image in array, convenient for operating and improving treatment effeciency.By to the random number in array
Corresponding pixel value carries out inversion operation, by inversion operation and is mapped to the pretreatment operation of array, can be easier
The difference for indicating each image, avoids the problem of screen state is difficult to, and improves accuracy, the effect of determining screen state
Rate and convenience.
Shown in continuing to refer to figure 1, in the step s 120, the screen picture of present frame is obtained, and in conjunction with the present frame
Screen picture determine whether the screen state of the terminal is abnormality.
In the present exemplary embodiment, every time when detecting to screen, the screen picture of this available time is to get arriving
The screen picture of present frame.The screen picture of present frame refers to the screen picture after pretreatment, the i.e. screen picture
It can be indicated with the array after corresponding negate.Also, the screen picture of all frames is owned by pretreated
The screen picture of frame can be indicated by the array after negating.
Screen state can be in more new state either abnormality for screen, and abnormality herein can be screen
It is stuck, that is, card screen occurs.Card screen refers to terminal in the process of booting, occurs stopping on an interface and nothing for a long time
Method is normally carried out the phenomenon that operation.The image shown when screen picture is static state LOGO, on screen can not occur again replacement with more
Newly, and this card screen state can not artificial judgment.
The stuck interface schematic diagram of the first screen is diagrammatically illustrated in Fig. 4 to show at this time with reference to shown in Fig. 4
It is static LOGO, but screen state no longer updates, and has occurred and determines screen, human eye can not be distinguished, and system is still loading.Figure
The stuck interface schematic diagram of second of screen is diagrammatically illustrated in 5, with reference to shown in Fig. 5, dynamic is shown in screen at this time
LOGO, but animation is stuck, screen state no longer updates.That is stuck when broadcasting sound state LOGO, it should be playing animation
Circulating effect, due to certain exception, picture rests on a certain frame, and starting procedure is still being run at this time, and for user come
It says, screen-picture fixes, and system is stuck.I.e.
The detailed process of the screen state of determining terminal is diagrammatically illustrated based on this, in Fig. 6, it is main with reference to shown in Fig. 6
Want the following steps are included:
In step S610, the screen picture of the screen picture of the present frame and previous frame is compared to obtain pair
Compare result.
In the present exemplary embodiment, due to detecting whether it is to sentence according to whether screen picture changes for abnormality
Disconnected, therefore the screen picture of present frame can be compared with the screen picture of a certain frame shown before.In order to protect
The accuracy for demonstrate,proving detection, the screen picture of present frame can be compared to obtain between two images with the screen picture of previous frame
Comparing result.Previous frame screen picture refers to, the screen picture of a upper display adjacent with the screen picture of present frame.
For example, since screen each second (1000ms) can show that the image of 60 frames, i.e., every 33.3ms show an image, present frame
Screen picture be 66.6ms screen picture, then the screen picture of previous frame be 33.3ms screen picture.
Since the screen picture of present frame and the screen picture of previous frame can be carried out by the step in step S110
Pretreatment, and be indicated with negated array, therefore screen picture can be carried out based on screen picture corresponding array
Comparison.The detailed process compared can be with are as follows: the corresponding number of screen picture of the present frame is calculated by timer timing
Difference between group array corresponding with the previous frame screen picture, and the comparing result is determined according to the difference.Its
In, timer is used for automatic trigger screen state monitoring function.Since the every 33.3ms of screen shows a screen picture, so,
As long as the triggered time of timer is than 33.3ms long, such as can be 40ms, 50ms etc..In the present exemplary embodiment,
The time interval of the timer of setting is 50ms, and every 50ms, timer can call screen state detection program to carry out screen
Detection, to judge screen state.
Calculate the difference between the corresponding array of the screen picture array corresponding with previous frame screen picture of present frame
Process includes: the difference that can be calculated in two arrays between corresponding element, to determine two according to the difference of each element
Difference between array.For example, the corresponding array 1 of the screen picture 1 of present frame, the corresponding array 2 of previous frame screen picture 2, then
The difference in array 1 and array 2 between each element can be calculated, thus according to the difference of each element determine two arrays it
Between difference.Specifically, if the difference in array 1 and array 2 between each element is 0, the difference of two arrays is 0;
If difference in array 1 and array 2 between each element is endless to be all 0, the difference of two arrays is not 0.Further, may be used
With by the result as a comparison of the difference between two arrays.
In step S620, determine whether the screen state of the terminal is the exception according to the comparing result
State.
In the present exemplary embodiment, comparing result is different, then corresponding screen state is also different.Specifically, step
The specific implementation of S620 may include step S621 to step S623, in which:
In step S621, judge whether the difference is equal to preset value;
In step S622, if the difference is equal to preset value, it is determined that the screen state is the abnormality, institute
Stating abnormality 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, preset value can be set to 0 and either be set as other values according to actual needs.If
Difference between the corresponding array of the screen picture of present frame array corresponding with previous frame screen picture is 0, i.e. two arrays
Each of the difference of element be 0, then may determine that the image shown in screen does not update, that is, indicate no longer to refresh
Screen, screen are in stuck abnormality.
If the difference between the corresponding array of the screen picture of present frame array corresponding with previous frame screen picture is not
(it is greater than 0 either less than 0) for 0, i.e. the difference of at least one element is not 0 in all elements in two arrays, then may be used
To judge that the image shown in screen is updating always, screen state is in normal condition.
In step s 130, if the screen state is the abnormality, it is determined that the terminal booting is abnormal.
In the present exemplary embodiment, if it is determined that the failures such as card screen occur for screen state, then the terminal can be directly determined
Booting is abnormal.In this case, it is possible to which screen state when by detection booting, directly restores mobile phone when encountering card screen problem
It either forces to restart recovery, that reduces user moves back probability and maintenance rate.
In the present exemplary embodiment, program is detected by timer clocked flip screen, can be worked as according to pretreated
The difference of the screen picture of the screen picture and previous frame of previous frame determines whether screen is stuck, improves accuracy rate and efficiency, keeps away
The limitation for having exempted from manual identified terminal fault improves the convenience and application range of detection efficiency and terminal detection, mentions
High booting abnormality detection accuracy and efficiency.
In the present exemplary embodiment, a kind of booting abnormal detector is additionally provided, with reference to shown in Fig. 7, device 700 is main
It comprises the following modules:
Image pre-processing module 701, for being pre-processed to each frame image in the case where terminal is in open state, and will
Pretreated each frame image is sent to the screen of the terminal to obtain the corresponding screen picture of each frame;
Screen exception determining module 702, for obtaining the screen picture of present frame, and in conjunction with the screen map of the present frame
As determining whether the screen state of the terminal is abnormality;
Be switched on abnormal determining module 703, if being the abnormality for the screen state, it is determined that the terminal is opened
Machine is abnormal.
In a kind of exemplary embodiment of the disclosure, image pre-processing module includes: array mapping block, is used for institute
Each frame image is stated to be mapped in an array;Image negates module, for generating the random number for indicating object pixel, and it is right
The corresponding pixel value of the random number in the array carries out inversion operation, to obtain pretreated each frame image.
In a kind of exemplary embodiment of the disclosure, array mapping block is configured that the picture for calculating each frame image
Plain number;An array is formed according to the number of pixels of each frame image;By each pixel in each frame image
Position and the position of the array are mapped, so that each frame image is mapped in the array.
In a kind of exemplary embodiment of the disclosure, image negates module and is configured that according to the whole in each frame image
Image or parts of images generate the random number.
In a kind of exemplary embodiment of the disclosure, screen exception determining module includes: image comparison module, and being used for will
The screen picture of the present frame and the screen picture of previous frame are compared to obtain comparing result;As a result determining module is used
In the screen state that the terminal is determined according to the comparing result whether be the abnormality.
In a kind of exemplary embodiment of the disclosure, image comparison module, which is configured that, calculates institute by timer timing
State the difference between the corresponding array of the screen picture array corresponding with the screen picture of the previous frame of present frame, and according to
The difference determines the comparing result.
In a kind of exemplary embodiment of the disclosure, if as a result determining module is configured that the difference is equal to preset value,
Then determine that the screen state is the abnormality, the abnormality is that the screen is stuck;If the difference is not equal to
The preset value, it is determined that the screen state is normal.
It should be noted that the detail of each module is different in corresponding booting in above-mentioned booting abnormal detector
It is described in detail in normal detection method, therefore details are not described herein again.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description
Member, but this division is not enforceable.In fact, according to embodiment of the present disclosure, it is above-described two or more
Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould
The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
In addition, although describing each step of method in the disclosure in the accompanying drawings with particular order, this does not really want
These steps must be executed in this particular order by asking or implying, or having to carry out step shown in whole could realize
Desired result.Additional or alternative, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/
Or a step is decomposed into execution of multiple steps etc..
In an exemplary embodiment of the disclosure, a kind of electronic equipment that can be realized the above method is additionally provided.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or
Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete
The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here
Referred to as circuit, " module " or " system ".
The electronic equipment 800 of this embodiment according to the present invention is described referring to Fig. 8.The electronics that Fig. 8 is shown
Equipment 800 is only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 8, electronic equipment 800 is showed in the form of universal computing device.The component of electronic equipment 800 can wrap
It includes but is not limited to: at least one above-mentioned processing unit 810, at least one above-mentioned storage unit 820, the different system components of connection
The bus 850 of (including storage unit 820 and processing unit 810).
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 810
Row, so that various according to the present invention described in the execution of the processing unit 810 above-mentioned " illustrative methods " part of this specification
The step of illustrative embodiments.For example, the processing unit 810 can execute step as shown in fig. 1.
Storage unit 820 may include the readable medium of volatile memory cell form, such as Random Access Storage Unit
(RAM) 8201 and/or cache memory unit 8202, it can further include read-only memory unit (ROM) 8203.
Storage unit 820 can also include program/utility with one group of (at least one) program module 8205
8204, such program module 8205 includes but is not limited to: operating system, one or more application program, other program moulds
It may include the realization of network environment in block and program data, each of these examples or certain combination.
Bus 830 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage
Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures
Local bus.
Electronic equipment 800 can also be with one or more external equipments 900 (such as keyboard, sensing equipment, bluetooth equipment
Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 800 communicate, and/or with make
Any equipment (such as the router, modulation /demodulation that the electronic equipment 800 can be communicated with one or more of the other calculating equipment
Device etc.) communication.This communication can be carried out by input/output (I/O) interface 850.Also, electronic equipment 800 can be with
By network adapter 860 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network,
Such as internet) communication.As shown, network adapter 860 is communicated by bus 830 with other modules of electronic equipment 800.
It should be understood that although not shown in the drawings, other hardware and/or software module can not used in conjunction with electronic equipment 800, including but not
Be limited to: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and
Data backup storage system etc..
In an exemplary embodiment of the disclosure, a kind of computer readable storage medium is additionally provided, energy is stored thereon with
Enough realize the program product of this specification above method.In some possible embodiments, various aspects of the invention may be used also
In the form of being embodied as a kind of program product comprising program code, when described program product is run on the terminal device, institute
Program code is stated for executing the terminal device described in above-mentioned " illustrative methods " part of this specification according to this hair
The step of bright various illustrative embodiments.
The program product for realizing the above method of embodiment according to the present invention can use Portable, compact
Disk read-only memory (CD-ROM) and including program code, and can be run on terminal device, such as PC.However,
Program product of the invention is without being limited thereto, and in this document, readable storage medium storing program for executing, which can be, any includes or storage program has
Shape medium, the program can be commanded execution system, device or device use or in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter
Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or
System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive
List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only
Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory
(CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
In carry readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal,
Optical signal or above-mentioned any appropriate combination.Readable signal medium can also be any readable Jie other than readable storage medium storing program for executing
Matter, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or and its
The program of combined use.
The program code for including on readable medium can transmit with any suitable medium, including but not limited to wirelessly, have
Line, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages
Code, described program design language include object oriented program language-Java, C++ etc., further include conventional
Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user
It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating
Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far
Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network
(WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP
To be connected by internet).
In addition, above-mentioned attached drawing is only the schematic theory of processing included by method according to an exemplary embodiment of the present invention
It is bright, rather than limit purpose.It can be readily appreciated that the time that above-mentioned processing shown in the drawings did not indicated or limited these processing is suitable
Sequence.In addition, be also easy to understand, these processing, which can be, for example either synchronously or asynchronously to be executed in multiple modules.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
His embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Adaptive change follow the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure or
Conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by claim
It points out.
Claims (10)
1. a kind of booting method for detecting abnormality characterized by comprising
In the case where terminal is in open state, each frame image is pre-processed, and pretreated each frame image is sent to institute
The screen of terminal is stated to obtain the corresponding screen picture of each frame;
Obtain present frame screen picture, and in conjunction with the screen picture of the present frame determine the terminal screen state whether
For abnormality;
If the screen state is the abnormality, it is determined that the terminal booting is abnormal.
2. booting method for detecting abnormality according to claim 1, which is characterized in that carry out pretreatment packet to each frame image
It includes:
Each frame image is mapped in an array;
The random number for indicating object pixel is generated, and the corresponding pixel value of the random number in the array is taken
Inverse operations, to obtain pretreated each frame image.
3. booting method for detecting abnormality according to claim 2, which is characterized in that each frame image is mapped to one
Include: in array
Calculate the number of pixels of each frame image;
An array is formed according to the number of pixels of each frame image;
By in each frame image the position of each pixel and the position of the array map so that each frame figure
As being mapped in the array.
4. booting method for detecting abnormality according to claim 2, which is characterized in that generate for indicate object pixel with
Machine number includes:
According to all images or the parts of images generation random number in each frame image.
5. booting method for detecting abnormality according to claim 2, which is characterized in that in conjunction with the screen picture of the present frame
Whether the screen state for determining the terminal is that abnormality includes:
The screen picture of the screen picture of the present frame and previous frame is compared to obtain comparing result;
Whether the screen state that the terminal is determined according to the comparing result is the abnormality.
6. booting method for detecting abnormality according to claim 5, which is characterized in that by the screen picture of the present frame with
The screen picture of previous frame is compared to obtain comparing result and include:
The screen picture pair of the screen picture corresponding array and the previous frame of the present frame is calculated by timer timing
The difference between array answered, and the comparing result is determined according to the difference.
7. booting method for detecting abnormality according to claim 6, which is characterized in that according to comparing result determination
Whether the screen state of terminal is that the abnormality includes:
If the difference is equal to preset value, it is determined that the screen state is the abnormality, and the abnormality is described
Screen is stuck;
If the difference is not equal to the preset value, it is determined that the screen state is normal.
8. a kind of booting abnormal detector characterized by comprising
Image pre-processing module, for being pre-processed to each frame image in the case where terminal is in open state, and will be after pretreatment
Each frame image be sent to the screen of the terminal to obtain the corresponding screen picture of each frame;
Screen exception determining module is determined for obtaining the screen picture of present frame, and in conjunction with the screen picture of the present frame
Whether the screen state of the terminal is abnormality;
Be switched on abnormal determining module, if being the abnormality for the screen state, it is determined that the terminal booting is abnormal.
9. a kind of electronic equipment characterized by comprising
Processor;And
Memory, for storing the executable instruction of the processor;
Wherein, the processor is configured to come described in perform claim requirement 1-7 any one via the execution executable instruction
Booting method for detecting abnormality.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
Booting method for detecting abnormality described in claim 1-7 any one is realized when being executed by processor.
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 true CN110457177A (en) | 2019-11-15 |
CN110457177B 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 (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090179909A1 (en) * | 2008-01-11 | 2009-07-16 | Zoran Corporation | Screen saver trigger using partial still picture detection |
WO2017092343A1 (en) * | 2015-12-04 | 2017-06-08 | 乐视控股(北京)有限公司 | Video data detection method and device |
CN107678934A (en) * | 2017-10-13 | 2018-02-09 | 北京小米移动软件有限公司 | Interim card index selection method and device |
CN107704332A (en) * | 2017-09-28 | 2018-02-16 | 努比亚技术有限公司 | Freeze screen solution method, mobile terminal and computer-readable recording medium |
CN109005457A (en) * | 2018-09-19 | 2018-12-14 | 腾讯科技(北京)有限公司 | Blank screen detection method, 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 |
WO2019072169A1 (en) * | 2017-10-09 | 2019-04-18 | 华为技术有限公司 | Detection method and device for preventing accidental touch and terminal |
CN109901955A (en) * | 2017-12-07 | 2019-06-18 | 上海擎感智能科技有限公司 | A kind of method and system for testing power-on screen state |
-
2019
- 2019-07-24 CN CN201910671299.6A patent/CN110457177B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090179909A1 (en) * | 2008-01-11 | 2009-07-16 | Zoran Corporation | Screen saver trigger using partial still picture detection |
WO2017092343A1 (en) * | 2015-12-04 | 2017-06-08 | 乐视控股(北京)有限公司 | Video data detection method and device |
CN107704332A (en) * | 2017-09-28 | 2018-02-16 | 努比亚技术有限公司 | Freeze screen solution method, mobile terminal and computer-readable recording medium |
WO2019072169A1 (en) * | 2017-10-09 | 2019-04-18 | 华为技术有限公司 | Detection method and device for preventing accidental touch and terminal |
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 |
CN109005457A (en) * | 2018-09-19 | 2018-12-14 | 腾讯科技(北京)有限公司 | Blank screen detection method, 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 |
Non-Patent Citations (1)
Title |
---|
赵玉兰;苑全德;孟祥萍;: "离散分数阶随机变换与加权直方图交叉置乱的双图像加密算法", 应用光学, no. 06 * |
Also Published As
Publication number | Publication date |
---|---|
CN110457177B (en) | 2024-01-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10853979B2 (en) | Electronic device and method for displaying screen thereof | |
US20190065994A1 (en) | Deep learning-based image recognition method and apparatus | |
EP3309667A1 (en) | Electronic device having plurality of fingerprint sensing modes and method for controlling the same | |
US20170104861A1 (en) | Electronic device monitoring method and apparatus | |
CN109086606B (en) | Program vulnerability mining method, device, terminal and storage medium | |
CN109684008A (en) | Card rendering method, device, terminal and computer readable storage medium | |
US9990912B2 (en) | Electronic device and method for reproducing sound in the electronic device | |
CN113268416A (en) | Application program testing method and device, storage medium and terminal | |
CN104809054A (en) | Method and system for realizing program testing | |
EP4264461A1 (en) | Systems and methods for visual anomaly detection in a multi-display system | |
CN113495843B (en) | Method and apparatus for testing play-up performance of video player | |
CN109240928A (en) | Test method, device, equipment and storage medium | |
CN110457177A (en) | Be switched on method for detecting abnormality and device, electronic equipment, storage medium | |
US20220171510A1 (en) | Automated testing of mobile devices using behavioral learning | |
CN109522174A (en) | Control adb enabled method, apparatus, terminal and storage medium | |
CN115600213A (en) | Vulnerability management method, device, medium and equipment based on application program | |
US11822452B2 (en) | Dynamic remote collection of supplemental diagnostic data and triggering of client actions for client software application | |
CN112256354B (en) | Application starting method and device, storage medium and electronic equipment | |
CN115357493A (en) | Test method, test device, electronic equipment and storage medium | |
WO2017107173A1 (en) | Technologies for automated application testing coverage and results evaluation | |
CN107229465B (en) | Method and device for waking up head-mounted display of VR (virtual reality) host and VR host | |
CN111045876A (en) | Splash screen detection method and device, storage medium and electronic equipment | |
CN111858317A (en) | Method and device for detecting memory leakage | |
CN114610003B (en) | Vehicle diagnosis method, device, equipment and medium | |
CN111045899B (en) | Method for displaying BIOS information in early stage of computer system startup self-check |
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 |