CN108762981A - Blank screen processing method and relevant apparatus - Google Patents

Blank screen processing method and relevant apparatus Download PDF

Info

Publication number
CN108762981A
CN108762981A CN201810395149.2A CN201810395149A CN108762981A CN 108762981 A CN108762981 A CN 108762981A CN 201810395149 A CN201810395149 A CN 201810395149A CN 108762981 A CN108762981 A CN 108762981A
Authority
CN
China
Prior art keywords
thread
detection task
mobile terminal
task
detection
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
Application number
CN201810395149.2A
Other languages
Chinese (zh)
Other versions
CN108762981B (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 CN201810395149.2A priority Critical patent/CN108762981B/en
Publication of CN108762981A publication Critical patent/CN108762981A/en
Application granted granted Critical
Publication of CN108762981B publication Critical patent/CN108762981B/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/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Telephone Function (AREA)

Abstract

This application discloses a kind of blank screen processing method and relevant apparatus, are applied to mobile terminal, including:When mobile terminal detects pressing operation of the user for the power key of mobile terminal, first turn on preset Detection task, the trigger condition that mobile terminal cancels Detection task includes that display screen wake-up cancellation and time-out are cancelled, secondly, when detecting that Detection task is cancelled, the trigger condition for cancelling Detection task is obtained, finally, when it is that time-out is cancelled to detect trigger condition, reboot operation is executed.The application is conducive to improve the intelligent and flexibility of the abnormal blank screen situation of mobile terminal processing.

Description

Blank screen processing method and relevant apparatus
Technical field
This application involves electronic technology field more particularly to a kind of blank screen processing method and relevant apparatus.
Background technology
It is universal with the rapid development of intelligent terminal (such as smart mobile phone) technology, and increasingly, become user Indispensable electronic product in daily life.In actual use, user can encounter by mobile phone power key powerkey but Do not work screen the case where, since user in such cases can not see the touch-control feedback of mobile phone, mobile phone can be mistakenly considered be broken to become brick Head, user experience are poor.
Invention content
A kind of blank screen processing method of the embodiment of the present application offer and relevant apparatus are conducive to improve mobile terminal processing exception The intelligent and flexibility of blank screen situation.
In a first aspect, the embodiment of the present application provides a kind of blank screen processing method, it is applied to mobile terminal, the method packet It includes:
When detecting that user is directed to the screen wake operation of the mobile terminal, preset Detection task, the shifting are opened The trigger condition that dynamic terminal cancels the Detection task includes that display screen wakes up cancellation and time-out cancellation;
When detecting that the Detection task is cancelled, the trigger condition for cancelling the Detection task is obtained;
When it is that the time-out is cancelled to detect the trigger condition, reboot operation is executed.
Second aspect, the embodiment of the present application provide a kind of blank screen processing unit, are applied to mobile terminal, the blank screen processing Device includes opening unit, acquiring unit and execution unit, wherein
The opening unit when for detecting that user is directed to the screen wake operation of the mobile terminal, is opened default Detection task, the trigger condition that the mobile terminal cancels the Detection task include display screen wake up cancel and time-out take Disappear;
The acquiring unit, for when detecting that the Detection task is cancelled, obtaining and cancelling the Detection task Trigger condition;
The execution unit, for when it is that the time-out is cancelled to detect the trigger condition, executing reboot operation.
The third aspect, the embodiment of the present application provide a kind of mobile terminal, including processor, memory, communication interface and One or more programs, wherein said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned It manages device to execute, above procedure includes the instruction for executing the step in the embodiment of the present application first aspect either method.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, wherein above computer is readable Computer program of the storage medium storage for electronic data interchange, wherein above computer program makes computer execute such as Step some or all of described in the embodiment of the present application first aspect or second aspect either method.
As can be seen that in the embodiment of the present application, mobile terminal detect user for mobile terminal power key by When press operation, preset Detection task is first turned on, the trigger condition that mobile terminal cancels Detection task includes that display screen wakes up Cancel and time-out is cancelled, secondly, when detecting that Detection task is cancelled, obtains the trigger condition for cancelling Detection task, finally, When it is that time-out is cancelled to detect trigger condition, reboot operation is executed.It is put out under screen state by voltage source as it can be seen that mobile terminal is directed to The scene can be recognized accurately by enabling preset Detection task, to carry out in time in the scene of button exception blank screen Restart the intelligent and flexibility for being conducive to improve the abnormal blank screen situation of mobile terminal processing to eliminate the abnormal conditions.
Description of the drawings
In order to illustrate more clearly of the technical solution in the embodiment of the present application or background technology, the application will be implemented below Attached drawing illustrates needed in example or background technology.
Figure 1A is a kind of schematic diagram of the program running space of smart mobile phone;
Figure 1B is a kind of system architecture diagram of Android system;
Fig. 2 is a kind of flow diagram of blank screen processing method provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another blank screen processing method disclosed in the embodiment of the present application;
Fig. 4 is the flow diagram of another blank screen processing method disclosed in the embodiment of the present application;
Fig. 5 is a kind of structural schematic diagram of mobile terminal disclosed in the embodiment of the present application;
Fig. 6 is a kind of functional unit composition block diagram of mobile terminal disclosed in the embodiment of the present application;
Fig. 7 is a kind of structural schematic diagram of smart mobile phone disclosed in the embodiment of the present application.
Specific implementation
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, technical solutions in the embodiments of the present application are clearly and completely described, it is clear that described embodiment is only The embodiment of the application part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people The every other embodiment that member is obtained without making creative work should all belong to the model of the application protection It encloses.
It is described in detail separately below.
Term " first ", " second ", " third " in the description and claims of this application and the attached drawing and " Four " etc. be for distinguishing different objects, rather than for describing particular order.In addition, term " comprising " and " having " and it Any deformation, it is intended that cover and non-exclusive include.Such as it contains the process of series of steps or unit, method, be The step of system, product or equipment are not limited to list or unit, but further include the steps that optionally not listing or list Member, or further include optionally for the intrinsic other steps of these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
As shown in Figure 1A, the mobile terminals such as smart mobile phone are typically provided with program running space at present, and program operation is empty Between include user's space and operating system space, wherein user's space operation there are one or multiple application programs, this or more A application program is the third party application of mobile terminal installation, and the abnormal blank screen detection algorithm involved by the application is just run In user's space, operating system space motion has the operating system of mobile terminal.
The Mobile operating system iOS that the mobile terminal can specifically run Android android system, Apple Inc. develops Deng not doing unique restriction herein.As shown in Figure 1B, by taking the running of mobile terminal has android system as an example, corresponding user Space includes the application layer (Applications) in the android system, and operating system space may include the Android systems Application framework layer (Application Framework) in system, system operation library layer (including system operation library layer Android Runtime when Libraries and Android are run), Linux inner core (Linux Kernel).Wherein, it applies It include all kinds of application programs with user's direct interaction on layer, or the service routine for running on backstage write by Java language. For example, the program for the common basic function realized on smart mobile phone, such as short message service (Short Messaging Service, SMS) short message, dialing, Photo Browser, calendar, game, map, WWW (World Wide Web, Web) programs such as browser and the other applications of developer's exploitation.Application framework layer provides exploitation Android A series of class libraries needed for application program can be used in reusing component, can also realize personalized extension by inheriting.System Runtime Library layer is the support of application framework, and service is provided for the various components in android system.System operation library layer by System class libraries and Android are constituted when running.Include core library and Dalvik virtual machine two parts when Android is run.Linux Inner nuclear layer is for realizing hardware device drivers, process and memory management, network protocol stack, power management, the cores such as wireless communication Function.
Mobile terminal may include various handheld device, mobile unit, wearable device (example with wireless communication function Such as smartwatch, Intelligent bracelet, pedometer), computing device or other processing equipments for being connected to radio modem, with And various forms of user equipmenies (User Equipment, UE), mobile station (Mobile Station, MS), terminal device (terminal device) etc..For convenience of description, apparatus mentioned above is referred to as mobile terminal.
It describes in detail below to the embodiment of the present application.
A kind of flow diagram of blank screen processing method is provided referring to Fig. 2, Fig. 2 is the embodiment of the present application, is applied to Mobile terminal, this blank screen processing method include:
S201 opens preset inspection when mobile terminal detects that user is directed to the screen wake operation of the mobile terminal Survey task, the trigger condition that the mobile terminal cancels the Detection task include that display screen wakes up cancellation and time-out cancellation;
Wherein, the mobile terminal, which is initially in, puts out screen state.
Wherein, the screen wake operation includes the pressing operation for the power button of the mobile terminal, Huo Zhezhen The touch control operation etc. of fingerprint case to the touch control operation of the Home key of the mobile terminal, or for mobile terminal, herein Unique restriction is not done.
S202, the mobile terminal obtain when detecting that the Detection task is cancelled and cancel the Detection task Trigger condition;
S203, the mobile terminal execute reboot operation when it is that the time-out is cancelled to detect the trigger condition.
As can be seen that in the embodiment of the present application, mobile terminal detects pressing of the user for the power key of mobile terminal When operation, preset Detection task is first turned on, the trigger condition that mobile terminal cancels Detection task includes that display screen wake-up takes Disappear and time-out is cancelled, secondly, when detecting that Detection task is cancelled, obtains the trigger condition for cancelling Detection task, finally, When detecting that trigger condition is that time-out is cancelled, reboot operation is executed.As it can be seen that mobile terminal for put out under screen state by voltage source by The scene can be recognized accurately by enabling preset Detection task, to carry out weight in time in the scene of key exception blank screen Open the intelligent and flexibility for being conducive to improve the abnormal blank screen situation of mobile terminal processing to eliminate the abnormal conditions.
In a possible example, the mobile terminal opens preset Detection task, including:The mobile terminal is true Subject thread pond associated by the fixed preset Detection task;Obtain the type in the subject thread pond;According to the type The thread being in active state in the subject thread pond and the Detection task are adjusted to start the Detection task.
Wherein, since Detection task will be executed by thread, and mobile terminal includes multiclass thread pool, different types of The thread management strategy of thread pool is different, so carrying out differentiation setting according to the type of thread pool can be more accurate steady The fixed startup Detection task.
As it can be seen that in this example, mobile terminal can be based on the type in the subject thread pond associated by Detection task, for this Detection task carries out exclusive task start process setting, is conducive to more stablize, accurately execute testing mechanism, improves blank screen Treatment Stability and efficiency.
In a possible example, the type of the thread pool is fixed thread pool FixedThreadPool;The shifting Dynamic terminal adjusts the thread being in active state in the subject thread pond and the Detection task to start according to the type The Detection task, including:The mobile terminal creates the detection thread for the Detection task;Obtain the subject thread The enabling queue for the thread being in active state in pond;A kernel thread is filtered out from the enabling queue, described in pause Kernel thread;The enabling queue is added to start the Detection task in the detection thread;In the startup queue After any one thread is cancelled, restore to enable the kernel thread being suspended.
As it can be seen that in this example, for FixedThreadPool, characteristic of the mobile terminal based on the thread pool appoints detection The enabling queue of kernel thread is added to start the Detection task in business, improves stability and real-time.
In a possible example, the type of the thread pool is single thread pond SingleThreadPool;The shifting Dynamic terminal adjusts the thread being in active state in the subject thread pond and the Detection task to start according to the type The Detection task, including:The task queue of kernel thread in SingleThreadPool described in the acquisition for mobile terminal; The Detection task is added to the position being performed at first in the task queue to start the Detection task.
As it can be seen that in this example, for SingleThreadPool, characteristic of the mobile terminal based on the thread pool will detect Task is added directly to the task queue of kernel thread to start the Detection task, improves stability and real-time.
In a possible example, the type of the thread pool is caching thread pond CachedThreadPool;It is described Mobile terminal adjusts the thread being in active state in the subject thread pond and the Detection task to open according to the type The Detection task is moved, including:The mobile terminal detects that the thread in the CachedThreadPool is in activity State creates a detection thread for the Detection task, and enables the detection thread to start the Detection task;Detection There is free idle thread to the thread in the CachedThreadPool, then chooses an idle thread and appoint for starting the detection Business.
As it can be seen that in this example, for CachedThreadPool, characteristic of the mobile terminal based on the thread pool, for detection Task creation detects thread to start the Detection task, or chooses an idle thread and be used to start the Detection task, Improve stability and flexibility.
In a possible example, the type of the thread pool is plan thread pool ScheduledThreadPool;Institute State mobile terminal according to the type adjust the thread being in active state in the subject thread pond and the Detection task with Start the Detection task, including:The mobile terminal detects the core-wire number of passes in the ScheduledThreadPool When being in active state, a non-core thread is created for starting the Detection task;It detects described Core-wire number of passes in ScheduledThreadPool is started there are when idle cores thread by the idle cores thread The Detection task.
As it can be seen that in this example, for ScheduledThreadPool, characteristic of the mobile terminal based on the thread pool, for inspection The non-core thread of task creation is surveyed to start the Detection task, improves stability and real-time.
In a possible example, before the execution reboot operation, the method further includes:The mobile terminal shakes It moves to prompt mobile terminal described in user restarting;With/after,
The mobile terminal lights breath light to prompt mobile terminal described in user restarting;And/or
The mobile terminal plays preset audio to prompt mobile terminal described in user restarting by loud speaker.
As it can be seen that in this example, by actively prompting user, user can be avoided accidentally to be grasped because misreading the state of mobile terminal Make mobile terminal, improves stability.
In a possible example, the method further includes:The mobile terminal is detecting that the trigger condition is When the display screen wakes up cancellation, notice thread manager initializes the timer of the detection thread.
As it can be seen that in this example, the case where cancelling Detection task is waken up for normal screen, mobile terminal initializes meter in time Number device, improves timing precision.
It is consistent with the embodiment shown in Fig. 2, referring to Fig. 3, Fig. 3 is a kind of blank screen provided by the embodiments of the present application The flow diagram of processing method is applied to mobile terminal.As shown, this blank screen processing method includes:
S301 when mobile terminal detects that user is directed to the screen wake operation of the mobile terminal, is determined described default Detection task associated by subject thread pond, the trigger condition that the mobile terminal cancels the Detection task includes display screen It wakes up to cancel and cancel with time-out;
S302, the type in subject thread pond described in the acquisition for mobile terminal;
S303, the mobile terminal adjusted according to the type thread that is in active state in the subject thread pond and The Detection task is to start the Detection task.
S304, the mobile terminal obtain when detecting that the Detection task is cancelled and cancel the Detection task Trigger condition;
S305, the mobile terminal are vibrated when it is that the time-out is cancelled to detect the trigger condition to prompt user The mobile terminal is being restarted.
S306, the mobile terminal execution reboot operation.
As can be seen that in the embodiment of the present application, mobile terminal detects pressing of the user for the power key of mobile terminal When operation, preset Detection task is first turned on, the trigger condition that mobile terminal cancels Detection task includes that display screen wake-up takes Disappear and time-out is cancelled, secondly, when detecting that Detection task is cancelled, obtains the trigger condition for cancelling Detection task, finally, When detecting that trigger condition is that time-out is cancelled, reboot operation is executed.As it can be seen that mobile terminal for put out under screen state by voltage source by The scene can be recognized accurately by enabling preset Detection task, to carry out weight in time in the scene of key exception blank screen Open the intelligent and flexibility for being conducive to improve the abnormal blank screen situation of mobile terminal processing to eliminate the abnormal conditions.
In addition, mobile terminal can be based on the type in the subject thread pond associated by Detection task, for the Detection task Exclusive task start process setting is carried out, is conducive to more stablize, accurately execute testing mechanism, blank screen processing is improved and stablizes Property and efficiency.
It is consistent with the embodiment shown in Fig. 2, referring to Fig. 4, Fig. 4 is a kind of blank screen provided by the embodiments of the present application The flow diagram of processing method is applied to mobile terminal.As shown, this blank screen processing method includes:
S401, when the mobile terminal detects that user is directed to the screen wake operation of the mobile terminal, described in determination Subject thread pond associated by preset Detection task;
The type of S402, the type in subject thread pond described in the acquisition for mobile terminal, the thread pool are fixed thread Pond FixedThreadPool;
S403, the mobile terminal create the detection thread for the Detection task;
S404, the enabling queue for the thread being in active state in subject thread pond described in the acquisition for mobile terminal;
S405, the mobile terminal filter out a kernel thread from the enabling queue, suspend the kernel thread;
The enabling queue is added to start the Detection task in the detection thread by S406, the mobile terminal;
S407 restores enabling and is suspended after any one thread of the mobile terminal in the startup queue is cancelled The kernel thread.
S408, the mobile terminal obtain when detecting that the Detection task is cancelled and cancel the Detection task Trigger condition;
S409, the mobile terminal execute reboot operation when it is that the time-out is cancelled to detect the trigger condition.
S410, the mobile terminal light breath light to prompt mobile terminal described in user restarting.
S411, the mobile terminal execution reboot operation.
The embodiment of the present application is can be seen that, mobile terminal detects pressing behaviour of the user for the power key of mobile terminal When making, preset Detection task is first turned on, the trigger condition that mobile terminal cancels Detection task includes that display screen wakes up cancellation Cancel with time-out, secondly, when detecting that Detection task is cancelled, the trigger condition for obtaining cancellation Detection task is finally being examined Measure trigger condition be time-out cancel when, execute reboot operation.As it can be seen that mobile terminal is directed to put out presses power button under screen state The scene can be recognized accurately by enabling preset Detection task, to be restarted in time in the scene of abnormal blank screen To eliminate the abnormal conditions, be conducive to the intelligent and flexibility for improving the abnormal blank screen situation of mobile terminal processing.
In addition, mobile terminal can be based on the type in the subject thread pond associated by Detection task, for the Detection task Exclusive task start process setting is carried out, is conducive to more stablize, accurately execute testing mechanism, blank screen processing is improved and stablizes Property and efficiency.
In addition, being directed to FixedThreadPool, core is added in Detection task by characteristic of the mobile terminal based on the thread pool The enabling queue of heart thread improves stability and real-time to start the Detection task.
In addition, by actively prompting user, user's maloperation movement due to misreading the state of mobile terminal can be avoided whole Stability is improved at end.
In addition, waking up the case where cancelling Detection task for normal screen, the timely initialization counter of mobile terminal improves Timing precision.
It is consistent with described Fig. 2, Fig. 3, embodiment shown in Fig. 4, referring to Fig. 5, Fig. 5 is provided by the embodiments of the present application A kind of structural schematic diagram of mobile terminal, the running of mobile terminal there are one or multiple application programs and operating system, such as figure institute Show, which includes processor, memory, communication interface and one or more programs, wherein one or more of Program is different from one or more of application programs, and one or more of programs are stored in the memory, and And be configured to be executed by the processor, described program includes the instruction for executing following steps;
When detecting that user is directed to the screen wake operation of the mobile terminal, preset Detection task, the shifting are opened The trigger condition that dynamic terminal cancels the Detection task includes that display screen wakes up cancellation and time-out cancellation;
When detecting that the Detection task is cancelled, the trigger condition for cancelling the Detection task is obtained;
When it is that the time-out is cancelled to detect the trigger condition, reboot operation is executed.
As can be seen that in the embodiment of the present application, mobile terminal detects pressing of the user for the power key of mobile terminal When operation, preset Detection task is first turned on, the trigger condition that mobile terminal cancels Detection task includes that display screen wake-up takes Disappear and time-out is cancelled, secondly, when detecting that Detection task is cancelled, obtains the trigger condition for cancelling Detection task, finally, When detecting that trigger condition is that time-out is cancelled, reboot operation is executed.As it can be seen that mobile terminal for put out under screen state by voltage source by The scene can be recognized accurately by enabling preset Detection task, to carry out weight in time in the scene of key exception blank screen Open the intelligent and flexibility for being conducive to improve the abnormal blank screen situation of mobile terminal processing to eliminate the abnormal conditions.
In a possible example, in terms of the preset Detection task of unlatching, the instruction in described program is specific For performing the following operations:Determine the subject thread pond associated by the preset Detection task;And obtain the score The type of Cheng Chi;And the thread being in active state in the subject thread pond and the detection times are adjusted according to the type Business is to start the Detection task.
In a possible example, the type of the thread pool is fixed thread pool FixedThreadPool;Described The thread being in active state in the subject thread pond and the Detection task are adjusted to start the inspection according to the type In terms of survey task, the instruction in described program is specifically used for executing following operation:Create the detection line for the Detection task Journey;And the enabling queue for obtaining the thread being in active state in the subject thread pond;And for being opened from described With a kernel thread is filtered out in queue, suspend the kernel thread;And for will be opened described in detection thread addition With queue to start the Detection task;And after any one thread in the startup queue is cancelled, restore to open With the kernel thread being suspended.
In a possible example, the type of the thread pool is single thread pond SingleThreadPool;Described The thread being in active state in the subject thread pond and the Detection task are adjusted to start the inspection according to the type In terms of survey task, the instruction in described program is specifically used for executing following operation:It obtains in the SingleThreadPool The task queue of kernel thread;And for the Detection task to be added to the position being performed at first in the task queue To start the Detection task.
In a possible example, the type of the thread pool is caching thread pond CachedThreadPool;Institute State that adjust the thread being in active state in the subject thread pond and the Detection task according to the type described to start In terms of Detection task, the instruction in described program is specifically used for executing following operation:Detect the CachedThreadPool In thread be in active state, create a detection thread for the Detection task, and enable the detection thread to open Move the Detection task;And for detecting that the thread in the CachedThreadPool is free idle thread, then choose one A idle thread is for starting the Detection task.
In a possible example, the type of the thread pool is plan thread pool ScheduledThreadPool;? It is described that the thread being in active state in the subject thread pond and the Detection task are adjusted to start according to the type In terms of stating Detection task, the instruction in described program is specifically used for executing following operation:It detects described When core-wire number of passes in ScheduledThreadPool is in active state, a non-core thread is created for starting The Detection task;And there are idle cores for detecting the core-wire number of passes in the ScheduledThreadPool When thread, the Detection task is started by the idle cores thread.
In a possible example, described program further includes instructions for performing the following operations:Weight is executed described Before opening operation, vibrate to prompt mobile terminal described in user restarting;With/after,
Breath light is lighted to prompt mobile terminal described in user restarting;And/or
Preset audio is played to prompt mobile terminal described in user restarting by loud speaker.
In a possible example, described program further includes instructions for performing the following operations:It is described detecting When trigger condition is that the display screen wakes up cancellation, notice thread manager initializes the timer of the detection thread.
Above-described embodiment is mainly described the scheme of the embodiment of the present application from the angle of method side implementation procedure.It can With understanding, for mobile terminal in order to realize above-mentioned function, it comprises execute the corresponding hardware configuration of each function and/or soft Part module.Those skilled in the art should be readily appreciated that, described in conjunction with the examples disclosed in the embodiments of the present disclosure Unit and algorithm steps, the application can be realized with the combining form of hardware or hardware and computer software.Some function is studied carefully Unexpectedly it is executed in a manner of hardware or computer software driving hardware, depends on specific application and the design constraint of technical solution Condition.Professional technician specifically can realize described function to each using distinct methods, but this It realizes it is not considered that exceeding scope of the present application.
The embodiment of the present application can carry out mobile terminal according to the method example the division of functional unit, for example, can Each functional unit is divided with each function of correspondence, two or more functions can also be integrated in a processing unit In.The form that hardware had both may be used in the integrated unit is realized, can also be realized in the form of SFU software functional unit.It needs It is noted that be schematical, only a kind of division of logic function to the division of unit in the embodiment of the present application, it is practical real It is current that there may be another division manner.
The following is an embodiment of the apparatus of the present invention, and apparatus of the present invention embodiment is realized for executing the method for the present invention embodiment Method.As shown in fig. 6, the embodiment of the present application provides a kind of blank screen processing unit, it is applied to mobile terminal, blank screen processing Device may include opening unit 601, acquiring unit 602 and execution unit 603, wherein
The opening unit 601 when for detecting that user is directed to the screen wake operation of the mobile terminal, is opened pre- If Detection task, the trigger condition that the mobile terminal cancels the Detection task include display screen wake up cancel and time-out take Disappear;
The acquiring unit 602, for when detecting that the Detection task is cancelled, obtaining and cancelling the Detection task Trigger condition;
The execution unit 603, for when it is that the time-out is cancelled to detect the trigger condition, behaviour to be restarted in execution Make.
As can be seen that in the embodiment of the present application, mobile terminal detects pressing of the user for the power key of mobile terminal When operation, preset Detection task is first turned on, the trigger condition that mobile terminal cancels Detection task includes that display screen wake-up takes Disappear and time-out is cancelled, secondly, when detecting that Detection task is cancelled, obtains the trigger condition for cancelling Detection task, finally, When detecting that trigger condition is that time-out is cancelled, reboot operation is executed.As it can be seen that mobile terminal for put out under screen state by voltage source by The scene can be recognized accurately by enabling preset Detection task, to carry out weight in time in the scene of key exception blank screen Open the intelligent and flexibility for being conducive to improve the abnormal blank screen situation of mobile terminal processing to eliminate the abnormal conditions.
In a possible example, in terms of the preset Detection task of unlatching, the opening unit 601 is specifically used In:Determine the subject thread pond associated by the preset Detection task;And obtain the type in the subject thread pond;And The thread being in active state in the subject thread pond and the Detection task are adjusted to start the inspection according to the type Survey task.
In a possible example, the type of the thread pool is fixed thread pool FixedThreadPool;Described The thread being in active state in the subject thread pond and the Detection task are adjusted to start the inspection according to the type In terms of survey task, the opening unit 601 is specifically used for:Create the detection thread for the Detection task;And for obtaining Take the enabling queue for the thread being in active state in the subject thread pond;And for being filtered out from the enabling queue One kernel thread, suspends the kernel thread;And for the enabling queue to be added to start in the detection thread State Detection task;And after any one thread in the startup queue is cancelled, recovery enabling is suspended described Kernel thread.
In a possible example, the type of the thread pool is single thread pond SingleThreadPool;Described The thread being in active state in the subject thread pond and the Detection task are adjusted to start the inspection according to the type In terms of survey task, the opening unit 601 is specifically used for:Obtain the task of the kernel thread in the SingleThreadPool Queue;And for the Detection task to be added to the position being performed at first in the task queue to start the detection Task.
In a possible example, the type of the thread pool is caching thread pond CachedThreadPool;Institute State that adjust the thread being in active state in the subject thread pond and the Detection task according to the type described to start In terms of Detection task, the opening unit 601 is specifically used for:Detect that the thread in the CachedThreadPool is in Active state creates a detection thread for the Detection task, and enables the detection thread to start the Detection task; And for detecting that the thread in the CachedThreadPool is free idle thread, then an idle thread is chosen for opening Move the Detection task.
In a possible example, the type of the thread pool is plan thread pool ScheduledThreadPool;? It is described that the thread being in active state in the subject thread pond and the Detection task are adjusted to start according to the type In terms of stating Detection task, the opening unit 601 is specifically used for:Detect the core in the ScheduledThreadPool When Thread Count is in active state, a non-core thread is created for starting the Detection task;And for detecting Core-wire number of passes in the ScheduledThreadPool passes through the idle cores thread there are when idle cores thread Start the Detection task.
In a possible example, the blank screen processing unit further includes that the first prompt unit and/or the second prompt are single Member and/or third prompt unit, wherein
First prompt unit before executing reboot operation for the execution unit 603, is vibrated to prompt user institute Mobile terminal is stated to restart;
Second prompt unit, for lighting breath light to prompt mobile terminal described in user restarting;
The third prompt unit, for playing preset audio by loud speaker to prompt mobile terminal described in user Restart.
In a possible example, the blank screen processing unit further includes notification unit, wherein
The notification unit, for when it is that the display screen wakes up cancellation to detect the trigger condition, notifying thread Manager initializes the timer of the detection thread.
Wherein, the opening unit 601 and the execution unit 603 can be processors, and the acquiring unit 602 can be with It is receiver.
Referring to Fig. 7, Fig. 7 is a kind of structural schematic diagram of mobile terminal provided by the present application, mobile terminal 700 includes: Shell 710, circuit board 720, battery 730, cover board 740, sensor 750, transceiver 760, display screen 770 and control sensing The controller 780 of device 750, transceiver 760 and display screen 770;Cover board 740 is arranged on shell 710, sensor 750, transceiver 760 and controller 780 be arranged on circuit board 720, display screen 770 connect with controller 780, wherein sensor 750 including add Velocity sensor, gyroscope, timer etc..
Wherein, it when mobile terminal detects pressing operation of the user for the power key of mobile terminal, first turns on default Detection task, mobile terminal cancel Detection task trigger condition include display screen wake up cancel and time-out cancel, secondly, When detecting that Detection task is cancelled, the trigger condition for cancelling Detection task is obtained, finally, is detecting that trigger condition is time-out When cancellation, reboot operation is executed.
Wherein, display screen 770 includes touch screen and display screen, and display screen includes organic light-emitting diode (OLED) display screen OLED.
Wherein, controller 780 may include processor and memory, which is the control centre of mobile terminal, profit With the various pieces of various interfaces and the entire mobile terminal of connection, by running or executing the software being stored in memory Program and/or module, and the data being stored in memory are called, the various functions and processing data of mobile terminal are executed, To carry out whole monitoring to mobile terminal.Optionally, processor can integrate application processor and modem processor, In, the main processing operation system of application processor, user interface and application program etc., modem processor are mainly handled wirelessly Communication.It is understood that the modem processor can not also be integrated into processor.
Wherein, memory can be used for storing software program and module, and processor is stored in the soft of memory by operation Part program and module, to execute various function application and the data processing of mobile terminal.Memory can include mainly depositing Store up program area and storage data field, wherein storing program area can storage program area, the application program needed at least one function Deng;Storage data field can be stored uses created data etc. according to mobile terminal.In addition, memory may include high speed with Machine access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or its His volatile solid-state part.
The embodiment of the present application also provides a kind of computer storage media, wherein computer storage media storage is for electricity The computer program that subdata exchanges, the computer program make computer execute any as described in above method embodiment Some or all of method step, above computer include mobile terminal.
The embodiment of the present application also provides a kind of computer program product, and above computer program product includes storing calculating The non-transient computer readable storage medium of machine program, above computer program are operable to that computer is made to execute such as above-mentioned side Some or all of either method described in method embodiment step.The computer program product can be a software installation Packet, above computer includes mobile terminal.
It should be noted that for each method embodiment above-mentioned, for simple description, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art should also know It knows, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, for example, said units division, it is only a kind of Division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit, Can be electrical or other forms.
The above-mentioned unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer-readable access to memory.Based on this understanding, the technical solution of the application substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment above method of the application Step.And memory above-mentioned includes:USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory The various media that can store program code such as (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer-readable memory, memory May include:Flash disk, read-only memory (English:Read-Only Memory, referred to as:ROM), random access device (English: Random Access Memory, referred to as:RAM), disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; Meanwhile for those of ordinary skill in the art, according to the thought of the application, can in specific embodiments and applications There is change place, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (11)

1. a kind of blank screen processing method, which is characterized in that it is applied to mobile terminal, the method includes:
When detecting that user is directed to the screen wake operation of the mobile terminal, preset Detection task is opened, it is described mobile whole The trigger condition that the Detection task is cancelled at end includes that display screen wake-up cancellation and time-out are cancelled;
When detecting that the Detection task is cancelled, the trigger condition for cancelling the Detection task is obtained;
When it is that the time-out is cancelled to detect the trigger condition, reboot operation is executed.
2. according to the method described in claim 1, it is characterized in that, described open preset Detection task, including:
Determine the subject thread pond associated by the preset Detection task;
Obtain the type in the subject thread pond;
The thread being in active state in the subject thread pond and the Detection task are adjusted to start according to the type State Detection task.
3. according to the method described in claim 2, it is characterized in that, the type of the thread pool is fixed thread pool FixedThreadPool;It is described that the thread being in active state in the subject thread pond and described is adjusted according to the type Detection task to start the Detection task, including:
Create the detection thread for the Detection task;
Obtain the enabling queue for the thread being in active state in the subject thread pond;
A kernel thread is filtered out from the enabling queue, suspends the kernel thread;
The enabling queue is added to start the Detection task in the detection thread;
After any one thread in the startup queue is cancelled, restore to enable the kernel thread being suspended.
4. according to the method described in claim 2, it is characterized in that, the type of the thread pool is single thread pond SingleThreadPool;It is described that the thread being in active state in the subject thread pond and described is adjusted according to the type Detection task to start the Detection task, including:
Obtain the task queue of the kernel thread in the SingleThreadPool;
The Detection task is added to the position being performed at first in the task queue to start the Detection task.
5. according to the method described in claim 2, it is characterized in that, the type of the thread pool is caching thread pond CachedThreadPool;It is described that the thread being in active state in the subject thread pond and described is adjusted according to the type Detection task to start the Detection task, including:
It detects that the thread in the CachedThreadPool is in active state, an inspection is created for the Detection task Survey line journey, and the detection thread is enabled to start the Detection task;
It detects that the thread in the CachedThreadPool is free idle thread, then chooses an idle thread for starting institute State Detection task.
6. according to the method described in claim 2, it is characterized in that, the type of the thread pool is plan thread pool ScheduledThreadPool;It is described adjusted according to the type thread that is in active state in the subject thread pond and The Detection task to start the Detection task, including:
When detecting that the core-wire number of passes in the ScheduledThreadPool is in active state, a non-core is created Heart thread is for starting the Detection task;
Detect that the core-wire number of passes in the ScheduledThreadPool there are when idle cores thread, passes through the sky Not busy kernel thread starts the Detection task.
7. according to claim 1-6 any one of them methods, which is characterized in that before the execution reboot operation, the side Method further includes:
Vibration is to prompt mobile terminal described in user restarting;With/after,
Breath light is lighted to prompt mobile terminal described in user restarting;And/or
Preset audio is played to prompt mobile terminal described in user restarting by loud speaker.
8. according to claim 1-7 any one of them methods, which is characterized in that the method further includes:
When it is that the display screen wakes up cancellation to detect the trigger condition, notice thread manager initializes the detection line The timer of journey.
9. a kind of blank screen processing unit, which is characterized in that be applied to mobile terminal, the blank screen processing unit includes opening list Member, acquiring unit and execution unit, wherein
The opening unit opens preset inspection when for detecting that user is directed to the screen wake operation of the mobile terminal Survey task, the trigger condition that the mobile terminal cancels the Detection task include that display screen wakes up cancellation and time-out cancellation;
The acquiring unit, for when detecting that the Detection task is cancelled, obtaining the triggering for cancelling the Detection task Condition;
The execution unit, for when it is that the time-out is cancelled to detect the trigger condition, executing reboot operation.
10. a kind of mobile terminal, which is characterized in that including processor, memory, communication interface, and one or more programs, One or more of programs are stored in the memory, and are configured to be executed by the processor, described program packet It includes for executing the instruction such as the step in claim 1-8 any one of them methods.
11. a kind of computer readable storage medium, which is characterized in that computer program of the storage for electronic data interchange, In, the computer program makes computer execute such as claim 1-8 any one of them methods.
CN201810395149.2A 2018-04-27 2018-04-27 Black screen processing method and related device Active CN108762981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810395149.2A CN108762981B (en) 2018-04-27 2018-04-27 Black screen processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810395149.2A CN108762981B (en) 2018-04-27 2018-04-27 Black screen processing method and related device

Publications (2)

Publication Number Publication Date
CN108762981A true CN108762981A (en) 2018-11-06
CN108762981B CN108762981B (en) 2022-03-15

Family

ID=64012442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810395149.2A Active CN108762981B (en) 2018-04-27 2018-04-27 Black screen processing method and related device

Country Status (1)

Country Link
CN (1) CN108762981B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413450A (en) * 2019-07-22 2019-11-05 河南翔宇医疗设备股份有限公司 A kind of method, device and equipment handling application crash

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201285A (en) * 2016-06-22 2016-12-07 北京小米移动软件有限公司 Prevent power key by the method and device of false touch, electronic equipment
CN106325989A (en) * 2016-08-17 2017-01-11 东软集团股份有限公司 Task execution method and device
CN106557250A (en) * 2015-09-30 2017-04-05 北京奇虎科技有限公司 A kind of blank screen treating method and apparatus in a mobile device
US20170212807A1 (en) * 2014-10-10 2017-07-27 Beijing Kingsoft Internet Security Software Co., Ltd. Method for detecting abnormal application and mobile terminal
CN107305416A (en) * 2016-04-21 2017-10-31 西安中兴新软件有限责任公司 A kind of control method and terminal
CN107707731A (en) * 2017-08-15 2018-02-16 深圳天珑无线科技有限公司 A kind of intelligent terminal and its control method and the device with store function
CN107885635A (en) * 2017-10-31 2018-04-06 努比亚技术有限公司 Blank screen detection method, mobile terminal and computer-readable recording medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170212807A1 (en) * 2014-10-10 2017-07-27 Beijing Kingsoft Internet Security Software Co., Ltd. Method for detecting abnormal application and mobile terminal
CN106557250A (en) * 2015-09-30 2017-04-05 北京奇虎科技有限公司 A kind of blank screen treating method and apparatus in a mobile device
CN107305416A (en) * 2016-04-21 2017-10-31 西安中兴新软件有限责任公司 A kind of control method and terminal
CN106201285A (en) * 2016-06-22 2016-12-07 北京小米移动软件有限公司 Prevent power key by the method and device of false touch, electronic equipment
CN106325989A (en) * 2016-08-17 2017-01-11 东软集团股份有限公司 Task execution method and device
CN107707731A (en) * 2017-08-15 2018-02-16 深圳天珑无线科技有限公司 A kind of intelligent terminal and its control method and the device with store function
CN107885635A (en) * 2017-10-31 2018-04-06 努比亚技术有限公司 Blank screen detection method, mobile terminal and computer-readable recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413450A (en) * 2019-07-22 2019-11-05 河南翔宇医疗设备股份有限公司 A kind of method, device and equipment handling application crash

Also Published As

Publication number Publication date
CN108762981B (en) 2022-03-15

Similar Documents

Publication Publication Date Title
US11561763B2 (en) Electronic device for processing multi-modal input, method for processing multi-modal input and server for processing multi-modal input
EP3454239B1 (en) Unlocking control methods and related products
CN109313570A (en) Memory management for application program load
CN110489215A (en) The treating method and apparatus of scene is waited in a kind of application program
JP7397861B2 (en) Stylus pen detection method, system and related equipment
CN103221899B (en) Tactile input device, microprocessor system and the method for control tactile input device
JP6616896B2 (en) Fingerprint recognition method and electronic device
CN103530520A (en) Method and terminal for obtaining data
CN107368400A (en) CPU monitoring methods, device, computer-readable recording medium and mobile terminal
CN108733797A (en) Document handling method and relevant apparatus
CN110147186A (en) A kind of control method and terminal device of application
CN109684107A (en) A kind of information prompting method and device
CN106407800A (en) A hook method and a terminal device
CN105912917A (en) Application starting method and mobile terminal
CN108762983A (en) Multi-medium data restoration methods and device
CN106919458B (en) Method and device for Hook target kernel function
CN108737655A (en) Image processing method and relevant apparatus
CN107832131B (en) Application program closing method and device, storage medium and electronic equipment
CN110058729A (en) Adjust the method and electronic equipment of the sensitivity of touch detection
CN108762981A (en) Blank screen processing method and relevant apparatus
CN103729283B (en) System log output method and device and terminal device
CN106708501B (en) Activity monitoring method and device
CN108833670A (en) Backlight adjusting method and relevant apparatus
CN109614042A (en) A kind of method and terminal device storing log information
CN106126360A (en) Cavity, address screen method and device

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