CN108076223B - Task switching method and device, terminal equipment and storage medium - Google Patents

Task switching method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN108076223B
CN108076223B CN201711339175.5A CN201711339175A CN108076223B CN 108076223 B CN108076223 B CN 108076223B CN 201711339175 A CN201711339175 A CN 201711339175A CN 108076223 B CN108076223 B CN 108076223B
Authority
CN
China
Prior art keywords
task
jump
switching
parameter
terminal equipment
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.)
Expired - Fee Related
Application number
CN201711339175.5A
Other languages
Chinese (zh)
Other versions
CN108076223A (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

Images

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

Abstract

The embodiment of the application discloses a task switching method, a task switching device, terminal equipment and a storage medium, wherein the method comprises the following steps: acquiring state parameters of the terminal equipment through a sensor; judging whether the state parameters meet task switching conditions, if so, determining a current jump task according to the state parameters and a task sequence in a task stack; and switching the program interface corresponding to the skip task to the foreground, thereby improving the background task switching efficiency of the terminal equipment and reducing the power consumption of the terminal equipment.

Description

Task switching method and device, terminal equipment and storage medium
Technical Field
The embodiment of the application relates to computer technologies, and in particular, to a task switching method and apparatus, a terminal device, and a storage medium.
Background
With the increase of the popularity of the terminal devices, more and more users use the terminal devices to execute various functions to meet their own needs, such as reading characters, watching videos, listening to music, playing games, etc., and the hardware of the terminal devices is continuously developed, so that the terminal devices can run more programs in the background.
In the prior art, a user can call a multi-task interface by clicking a menu key of terminal equipment and then select an application to be switched, so that the task switching mode is low in efficiency.
Disclosure of Invention
The invention provides a task switching method, a task switching device, terminal equipment and a storage medium, which improve background task switching efficiency of the terminal equipment and reduce power consumption of the terminal equipment.
In a first aspect, an embodiment of the present application provides a task switching method, including:
acquiring state parameters of the terminal equipment through a sensor;
judging whether the state parameters meet task switching conditions, if so, determining a current jump task according to the state parameters and a task sequence in a task stack;
and switching the program interface corresponding to the jump task to the foreground.
In a second aspect, an embodiment of the present application further provides a task switching device, including:
the parameter collection module is used for collecting the state parameters of the terminal equipment through the sensor;
the task processing module is used for judging whether the state parameters meet task switching conditions or not, and if so, determining the current jump task according to the state parameters and the task sequence in the task stack;
and the task switching module is used for switching the program interface corresponding to the skip task to the foreground.
In a third aspect, an embodiment of the present application further provides a terminal device, including: the task switching method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the task switching method according to the embodiment of the application.
In a fourth aspect, an embodiment of the present application further provides a storage medium containing terminal device executable instructions, where the terminal device executable instructions are used to execute the task switching method according to the embodiment of the present application when executed by a terminal device processor.
According to the scheme, the state parameters of the terminal equipment are collected through the sensor, whether the state parameters meet task switching conditions is judged, if yes, the current skipping task is determined according to the state parameters and the task sequence in the task stack, and the program interface corresponding to the skipping task is switched to the foreground, so that the background task switching efficiency of the terminal equipment is improved, and the power consumption of the terminal equipment is reduced.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a flowchart of a task switching method provided in an embodiment of the present application;
fig. 2 is a flowchart of another task switching method provided in an embodiment of the present invention;
fig. 3 is a flowchart of another task switching method provided in an embodiment of the present application;
fig. 4 is a block diagram illustrating a task switching device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a task switching method provided in an embodiment of the present application, which is applicable to switching a task running in a terminal device, where the method may be executed by the terminal device provided in the embodiment of the present application, and a task switching device of the terminal device may be implemented in a software and/or hardware manner, as shown in fig. 1, a specific scheme provided in this embodiment is as follows:
and S101, acquiring the state parameters of the terminal equipment through a sensor.
The terminal device is generally integrally installed with various sensors, such as a common acceleration sensor, a gyroscope, an illumination sensor, a distance sensor, and the like. The state parameters refer to parameters representing terminal equipment displacement and attitude change generated in the moving process of the terminal equipment. In one embodiment, the state parameter is that the terminal device acquires an acceleration value of the terminal device through an integrated acceleration sensor.
Taking the Android operating system as an example, Sensor (Sensor) -related APIs are defined in Android. Illustratively, a sensorlistener of the SensorManager class is called to register a monitor of the acceleration sensor, a SensorManager (sensor management service) object is obtained by calling a getsysteservice () method of Context, and a specified acceleration sensor is obtained by a getDefaultSensor () method of the SensorManager object to obtain an acceleration value of the terminal device detected by the specified acceleration sensor.
And step S102, judging whether the state parameters meet task switching conditions, if so, executing step S103, and if not, continuing monitoring.
In the running process of the terminal equipment, a user can open a plurality of application programs, the application program corresponding to the screen display interface of the equipment is usually a foreground application program, other application programs are correspondingly in a background running state, when the user closes a certain application program through the multi-task calling interface, the application program cannot appear in the multi-task calling interface, and the user can perform skip switching between tasks through the multi-task calling interface. As in the prior art, a user opens a multitask calling interface by clicking a menu button of a terminal device (or using a specific key combination), and when the user clicks a display frame of an application program in the multitask calling interface, the user jumps to the display interface of the application program. In this step, it is determined whether the state parameters of the terminal device collected in S101 satisfy the task switching condition, and when the task switching condition is satisfied, the background task can be switched accordingly. In one embodiment, by determining whether the acceleration variation parameter of the terminal device meets the task switching condition, for example, it may be defined that the acceleration variation parameter of the terminal device is determined as a trigger condition for task switching when the user shakes the device, strikes the edge of the screen of the device, strikes the frame of the mobile phone, and the like, the acceleration variation of the terminal device may exhibit a fixed rule, taking the example that the user shakes the mobile phone to strike, if the user shakes the mobile phone by holding the mobile phone to the left, the acceleration value changes from small to large from left to right to instantly 0 (accompanied by occurrence of a negative peak value), that is, when it is detected that the acceleration value meets the above-mentioned variation condition, it is determined that the task switching condition is currently required by the terminal device to perform task switching, optionally, it may also be determined whether the task switching condition is met by detecting whether the speed and, and switching the tasks, wherein the speed of the terminal equipment can be obtained according to an acceleration and a speed formula (the initial state speed of the terminal equipment is 0), and the acceleration threshold value can be set to any value between +/-14 and +/-20 according to different types of terminal equipment and different accuracy and sensitivity of the acceleration sensor, taking an Android operating system as an example.
When the task switching condition needs to be explained, the task switching condition can be customized based on a user, the terminal equipment detects and records the state parameter when the task switching is triggered in the defining process, and after the task switching is finished, the task switching is correspondingly triggered when the state parameter of the terminal equipment meets the defining condition again.
And S103, determining the current jump task according to the state parameters and the task sequence in the task stack.
The operating system of the terminal equipment stores the opened Activity of the whole APP through a stack structure, when one APP is started, if no task stack exists, the system correspondingly creates a task stack, at the moment, the started Activity of the APP is stored and managed in the created task stack, when a user opens a new APP again, the Activity of the APP is placed at the top of the task stack and is in an activated state, and when the APP exits, the corresponding Activity is kept in the task stack and is in a suspended state.
In one embodiment, determining the current jump task according to the state parameter and the task sequence in the task stack may be: determining task switching skip times according to the state parameters; and determining the current jump task according to the task switching jump times and the task sequence in the task stack. When detecting that the current state parameter of the terminal device meets the task switching condition, correspondingly determining the task switching skip times according to the state parameter, exemplarily defining the tapping event as the task switching condition of the terminal device, detecting the triggering times of the tapping event within a preset time (such as 3 seconds), and determining the detected times as the task skip times. The task jump times represent the times of switching and jumping tasks in sequence by taking the position of a current interface running program of the terminal equipment in a task stack as a jump starting point. For example, 10 tasks are stored in the current task stack, and the reference number is 1-10, and the task sequence of the task stack is {0,1,2,3,4,5,6,7,8,9}, where an application program interface corresponding to the task 9 is a current foreground display interface of the terminal device, that is, an interface which a user is operating, and when it is determined that the task jump frequency is 3, the current jump task determined according to the task sequence in the task stack is task 6.
And step S104, switching the program interface corresponding to the jump task to the foreground.
In one embodiment, after the jump task is determined, an application program corresponding to the jump task is activated, and the application program interface is switched to the foreground for display, so that task switching is realized.
According to the above content, after the state parameter of the terminal device is detected to meet the task switching condition, the task in the task stack of the terminal device is switched according to the state parameter, and the user does not need to manually click the display interface to switch the task, so that the task switching efficiency is improved, the operation steps of the user are reduced, and the power consumption of the terminal device is saved.
Fig. 2 is a flowchart of another task switching method provided in an embodiment of the present application, and optionally before determining whether the state parameter satisfies a task switching condition, the method further includes: judging whether the terminal equipment is in a bright screen state held by a user; correspondingly, the judging whether the state parameter meets the task switching condition includes: and if the terminal equipment is in a bright screen state held by a user, judging whether the state parameters meet task switching conditions. As shown in fig. 2, the technical solution is as follows:
step S201, monitoring the current use state of the terminal equipment.
In one embodiment, the on-off state of the screen of the terminal equipment and whether the terminal equipment is in the user holding state are monitored. Taking an Android operating system as an example, the screen state of the terminal equipment is obtained by a PowerManager # isscreenOn () method, and the number of edge contacts of the terminal equipment is monitored by monitoring an OnTouchervent event. In another embodiment, whether the user holds the terminal device may be determined by a camera (an image taken by a front camera integrated with the terminal device).
In one embodiment, before monitoring the current usage state of the terminal device, the method further includes: the method includes the steps that whether a task switching mode is started or not is determined according to an operation instruction of a user, for example, an option switch whether the task switching mode is started or not can be provided in a setting menu of an operating system, and when it is monitored that the option switch is started, the terminal device enters the task switching mode. And when the task switching mode is started, monitoring the current use state of the terminal equipment in real time or every fixed time length.
Step S202, judging whether the terminal equipment is in a bright screen state held by a user, if so, executing step S203, and if not, continuing to execute step S201.
Exemplarily, whether the terminal device is in a bright screen state is determined by a PowerManager # issscreen () method; when the edge contact points of the terminal equipment are detected to be more than 1, the current terminal equipment can be determined to be in the user holding state.
It should be noted that, in other embodiments, it may be separately determined whether the terminal device is in the bright screen state or the handheld state, and if both are satisfied, step S203 is executed, or it may be first determined whether the terminal device is in the bright screen state, if so, it is further determined whether the terminal device is in the handheld state, and if so, step S203 is executed.
And S203, monitoring the state parameters of the terminal equipment acquired by the terminal equipment sensor.
And step S204, judging whether the state parameters meet task switching conditions, if so, executing step S205, and if not, continuing monitoring.
And S205, determining the current jump task according to the state parameters and the task sequence in the task stack.
And S206, switching the program interface corresponding to the jump task to the foreground.
According to the method, before the task is switched according to the state parameters of the terminal equipment, whether the terminal equipment is in a bright screen state and in a handheld state by a user is judged, if yes, the state parameters of the terminal equipment are collected through the sensor, then the follow-up task switching operation is executed, and research and development personnel further improve the task switching method and save the power consumption of the terminal equipment on the basis of the practical application scene of the scheme.
Fig. 3 is a flowchart of another task switching method provided in an embodiment of the present application, and optionally, after switching a program interface corresponding to the skip task to a foreground, the method further includes: monitoring an operation event of the program interface, and switching the jump task to the stack top of the task stack if the operation event is triggered; if the operation event is not triggered and an adjusting parameter meeting the task switching condition is detected, determining a current jump task according to the adjusting parameter and a task sequence in a task stack; the adjustment parameters comprise a jump time adjustment parameter and a jump direction adjustment parameter, the jump time adjustment parameter is determined according to data collected by the acceleration sensor, and the jump direction adjustment parameter is determined according to data collected by the gyroscope. As shown in fig. 3, the technical solution is as follows:
step S301, monitoring the current use state of the terminal equipment.
Step S302, judging whether the terminal equipment is in a bright screen state held by a user, if so, executing step S303, and if not, continuing to execute step S301.
And S303, monitoring the state parameters of the terminal equipment acquired by the terminal equipment sensor.
And step S304, judging whether the state parameters meet task switching conditions, if so, executing step S305, and if not, continuing monitoring.
And S305, determining the current jump task according to the state parameters and the task sequence in the task stack.
And S306, switching the program interface corresponding to the jumping task to the foreground.
And step S307, monitoring the operation event of the program interface.
After the program interface corresponding to the determined skip task is switched to foreground display (i.e., display interface display of the current terminal device), the operation event of the application program is further monitored by the user.
Step S308, judging whether the operation event is triggered, if so, executing step S309, otherwise, executing step S310.
For example, the triggering condition may be that whether a button of the application program interface is clicked by a user or whether a check box is clicked by the user or not is judged, if the triggering condition is triggered, the corresponding step S309 is executed, and if the triggering condition is not triggered, the corresponding step does not execute the sorting of the task order in the task stack, and the order of the tasks before the task switching is kept unchanged.
And S309, switching the jump task to the stack top of the task stack.
Illustratively, 10 tasks are stored in the task stack, and the sequence is {0,1,2,3,4,5,6,7,8,9}, and when it is determined that the skip task is task 6 and the application program interface corresponding to task 6 is displayed in the foreground and the user operation is detected, the sequence of the tasks in the task stack is correspondingly adjusted to {0,1,2,3,4,5,7,8,9,6 }.
And step S310, judging whether an adjusting parameter meeting the task switching condition exists, if so, executing step S311, and if not, continuing monitoring.
In one embodiment, the adjustment parameters include a jump number adjustment parameter and a jump direction adjustment parameter, wherein the jump number adjustment parameter is determined according to data collected by an acceleration sensor, and the jump direction adjustment parameter is determined according to data collected by a gyroscope. Wherein, the jump time adjusting parameter represents the jump time when the task jumps in the task stack, and the jump direction adjusting parameter is the jump direction when the jump task is switched in the task stack, exemplarily, the task in the current task stack is {0,1,2,3,4,5,6,7,8,9}, the current jump task is task 6, after detecting the adjusting parameter, the jump time is determined according to the time adjusting parameter in the adjusting parameter, the jump direction is determined according to the direction adjusting parameter, exemplarily, when the user holds the terminal device to switch tasks through different postures and displacement speed changes of the terminal device, the turning angle of the terminal device is detected through a gyroscope, if the front of the terminal device faces the user, the left-side turning direction can be defined to turn the jump direction of the task to the left (the direction to the task stack can be downward, i.e. in the direction towards the bottom of the stack), the number of times adjustment parameter may be determined from data collected by the acceleration sensor, and if the number of times of change according to the acceleration threshold value (± 15 to ± 20) is collected is 4, the corresponding number of times adjustment parameter is 4.
Step 311, determining the current jump task according to the adjustment parameter and the task sequence in the task stack, and executing step 306.
In an embodiment, the adjustment parameter includes a number adjustment parameter and a direction adjustment parameter, where the number adjustment parameter is exemplarily 4, and the direction adjustment parameter is exemplarily, for example, leftward, it is assumed that a task number and a sequence in a current task stack are {0,1,2,3,4,5,6,7,8,9}, a task corresponding to a current foreground is a task 6, that is, a task 6 pointing to the task stack before task switching adjustment, a skipped task obtained after adjustment according to the adjustment parameter is a task 3, and accordingly, an application program interface corresponding to the task 3 is displayed in the foreground interface.
Therefore, in the task switching process, the jump times and the jump directions of the corresponding task switching are obtained according to the adjustment parameters measured by the terminal equipment, the task switching is carried out, so that the task switching flexibility is stronger, meanwhile, when the task switching is completed and the display interface of the terminal equipment displays the switched application program interface, the operation of a user is monitored, the interaction between the user and the application program is determined, namely the adjustment of the task sequencing in the task stack is carried out when the application program is determined to be the task which the user wants to switch, so that the user can continuously execute the task switching operation, and the task switching efficiency is further improved.
Fig. 4 is a block diagram of a task switching device according to an embodiment of the present application, where the task switching device is configured to execute a task switching method according to the embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 4, the apparatus specifically includes: a parameter collection module 101, a task processing module 102, and a task switching module 103, wherein,
and the parameter collection module 101 is used for collecting the state parameters of the terminal equipment through the sensor.
The terminal device is generally integrally installed with various sensors, such as a common acceleration sensor, a gyroscope, an illumination sensor, a distance sensor, and the like. The state parameters refer to parameters representing terminal equipment displacement and attitude change generated in the moving process of the terminal equipment. In one embodiment, the state parameter is that the terminal device acquires an acceleration value of the terminal device through an integrated acceleration sensor.
Taking the Android operating system as an example, Sensor (Sensor) -related APIs are defined in Android. Illustratively, a sensorlistener of the SensorManager class is called to register a monitor of the acceleration sensor, a SensorManager (sensor management service) object is obtained by calling a getsysteservice () method of Context, and a specified acceleration sensor is obtained by a getDefaultSensor () method of the SensorManager object to obtain an acceleration value of the terminal device detected by the specified acceleration sensor.
And the task processing module 102 is configured to determine whether the state parameter meets a task switching condition, and if so, determine a current jump task according to the state parameter and a task sequence in the task stack.
In the running process of the terminal equipment, a user can open a plurality of application programs, the application program corresponding to the screen display interface of the equipment is usually a foreground application program, other application programs are correspondingly in a background running state, when the user closes a certain application program through the multi-task calling interface, the application program cannot appear in the multi-task calling interface, and the user can perform skip switching between tasks through the multi-task calling interface. As in the prior art, a user opens a multitask calling interface by clicking a menu button of a terminal device (or using a specific key combination), and when the user clicks a display frame of an application program in the multitask calling interface, the user jumps to the display interface of the application program. The task processing module 102 determines whether the state parameters of the terminal device collected by the parameter collecting module 101 satisfy the task switching condition, and when the state parameters satisfy the task switching condition, the background task can be switched accordingly. In one embodiment, by judging whether the acceleration change parameter of the terminal device meets the task switching condition, for example, it may be defined that the acceleration change parameter of the terminal device is determined as a trigger condition for task switching when a user shakes the device, strikes the edge of a screen of the device, strikes a frame of a mobile phone, and the like, the acceleration change of the terminal device may show a fixed rule, taking the case that the user shakes the mobile phone for striking, if the user shakes the mobile phone by holding the mobile phone to the left side, the acceleration value changes from small to large from left to right and instantly changes to 0 (accompanied by occurrence of a negative peak), that is, when it is detected that the acceleration value meets the change condition, it is judged that the terminal device currently needs to perform task switching.
And the task switching module 103 is configured to switch the program interface corresponding to the skip task to a foreground.
In one embodiment, after the jump task is determined, an application program corresponding to the jump task is activated, and the application program interface is switched to the foreground for display, so that task switching is realized.
According to the above content, after the state parameter of the terminal device is detected to meet the task switching condition, the task in the task stack of the terminal device is switched according to the state parameter, and the user does not need to manually click the display interface to switch the task, so that the task switching efficiency is improved, the operation steps of the user are reduced, and the power consumption of the terminal device is saved.
In one possible embodiment, the apparatus further includes a first listening module 104 configured to:
before judging whether the state parameters meet the task switching conditions, judging whether the terminal equipment is in a bright screen state held by a user;
the task processing module 102 is specifically configured to:
and if the terminal equipment is in a bright screen state held by a user, judging whether the state parameters meet task switching conditions.
In one possible embodiment, the apparatus further comprises a second listening module 105 configured to:
monitoring an operation event of the program interface after the program interface corresponding to the skip task is switched to a foreground, and switching the skip task to the stack top of the task stack if the operation event is triggered.
In one possible embodiment, the task processing module 102 is further configured to:
and if the operation event is not triggered and the adjusting parameter meeting the task switching condition is detected, determining the current jump task according to the adjusting parameter and the task sequence in the task stack.
In one possible embodiment, the adjustment parameters include a jump number adjustment parameter determined according to data collected by the acceleration sensor and a jump direction adjustment parameter determined according to data collected by the gyroscope.
In a possible embodiment, the task processing module 102 is specifically configured to:
determining task switching skip times according to the state parameters;
and determining the current jump task according to the task switching jump times and the task sequence in the task stack.
In a possible embodiment, the task processing module 102 is specifically configured to:
and judging whether the acceleration change parameter of the terminal equipment meets the task switching condition.
In this embodiment, a terminal device is provided on the basis of the foregoing embodiments, and fig. 5 is a schematic structural diagram of a terminal device provided in an embodiment of the present application, and as shown in fig. 5, the terminal device 200 includes: memory 201, processor (CPU) 202, peripheral interfaces 203, RF (Radio Frequency) circuitry 205, audio circuitry 206, speaker 211, power management chip 208, input/output (I/O) subsystem 209, touch screen 212, sensors 213, other input/control devices 210, and external port 204, which communicate via one or more communication buses or signal lines 207.
It should be understood that the illustrated terminal device 200 is only one example of a terminal device, and that the terminal device 200 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail a terminal device for rights management of multi-open applications provided in this embodiment, where the terminal device is a smart phone as an example.
A memory 201, the memory 201 being accessible by the CPU202, the peripheral interface 203, and the like, the memory 201 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 203, said peripheral interface 203 may connect input and output peripherals of the device to the CPU202 and the memory 201.
The sensor 213 may be an accelerometer and a gyroscope integrated with the content of the terminal device, and the data collected by the sensor 213 may be accessed by the CPU 202.
An I/O subsystem 209, the I/O subsystem 209 may connect input and output peripherals on the device, such as a touch screen 212 and other input/control devices 210, to the peripheral interface 203. The I/O subsystem 209 may include a display controller 2091 and one or more input controllers 2092 for controlling the other input/control devices 210. Where one or more input controllers 2092 receive electrical signals from or transmit electrical signals to other input/control devices 210, the other input/control devices 210 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 2092 may be coupled to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 212, the touch screen 212 being an input interface and an output interface between the user terminal and the user, displaying visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 2091 within the I/O subsystem 209 receives electrical signals from the touch screen 212 or transmits electrical signals to the touch screen 212. The touch screen 212 detects a contact on the touch screen, and the display controller 2091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 212, i.e., implements a human-machine interaction, and the user interface object displayed on the touch screen 212 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 205 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, the RF circuitry 205 receives and transmits RF signals, also referred to as electromagnetic signals, through which the RF circuitry 205 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 205 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 206 is mainly used to receive audio data from the peripheral interface 203, convert the audio data into an electric signal, and transmit the electric signal to the speaker 211.
And a speaker 211 for reproducing the voice signal received by the handset from the wireless network through the RF circuit 205 into sound and playing the sound to the user.
And the power management chip 208 is used for supplying power and managing power to the hardware connected with the CPU202, the I/O subsystem and the peripheral interface.
The task switching device of the terminal device and the terminal device provided in the above embodiments can execute the task switching method of the terminal device provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For details of the technology that are not described in detail in the above embodiments, reference may be made to a task switching method of a terminal device provided in any embodiment of the present invention.
An embodiment of the present application further provides a storage medium containing terminal device executable instructions, where the terminal device executable instructions are executed by a terminal device processor to perform a task switching method, and the method includes:
acquiring state parameters of the terminal equipment through a sensor;
judging whether the state parameters meet task switching conditions, if so, determining a current jump task according to the state parameters and a task sequence in a task stack;
and switching the program interface corresponding to the jump task to the foreground.
In a possible embodiment, before the determining whether the state parameter satisfies the task switching condition, the method further includes:
judging whether the terminal equipment is in a bright screen state held by a user;
correspondingly, the judging whether the state parameter meets the task switching condition includes:
and if the terminal equipment is in a bright screen state held by a user, judging whether the state parameters meet task switching conditions.
In a possible embodiment, after switching the program interface corresponding to the jump task to the foreground, the method further includes:
monitoring the operation event of the program interface, and switching the jump task to the stack top of the task stack if the operation event is triggered.
In one possible embodiment, if the operation event is not triggered and an adjustment parameter meeting the task switching condition is detected, determining the current jump task according to the adjustment parameter and the task sequence in the task stack.
In one possible embodiment, the adjustment parameters include a jump number adjustment parameter determined according to data collected by the acceleration sensor and a jump direction adjustment parameter determined according to data collected by the gyroscope.
In a possible embodiment, the determining the current jump task according to the state parameter and the task sequence in the task stack includes:
determining task switching skip times according to the state parameters;
and determining the current jump task according to the task switching jump times and the task sequence in the task stack.
In a possible embodiment, the determining whether the state parameter satisfies a task switching condition includes:
and judging whether the acceleration change parameter of the terminal equipment meets the task switching condition.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application and containing computer-executable instructions is not limited to the task switching method operations described above, and may also perform related operations in the task switching method provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. The task switching method is characterized by comprising the following steps:
acquiring state parameters of terminal equipment through a sensor, wherein the state parameters are parameters representing terminal equipment displacement and attitude change generated in the moving process of the terminal equipment;
judging whether the state parameters meet task switching conditions, if so, determining a current jump task according to the state parameters and a task sequence in a task stack;
switching a program interface corresponding to the skip task to a foreground;
monitoring an operation event of the program interface, and switching the jump task to the stack top of the task stack if the operation event is triggered;
if the operation event is not triggered and an adjusting parameter meeting the task switching condition is detected, determining a current jump task according to the adjusting parameter and a task sequence in a task stack; the adjustment parameters comprise a jump time adjustment parameter and a jump direction adjustment parameter, wherein the jump time adjustment parameter represents the times of switching and jumping tasks in sequence by taking the position of a current interface running program of the terminal equipment in a task stack as a jump starting point.
2. The method of claim 1, wherein before determining whether the state parameter satisfies a task switching condition, the method further comprises:
judging whether the terminal equipment is in a bright screen state held by a user;
correspondingly, the judging whether the state parameter meets the task switching condition includes:
and if the terminal equipment is in a bright screen state held by a user, judging whether the state parameters meet task switching conditions.
3. The method of claim 1, wherein the jump number adjustment parameter is determined according to data collected by an acceleration sensor, and the jump direction adjustment parameter is determined according to data collected by a gyroscope.
4. The method according to any one of claims 1-2, wherein said determining a current jump task from said state parameters and a task order in a task stack comprises:
determining task switching skip times according to the state parameters;
and determining the current jump task according to the task switching jump times and the task sequence in the task stack.
5. The method according to any one of claims 1-2, wherein the determining whether the state parameter satisfies a task switching condition comprises:
and judging whether the acceleration change parameter of the terminal equipment meets the task switching condition.
6. A task switching apparatus, comprising:
the system comprises a parameter collection module, a state parameter acquisition module and a state parameter processing module, wherein the parameter collection module is used for acquiring the state parameter of the terminal equipment through a sensor, and the state parameter is a parameter which is generated in the moving process of the terminal equipment and represents the displacement and the posture change of the terminal equipment;
the task processing module is used for judging whether the state parameters meet task switching conditions or not, and if so, determining the current jump task according to the state parameters and the task sequence in the task stack;
the task switching module is used for switching the program interface corresponding to the skip task to a foreground;
the second monitoring module is used for monitoring the operation event of the program interface, and switching the jump task to the stack top of the task stack if the operation event is triggered;
the task processing module is further configured to: if the operation event is not triggered and an adjusting parameter meeting the task switching condition is detected, determining a current jump task according to the adjusting parameter and a task sequence in a task stack; the adjustment parameters comprise a jump time adjustment parameter and a jump direction adjustment parameter, wherein the jump time adjustment parameter represents the times of switching and jumping tasks in sequence by taking the position of a current interface running program of the terminal equipment in a task stack as a jump starting point.
7. A terminal device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the task switching method according to any of claims 1 to 5 when executing the computer program.
8. A storage medium containing terminal device-executable instructions, which when executed by a terminal device processor, are configured to perform the task switching method of any one of claims 1-5.
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 CN108076223A (en) 2018-05-25
CN108076223B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900695B (en) * 2018-05-29 2021-04-02 维沃移动通信有限公司 Display processing method, terminal equipment and computer readable storage medium
CN111371816A (en) * 2018-12-25 2020-07-03 上海亮衡信息科技有限公司 Communication method, system and communication equipment based on condition triggering
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

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

Also Published As

Publication number Publication date
CN108076223A (en) 2018-05-25

Similar Documents

Publication Publication Date Title
CN108614722B (en) Application program preloading method and device, storage medium and terminal
EP3579104B1 (en) Method and apparatus for establishing an application prediction model, storage medium and terminal
CN108363593B (en) Application program preloading method and device, storage medium and terminal
CN108762843B (en) Application program preloading method and device, storage medium and intelligent terminal
CN108595230B (en) Application program preloading method and device, storage medium and terminal
CN108076223B (en) Task switching method and device, terminal equipment and storage medium
CN107734616B (en) Application program closing method and device, storage medium and electronic equipment
EP3575961B1 (en) Method and apparatus for updating application prediction model, storage medium, and terminal
CN108804153B (en) Application program preloading method and device, storage medium and terminal
CN107484231B (en) Screen parameter adjusting method, device, terminal and computer readable storage medium
CN108038231B (en) Log processing method and device, terminal equipment and storage medium
CN108762831B (en) Application program preloading method and device, storage medium and terminal
CN108153647B (en) Log processing method and device, terminal equipment and storage medium
CN108958828B (en) Application program preloading method and device, storage medium and terminal
CN108647056B (en) Application program preloading method and device, storage medium and terminal
CN104572322A (en) Method for operating terminal screen
CN108111676B (en) Application program control method, mobile terminal and computer readable storage medium
CN104572071A (en) Terminal
CN106776259B (en) Mobile terminal frame rate detection method and device and mobile terminal
CN108762613B (en) State icon display method and mobile terminal
CN108055635B (en) Position information acquisition method and device, storage medium and terminal
CN110830063B (en) Interference control method of audio service and terminal
CN109933267B (en) Method for controlling terminal equipment and terminal equipment
CN108089935B (en) Application program management method and mobile terminal
CN108196699B (en) Page switching method and equipment

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