CN108076223A - Target switching method, device, terminal device and storage medium - Google Patents

Target switching method, device, terminal device and storage medium Download PDF

Info

Publication number
CN108076223A
CN108076223A CN201711339175.5A CN201711339175A CN108076223A CN 108076223 A CN108076223 A CN 108076223A CN 201711339175 A CN201711339175 A CN 201711339175A CN 108076223 A CN108076223 A CN 108076223A
Authority
CN
China
Prior art keywords
task
terminal device
parameter
state parameter
stack
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
CN201711339175.5A
Other languages
Chinese (zh)
Other versions
CN108076223B (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 CN201711339175.5A priority Critical patent/CN108076223B/en
Publication of CN108076223A publication Critical patent/CN108076223A/en
Application granted granted Critical
Publication of CN108076223B publication Critical patent/CN108076223B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72469User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the present application discloses a kind of target switching method, device, terminal device and storage medium, and this method includes:Pass through the state parameter of sensor acquisition terminal equipment;Judge whether the state parameter meets task switching condition, if it is, determining currently to redirect task according to the task order in the state parameter and task stack;The corresponding program interface of task that redirects is switched into foreground, terminal device background task switching efficiency is which thereby enhanced, reduces the power consumption of terminal device.

Description

Target switching method, device, terminal device and storage medium
Technical field
The invention relates to computer technology more particularly to a kind of target switching method, device, terminal device and deposit Storage media.
Background technology
With the raising of terminal device popularity, more and more user's using terminal equipment perform various work( Can be to meet self-demand, such as using terminal equipment reads word, viewing video, listens to music, plays game, due to terminal device Hardware continue to develop so that terminal device can be in the more programs of running background.
In the prior art, user can call multitask interface by clicking on the Menu key of terminal device, and reselection needs are cut The application changed, task switching mode inefficiency.
The content of the invention
The present invention provides a kind of target switching method, device, terminal device and storage medium, after improving terminal device Platform task switching efficiency reduces the power consumption of terminal device.
In a first aspect, the embodiment of the present application provides a kind of target switching method, including:
Pass through the state parameter of sensor acquisition terminal equipment;
Judge whether the state parameter meets task switching condition, if it is, according to the state parameter and appointing Task order in business stack determines currently to redirect task;
The corresponding program interface of task that redirects is switched into foreground.
Second aspect, the embodiment of the present application additionally provide a kind of task switching device, including:
Parameter collection module, for passing through the state parameter of sensor acquisition terminal equipment;
Task processing module, for judging whether the state parameter meets task switching condition, if it is, according to institute The task order in state parameter and task stack is stated to determine currently to redirect task;
Task handover module, for the corresponding program interface of task that redirects to be switched to foreground.
The third aspect, the embodiment of the present application additionally provide a kind of terminal device, including:Processor, memory and storage On a memory and the computer program that can run on a processor, the processor are realized such as when performing the computer program Target switching method described in the embodiment of the present application.
Fourth aspect, the embodiment of the present application additionally provide a kind of storage medium for including terminal device executable instruction, institute Terminal device executable instruction is stated when being performed as terminal device processor and cut for the task described in performing the embodiment of the present application Change method.
In the present solution, by the state parameter of sensor acquisition terminal equipment, judge whether the state parameter meets and appoint Business switching condition, if it is, determine currently to redirect task according to the task order in the state parameter and task stack, it will The corresponding program interface of task that redirects switches to foreground, which thereby enhances terminal device background task switching efficiency, reduces The power consumption of terminal device.
Description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, of the invention is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of flow chart of target switching method provided by the embodiments of the present application;
Fig. 2 is the flow chart of another target switching method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another target switching method provided by the embodiments of the present application;
Fig. 4 is a kind of structure diagram of task switching device provided by the embodiments of the present application;
Fig. 5 is a kind of structure diagram of terminal device provided by the embodiments of the present application.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used to explain the present invention rather than limitation of the invention.It also should be noted that for the ease of retouching It states, part related to the present invention rather than entire infrastructure is illustrated only in attached drawing.
Fig. 1 is a kind of flow chart of target switching method provided by the embodiments of the present application, is applicable to in terminal device The task of operation switches over, and this method can be performed by terminal device provided by the embodiments of the present application, the terminal device Software can be used in task switching device and/or the mode of hardware is realized, as shown in Figure 1, concrete scheme provided in this embodiment is such as Under:
Step S101, the state parameter of sensor acquisition terminal equipment is passed through.
Terminal device, which is generally integrated, is equipped with multiple sensors, such as common acceleration transducer, gyroscope, illumination sensing Device, range sensor etc..Wherein, state parameter refers to the characterization terminal device displacement generated in terminal device moving process, posture The parameter of variation.In one embodiment, which passes through integrated acceleration transducer acquisition terminal for terminal device The acceleration value of equipment.
By taking Android operation system as an example, sensor (sensor) relevant API is defined within In android.hardware bags, by using Sensor classes, SensorEvent classes, SensorManager classes and SensorEventListener interfaces with obtain acceleration transducer acquisition acceleration value.Illustratively, call The monitor of the registerListener registration acceleration transducers of SensorManager classes, by calling Context's GetSystemService () method obtains SensorManager (sensor management service) object, passes through GetDefaultSensor () method of SensorManager objects obtains acceleration specified sensor to obtain its detection Terminal device acceleration value.
Step S102, judge whether the state parameter meets task switching condition, if it is, step S103 is performed, If it is not, then continue to monitor.
In terminal device operational process, user can open multiple application programs, the corresponding application of device screen display interface Program is usually foreground application, and other application program is accordingly in background operation state, when user passes through multitask tune After being closed with interface after some application program, which does not appear in then in multitask calling interface, user Ke Tong Switching is redirected between excessive task call interface carry out task.As of the prior art, user is by clicking on terminal device Menu button (or using specific key combination) opens multitask calling interface, when user is clicked in multitask calling interface After the display framework of some application program, then the display interface of the application program is jumped to.In this step, judge to gather in S101 The state parameter of terminal device whether meet task switching condition, when meeting task switching condition, after can carrying out accordingly The switching of platform task.In one embodiment, switched by judging whether the acceleration change parameter of terminal device meets task Condition, illustratively, definable user, which makes, to shake equipment, taps device screen edge, taps mobile phone frame quilt when actions Regard as the trigger condition of task switching, fixed rule can be presented in the acceleration change of terminal device, with user shake mobile phone into Exemplified by row taps, shaken to the left as user holds mobile phone, then acceleration value changes from small to big from left to right and moment becomes 0 (companion With there is negative peak), i.e., when detecting that acceleration value meets the above-mentioned change condition of the condition, then judge that terminal device is current The switching of carry out task is needed to meet task switching condition, optionally, speed that can also be by detection terminal equipment and acceleration Whether degree variation, which reaches predetermined threshold value, determines whether to meet task switching condition, if it is satisfied, then task switching is carried out, wherein, The speed of terminal device can draw (terminal device original state speed is 0) according to acceleration and speed formula, be grasped with Android Exemplified by making system, the acceleration rate threshold according to the terminal device and acceleration sensor accuracy of different model, sensitivity not With any value that may be configured as between ± 14 to ± 20.
Need to illustrate when, which can be based on user and carry out self-defined, the terminal device in definition procedure It detects and records state parameter when triggering task switches, after definition, when the state parameter of terminal device meets this again Definition condition then accordingly triggers task switching.
Step S103, determine currently to redirect task according to the task order in the state parameter and task stack.
The operating system of terminal device preserves the Activity of the entire APP opened by stack architecture, when an APP is opened After dynamic, if there is no task stack, then system can carry out the establishment of task stack, the Activity that the APP is started at this time accordingly It will be saved, manage in the task stack of the establishment, when user is again turned on a new APP, the Activity of the APP will It is placed in the stack top of task stack and is active, when APP is exited, its corresponding corresponding Activity can be retained in task In stack and placed in a suspend state.
In one embodiment, determine currently to redirect task according to the task order in the state parameter and task stack Can be:Determine that task switches number of hops according to the state parameter;Switch number of hops and task according to the task Task order in stack determines currently to redirect task.When detect the current state parameter of terminal device meet task switching item Part then determines that task switches number of hops according to the state parameter accordingly, and illustratively, the event of will hit against is defined as terminal and sets Standby task switching condition, the number of (such as 3 seconds) detection percussion event triggering, the number that this is detected determine in preset time For task number of hops.Wherein, task number of hops is characterized with terminal device current interface operation program in task stack Position carries out the number that task switching redirects successively to redirect starting point.For example, 10 are preserved in current task stack to appoint Business, it is assumed that marked as 1-10, the task order situation of task stack is { 0,1,2,3,4,5,6,7,8,9 }, and wherein task 9 is corresponding Application Program Interface is terminal device current foreground display interface, i.e., the interface that user is operating is redirected when determining to go out on missions When number is 3, then the current task that redirects determined according to the task order in the task stack is task 6.
Step S104, the corresponding program interface of task that redirects is switched into foreground.
In one embodiment, after determining to redirect task, activate this and redirect the corresponding application program of task, it should by this Foreground is switched to program interface to show, to realize that task switches.
As shown in the above, after the state parameter for detecting terminal device meets task switching condition, according to the shape State parameter carries out the switching of task in terminal device task stack, clicks on display interface manually without user and carries out task switching, carries High task switching efficiency, reduces the operating procedure of user, has saved the power consumption of terminal device.
Fig. 2 is the flow chart of another target switching method provided by the embodiments of the present application, optionally, described in the judgement Before whether state parameter meets task switching condition, further include:Judge whether terminal device is in the bright screen shape that user holds State;Judge whether the state parameter meets task switching condition and include correspondingly, described:It is used if the terminal device is in Under the bright screen state that family is held, then judge whether the state parameter meets task switching condition.As shown in Fig. 2, technical solution It is specific as follows:
Step S201, the currently used state of terminal device is monitored.
In one embodiment, the light on and off state to the screen of terminal device and whether carried out in user's handheld state It monitors.By taking Android operation system as an example, by PowerManager#isScreenOn () method to obtain terminal device Screen state monitors terminal device edge contact number by monitoring OnTouchEvent events.In an another reality Apply in example, can by photographic device (image that front camera that terminal device integrates is shot determine user whether handheld terminal Equipment).
In one embodiment, before the currently used state to terminal device is monitored, further include:According to user Operational order determine whether unlatching task switch mode, illustratively, can the setting menu of operating system provide whether open The option switches of task switch mode are opened, after listening to the option switches and being opened, terminal device enters task switch mode. When task switch mode is opened, in real time or each fixed duration monitors the currently used state of terminal device.
Step S202, judge whether terminal device is in the bright screen state that user holds, if it is, performing step S203, if it is not, then continuing to execute step S201.
Illustratively, determine terminal device whether in bright screen shape by PowerManager#isScreenOn () method State;When the edge contact for detecting terminal device is more than 1, it may be determined that present terminal equipment is in user's handheld state.
It should be noted that in other embodiments, it can individually judge terminal device whether in bright screen state or hand-held First state performs step S203 when the two meets it, can also be and whether first judge terminal device in bright screen state, if It is whether then to determine whether terminal device in user's handheld state, if it is, performing step S203.
Step S203, the state parameter of the terminal device of monitor terminal device sensor acquisition.
Step S204, judge whether the state parameter meets task switching condition, if it is, step S205 is performed, If it is not, then continue to monitor.
Step S205, determine currently to redirect task according to the task order in the state parameter and task stack.
Step S206, the corresponding program interface of task that redirects is switched into foreground.
It can be seen from the above, before task switching is carried out according to the state parameter of terminal device, judge whether terminal device is located Yu Liangping and under user's handheld state, if it is, by the state parameter of sensor acquisition terminal equipment and then after execution Continuous task handover operation, practical application scene of the research staff based on scheme, further perfect target switching method save The power consumption of terminal device.
Fig. 3 is the flow chart of another target switching method provided by the embodiments of the present application, optionally, is redirected by described The corresponding program interface of task is switched to after foreground, is further included:The action event at described program interface is monitored, if The action event is triggered, then by the stack top for redirecting task and switching to the task stack;If the action event does not have It is triggered, and detects the adjusting parameter for meeting the task switching condition, then according to the adjusting parameter and task stack In task order determine currently to redirect task;The adjusting parameter includes number of hops adjustment parameter and redirects direction adjustment Parameter, the number of hops adjustment parameter are determined according to the data of acceleration transducer acquisition, described to redirect direction adjustment parameter Data according to gyroscope acquisition determine.As shown in figure 3, technical solution is specific as follows:
Step S301, the currently used state of terminal device is monitored.
Step S302, judge whether terminal device is in the bright screen state that user holds, if it is, performing step S303, if it is not, then continuing to execute step S301.
Step S303, the state parameter of the terminal device of monitor terminal device sensor acquisition.
Step S304, judge whether the state parameter meets task switching condition, if it is, step S305 is performed, If it is not, then continue to monitor.
Step S305, determine currently to redirect task according to the task order in the state parameter and task stack.
Step S306, the corresponding program interface of task that redirects is switched into foreground.
Step S307, the action event at described program interface is monitored.
When the foregoing corresponding program interface of task that redirects determined switches to foreground and shows that (i.e. present terminal equipment is aobvious Show interface display) after, further user is monitored the action event of the application program, illustratively, the application program Interface can include the controls such as one or more buttons, check box, drop-down list, wherein, action event can be directed to control Click event, it is monitored with determine user whether clicking operation has been carried out to current application program.
Step S308, judge whether the action event is triggered, if it is, step S309 is performed, if it is not, then holding Row step S310.
Illustratively, can be judge Application Program Interface button whether by user click on or check box whether by user The triggering situation for waiting action events is clicked, it is corresponding to perform S309 if be triggered, if be not triggered, do not hold accordingly The sequence of task order in row task stack, putting in order before the switching of holding task are constant.
Step S309, by the stack top for redirecting task and switching to the task stack.
Illustratively, there are 10 tasks in task stack, sequence is followed successively by { 0,1,2,3,4,5,6,7,8,9 }, when true Make the task of redirecting for task 6 and by 6 corresponding Application Program Interface of task include behind foreground and detect its by user into Row operation, then the task order accordingly in adjustment task stack is { 0,1,2,3,4,5,7,8,9,6 }.
Step S310, judge whether that the adjusting parameter for meeting task switching condition exists, if it is, performing step S311, if it is not, then continuing to monitor.
In one embodiment, which includes number of hops adjustment parameter and redirects direction adjustment parameter, In, number of hops adjustment parameter is determined according to the data of acceleration transducer acquisition, redirects direction adjustment parameter according to gyroscope The data of acquisition determine.Wherein, number of hops adjusts the number for carrying out redirecting when task redirects in parameter representative task stack, and It redirects direction adjustment parameter and redirects the direction redirected during task for switching in task stack, illustratively, appointing in current task stack It is engaged in as { 0,1,2,3,4,5,6,7,8,9 }, task is currently redirected as task 6, after detecting adjusting parameter at this time, according to the adjustment Number adjustment parameter in parameter determines the number redirected, and the direction redirected is determined according to direction adjustment parameter, illustratively, When different postures, velocity of displacement variation carry out task switching of user's hand-held terminal device by terminal device, pass through gyro The flip angle of instrument detection terminal equipment if terminal device is just facing towards user, can define side to overturn to the left and be jumped for task switching Turn direction as to the left (it can be downward, i.e., the direction to stack bottom to correspond in task stack), number adjustment parameter can be by acceleration The data of sensor acquisition determine, such as collect the number for meeting acceleration rate threshold (± 15 to ± 20) variation as 4 times, then accordingly Determined number adjustment parameter be 4.
Step S311, determine currently to redirect task according to the task order in the adjusting parameter and task stack, and hold Row step S306.
In one embodiment, adjusting parameter includes number adjustment parameter and direction adjustment parameter, wherein, number adjustment Parameter is illustratively for 4, and adjustment parameter in direction is illustratively as to the left, it is assumed that task number in current task stack and is ordered as { 0,1,2,3,4,5,6,7,8,9 }, the corresponding task of current foreground are to be directed toward appointing for task stack before task switching adjusts for task 6 Business 6, what is obtained after being adjusted according to foregoing adjusting parameter redirects task as task 3, correspondingly, by 3 corresponding application program of task Interface display is in the interface of foreground.
It can be seen from the above, in task handoff procedure, the adjusting parameter that measures according to terminal device obtains corresponding task and cuts The number of hops changed so that the flexibility of task switching is stronger with direction, progress task switching is redirected, meanwhile, switch in task When showing the Application Program Interface being switched into terminal device display interface, the operation of user is monitored, determine user and The application program generates interaction, that is, assert and task ranking in task stack is carried out when the application program is the task that user wants switching Adjustment so that user can continuously perform task handover operation, further improve task switching efficiency.
Fig. 4 is a kind of structure diagram of task switching device provided by the embodiments of the present application, and the device is above-mentioned for performing The target switching method that embodiment provides, possesses the corresponding function module of execution method and advantageous effect.As shown in figure 4, the dress It puts and specifically includes:Parameter collection module 101, task processing module 102 and response task handover module 103, wherein,
Parameter collection module 101, for passing through the state parameter of sensor acquisition terminal equipment.
Terminal device, which is generally integrated, is equipped with multiple sensors, such as common acceleration transducer, gyroscope, illumination sensing Device, range sensor etc..Wherein, state parameter refers to the characterization terminal device displacement generated in terminal device moving process, posture The parameter of variation.In one embodiment, which passes through integrated acceleration transducer acquisition terminal for terminal device The acceleration value of equipment.
By taking Android operation system as an example, sensor (sensor) relevant API is defined within In android.hardware bags, by using Sensor classes, SensorEvent classes, SensorManager classes and SensorEventListener interfaces with obtain acceleration transducer acquisition acceleration value.Illustratively, call The monitor of the registerListener registration acceleration transducers of SensorManager classes, by calling Context's GetSystemService () method obtains SensorManager (sensor management service) object, passes through GetDefaultSensor () method of SensorManager objects obtains acceleration specified sensor to obtain its detection Terminal device acceleration value.
Task processing module 102, for judging whether the state parameter meets task switching condition, if it is, according to It determines currently to redirect task according to the task order in the state parameter and task stack.
In terminal device operational process, user can open multiple application programs, the corresponding application of device screen display interface Program is usually foreground application, and other application program is accordingly in background operation state, when user passes through multitask tune After being closed with interface after some application program, which does not appear in then in multitask calling interface, user Ke Tong Switching is redirected between excessive task call interface carry out task.As of the prior art, user is by clicking on terminal device Menu button (or using specific key combination) opens multitask calling interface, when user is clicked in multitask calling interface After the display framework of some application program, then the display interface of the application program is jumped to.Task processing module 102 judges parameter Whether the state parameter of the terminal device gathered in acquisition module 101 meets task switching condition, when meeting task switching condition When, the switching of background task can be carried out accordingly.In one embodiment, by judging the acceleration change parameter of terminal device Whether task switching condition is met, and illustratively, definable user, which makes, to shake equipment, taps device screen edge, tap hand Machine frame is identified as the trigger condition of task switching when actions, and fixed rule can be presented in the acceleration change of terminal device, By taking user's shake mobile phone is tapped as an example, shaken to the left as user holds mobile phone, then acceleration value is from left to right by small change Big moment again becomes 0 (with negative peak occur), i.e., when detecting that acceleration value meets the above-mentioned change condition of the condition, then Judge that terminal device currently needs the switching of carry out task to meet task switching condition.
Task handover module 103, for the corresponding program interface of task that redirects to be switched to foreground.
In one embodiment, after determining to redirect task, activate this and redirect the corresponding application program of task, it should by this Foreground is switched to program interface to show, to realize that task switches.
As shown in the above, after the state parameter for detecting terminal device meets task switching condition, according to the shape State parameter carries out the switching of task in terminal device task stack, clicks on display interface manually without user and carries out task switching, carries High task switching efficiency, reduces the operating procedure of user, has saved the power consumption of terminal device.
In a possible embodiment, described device further includes the first monitoring module 104, is used for:
Before judging whether the state parameter meets task switching condition, judge terminal device whether in user's hand The bright screen state held;
The task processing module 102 is specifically used for:
If the terminal device is under the bright screen state that user holds, judges whether the state parameter meets and appoint Business switching condition.
In a possible embodiment, described device further includes the second monitoring module 105, is used for:
It is redirected by described after the corresponding program interface of task switches to foreground, to the action event at described program interface It is monitored, if the action event is triggered, by the stack top for redirecting task and switching to the task stack.
In a possible embodiment, the task processing module 102 is additionally operable to:
If the action event is not triggered, and detects the adjusting parameter for meeting the task switching condition, then It determines currently to redirect task according to the task order in the adjusting parameter and task stack.
In a possible embodiment, the adjusting parameter includes number of hops adjustment parameter and redirects direction adjustment Parameter, the number of hops adjustment parameter are determined according to the data of acceleration transducer acquisition, described to redirect direction adjustment parameter Data according to gyroscope acquisition determine.
In a possible embodiment, the task processing module 102 is specifically used for:
Determine that task switches number of hops according to the state parameter;
Switch the task order in number of hops and task stack according to the task to determine currently to redirect task.
In a possible embodiment, the task processing module 102 is specifically used for:
Judge whether the acceleration change parameter of terminal device meets task switching condition.
The present embodiment provides a kind of terminal device on the basis of the various embodiments described above, and Fig. 5 is that the embodiment of the present application carries The structure diagram of a kind of terminal device supplied, as shown in figure 5, the terminal device 200 includes:Memory 201, processor (Central Processing Unit, CPU) 202, Peripheral Interface 203, RF (Radio Frequency, radio frequency) circuit 205, Voicefrequency circuit 206, loud speaker 211, power management chip 208, input/output (I/O) subsystem 209, touch-screen 212, sensing Device 213, other input/control devicess 210 and outside port 204, these components pass through one or more communication bus or letter Number line 207 communicates.
It should be understood that graphic terminal 200 is only an example of terminal device, and terminal device 200 Can have than more or less components shown in figure, two or more components can be combined or can be with It is configured with different components.Various parts shown in figure can be including one or more signal processings and/or special Hardware, software including integrated circuit are realized in the combination of hardware and software.
Just the terminal device of the rights management provided in this embodiment for more opening application is described in detail below, should Terminal device is by taking smart mobile phone as an example.
Memory 201, the memory 201 can be by access such as CPU202, Peripheral Interfaces 203, and the memory 201 can To include high-speed random access memory, nonvolatile memory can also be included, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU202 and deposited by Peripheral Interface 203, the Peripheral Interface 203 Reservoir 201.
Sensor 213 can be the acceleration transducer and gyroscope that terminal device content integrates, and the sensor 213 is adopted The data of collection can be accessed by CPU202.
I/O subsystems 209, the I/O subsystems 209 can be by the input/output peripherals in equipment, such as touch-screen 212 With other input/control devicess 210, Peripheral Interface 203 is connected to.I/O subsystems 209 can include 2091 He of display controller For controlling one or more input controllers 2092 of other input/control devicess 210.Wherein, one or more input controls Device 2092 processed receives electric signal from other input/control devicess 210 or sends electric signal to other input/control devicess 210, Other input/control devicess 210 can include physical button (pressing button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole clicks on idler wheel.What deserves to be explained is input controller 2092 can with it is following any one be connected:Keyboard, infrared port, The instruction equipment of USB interface and such as mouse.
Touch-screen 212, the touch-screen 212 are the input interface and output interface between user terminal and user, can User is shown to depending on output, visual output can include figure, text, icon, video etc..
Display controller 2091 in I/O subsystems 209 receives electric signal from touch-screen 212 or is sent out to touch-screen 212 Electric signals.Touch-screen 212 detects the contact on touch-screen, and the contact detected is converted to and shown by display controller 2091 The interaction of user interface object on touch-screen 212, that is, realize human-computer interaction, the user interface being shown on touch-screen 212 Icon that object can be the icon of running game, be networked to corresponding network etc..What deserves to be explained is equipment can also include light Mouse, light mouse are the extensions for not showing the touch sensitive surface visually exported or the touch sensitive surface formed by touch-screen.
RF circuits 205 are mainly used for establishing the communication of mobile phone and wireless network (i.e. network side), realize mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuits 205 receive and send RF letters Number, RF signals are also referred to as electromagnetic signal, and RF circuits 205 convert electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuits 205 can include performing The known circuit of these functions includes but not limited to antenna system, RF transceivers, one or more amplifiers, tuner, one A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 206 is mainly used for receiving voice data from Peripheral Interface 203, which is converted to telecommunications Number, and the electric signal is sent to loud speaker 211.
Loud speaker 211 for the voice signal for receiving mobile phone from wireless network by RF circuits 205, is reduced to sound And play the sound to user.
Power management chip 208, the hardware for being connected by CPU202, I/O subsystem and Peripheral Interface are powered And power management.
The task switching device and terminal device of the terminal device provided in above-described embodiment can perform of the invention arbitrary real The target switching method for the terminal device that example is provided is applied, possesses and performs the corresponding function module of this method and advantageous effect.Not The technical detail of detailed description in the above-described embodiments, reference can be made to the task for the terminal device that any embodiment of the present invention is provided Switching method.
The embodiment of the present application also provides a kind of storage medium for including terminal device executable instruction, and the terminal device can It executes instruction when being performed by terminal device processor for performing a kind of target switching method, this method includes:
Pass through the state parameter of sensor acquisition terminal equipment;
Judge whether the state parameter meets task switching condition, if it is, according to the state parameter and appointing Task order in business stack determines currently to redirect task;
The corresponding program interface of task that redirects is switched into foreground.
In a possible embodiment, it is described judge whether the state parameter meets task switching condition before, also Including:
Judge whether terminal device is in the bright screen state that user holds;
Judge whether the state parameter meets task switching condition and include correspondingly, described:
If the terminal device is under the bright screen state that user holds, judges whether the state parameter meets and appoint Business switching condition.
In a possible embodiment, redirected by described after the corresponding program interface of task switches to foreground, also Including:
The action event at described program interface is monitored, if the action event is triggered, is redirected described Task switches to the stack top of the task stack.
In a possible embodiment, if the action event is not triggered, and detect and meet the task The adjusting parameter of switching condition then determines currently to redirect task according to the task order in the adjusting parameter and task stack.
In a possible embodiment, the adjusting parameter includes number of hops adjustment parameter and redirects direction adjustment Parameter, the number of hops adjustment parameter are determined according to the data of acceleration transducer acquisition, described to redirect direction adjustment parameter Data according to gyroscope acquisition determine.
In a possible embodiment, the task order according in the state parameter and task stack determines to work as Before redirect task and include:
Determine that task switches number of hops according to the state parameter;
Switch the task order in number of hops and task stack according to the task to determine currently to redirect task.
In a possible embodiment, it is described to judge whether the state parameter meets task switching condition and include:
Judge whether the acceleration change parameter of terminal device meets task switching condition.
Storage medium --- any various types of memory devices or storage device.Term " storage medium " is intended to wrap It includes:Install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, blue Bath (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (such as hard disk or optical storage);Memory component of register or other similar types etc..Storage medium can further include other The memory of type or its combination.In addition, storage medium can be located at program in the first computer system being wherein performed, Or can be located in different second computer systems, second computer system is connected to the by network (such as internet) One computer system.Second computer system can provide program instruction and be used to perform to the first computer." storage is situated between term Matter " can include may reside in different position two of (such as in different computer systems by network connection) or More storage mediums.Storage medium can store the program instruction that can be performed by one or more processors and (such as implement For computer program).
Certainly, a kind of storage medium for including computer executable instructions that the embodiment of the present application is provided, computer The target switching method operation that executable instruction is not limited to the described above, can also carry out what any embodiment of the present invention was provided Relevant operation in target switching method.
Note that it above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various apparent variations, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also It can include other more equivalent embodiments, and the scope of the present invention is determined by scope of the appended claims.

Claims (10)

1. target switching method, which is characterized in that including:
Pass through the state parameter of sensor acquisition terminal equipment;
Judge whether the state parameter meets task switching condition, if it is, according to the state parameter and task stack In task order determine currently to redirect task;
The corresponding program interface of task that redirects is switched into foreground.
2. according to the method described in claim 1, it is characterized in that, described judge whether the state parameter meets task switching Before condition, further include:
Judge whether terminal device is in the bright screen state that user holds;
Judge whether the state parameter meets task switching condition and include correspondingly, described:
If the terminal device is under the bright screen state that user holds, judge whether the state parameter meets task and cut Change condition.
3. it according to the method described in claim 1, it is characterized in that, is switched to by the corresponding program interface of task that redirects After foreground, further include:
The action event at described program interface is monitored, if the action event is triggered, task is redirected by described Switch to the stack top of the task stack.
4. if according to the method described in claim 3, it is characterized in that, the action event is not triggered, and detect Meet the adjusting parameter of the task switching condition, then determine to work as according to the task order in the adjusting parameter and task stack Before redirect task.
5. according to the method described in claim 4, it is characterized in that, the adjusting parameter include number of hops adjustment parameter and Direction adjustment parameter is redirected, the number of hops adjustment parameter is determined according to the data of acceleration transducer acquisition, described to redirect Direction adjustment parameter is determined according to the data of gyroscope acquisition.
6. according to the described method of any one of claim 1-4, which is characterized in that it is described according to the state parameter and appoint Task order in business stack determines that currently redirecting task includes:
Determine that task switches number of hops according to the state parameter;
Switch the task order in number of hops and task stack according to the task to determine currently to redirect task.
7. according to the described method of any one of claim 1-4, which is characterized in that described to judge whether the state parameter is full Sufficient task switching condition includes:
Judge whether the acceleration change parameter of terminal device meets task switching condition.
8. task switching device, which is characterized in that including:
Parameter collection module, for passing through the state parameter of sensor acquisition terminal equipment;
Task processing module, for judging whether the state parameter meets task switching condition, if it is, according to the shape Task order in state parameter and task stack determines currently to redirect task;
Task handover module, for the corresponding program interface of task that redirects to be switched to foreground.
9. a kind of terminal device, including:Processor, memory and storage are on a memory and the meter that can run on a processor Calculation machine program, which is characterized in that the processor is realized when performing the computer program such as any one of claim 1-7 institutes The target switching method stated.
A kind of 10. storage medium for including terminal device executable instruction, which is characterized in that the terminal device executable instruction Target switching method when being performed as terminal device processor for execution as any one of claim 1-7.
CN201711339175.5A 2017-12-14 2017-12-14 Task switching method and device, terminal equipment and storage medium Expired - Fee Related CN108076223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711339175.5A CN108076223B (en) 2017-12-14 2017-12-14 Task switching method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711339175.5A CN108076223B (en) 2017-12-14 2017-12-14 Task switching method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108076223A true CN108076223A (en) 2018-05-25
CN108076223B CN108076223B (en) 2021-01-15

Family

ID=62158582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711339175.5A Expired - Fee Related CN108076223B (en) 2017-12-14 2017-12-14 Task switching method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108076223B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900695A (en) * 2018-05-29 2018-11-27 维沃移动通信有限公司 A kind of display processing method and terminal device
CN111371816A (en) * 2018-12-25 2020-07-03 上海亮衡信息科技有限公司 Communication method, system and communication equipment based on condition triggering
CN111694626A (en) * 2019-03-15 2020-09-22 Oppo广东移动通信有限公司 Application skipping method and device, terminal and storage medium
CN113687636A (en) * 2021-08-23 2021-11-23 明度智云(浙江)科技有限公司 Equipment management method, system and storage medium for industrial production
CN114138147A (en) * 2021-11-16 2022-03-04 努比亚技术有限公司 Application interface display method, terminal and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438062A (en) * 2010-09-29 2012-05-02 联想移动通信科技有限公司 Method, device and mobile terminal for switching multiple tasks
CN102508560A (en) * 2011-10-28 2012-06-20 优视科技有限公司 Application program switching method and device based on mobile terminal
CN103294187A (en) * 2012-02-24 2013-09-11 株式会社泛泰 Apparatus and method for switching active application
CN105677473A (en) * 2016-02-29 2016-06-15 北京小米移动软件有限公司 Method and device for switching application program
CN106933468A (en) * 2017-03-13 2017-07-07 深圳市金立通信设备有限公司 A kind of user interface switching method and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438062A (en) * 2010-09-29 2012-05-02 联想移动通信科技有限公司 Method, device and mobile terminal for switching multiple tasks
CN102508560A (en) * 2011-10-28 2012-06-20 优视科技有限公司 Application program switching method and device based on mobile terminal
CN103294187A (en) * 2012-02-24 2013-09-11 株式会社泛泰 Apparatus and method for switching active application
CN105677473A (en) * 2016-02-29 2016-06-15 北京小米移动软件有限公司 Method and device for switching application program
CN106933468A (en) * 2017-03-13 2017-07-07 深圳市金立通信设备有限公司 A kind of user interface switching method and terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900695A (en) * 2018-05-29 2018-11-27 维沃移动通信有限公司 A kind of display processing method and terminal device
CN111371816A (en) * 2018-12-25 2020-07-03 上海亮衡信息科技有限公司 Communication method, system and communication equipment based on condition triggering
CN111694626A (en) * 2019-03-15 2020-09-22 Oppo广东移动通信有限公司 Application skipping method and device, terminal and storage medium
CN113687636A (en) * 2021-08-23 2021-11-23 明度智云(浙江)科技有限公司 Equipment management method, system and storage medium for industrial production
CN113687636B (en) * 2021-08-23 2022-11-08 明度智云(浙江)科技有限公司 Equipment management method, system and storage medium for industrial production
CN114138147A (en) * 2021-11-16 2022-03-04 努比亚技术有限公司 Application interface display method, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN108076223B (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN108076223A (en) Target switching method, device, terminal device and storage medium
CN110908579B (en) Touch response method and electronic equipment
CN108111676B (en) Application program control method, mobile terminal and computer readable storage medium
CN112256181B (en) Interaction processing method and device, computer equipment and storage medium
CN111405110A (en) Screen control method and device, storage medium and mobile terminal
CN109542325B (en) Double-sided screen touch method, double-sided screen terminal and readable storage medium
CN108073405B (en) Application program unloading method and mobile terminal
CN108052258B (en) Terminal task processing method, task processing device and mobile terminal
CN111078186A (en) Playing method and electronic equipment
CN111475066A (en) Background switching method of application program and electronic equipment
CN108762641B (en) Text editing method and terminal equipment
CN108270928B (en) Voice recognition method and mobile terminal
CN108089935B (en) Application program management method and mobile terminal
CN108228052B (en) Method and device for triggering operation of interface component, storage medium and terminal
CN107885423B (en) Picture processing method and mobile terminal
CN111310165B (en) Account switching or registering method and electronic equipment
CN109739430B (en) Display method and mobile terminal
CN109107163B (en) Analog key detection method and device, computer equipment and storage medium
CN111372003A (en) Camera switching method and device and terminal
CN106919460A (en) A kind of method for controlling broadcast transmission, device and mobile terminal
CN111027406A (en) Picture identification method and device, storage medium and electronic equipment
CN109618234A (en) Video playing control method, device, mobile terminal and storage medium
CN111601114B (en) User operation response method and device applied to live broadcast room
CN111665979B (en) Control method and electronic equipment
CN106850985B (en) Control method, device and the mobile terminal of mobile terminal sensor

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210115