CN114285935A - Terminal control method and device, storage medium and electronic equipment - Google Patents

Terminal control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114285935A
CN114285935A CN202010983465.9A CN202010983465A CN114285935A CN 114285935 A CN114285935 A CN 114285935A CN 202010983465 A CN202010983465 A CN 202010983465A CN 114285935 A CN114285935 A CN 114285935A
Authority
CN
China
Prior art keywords
level signal
application processor
screen
state
display screen
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
CN202010983465.9A
Other languages
Chinese (zh)
Other versions
CN114285935B (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.)
Nanjing Coolpad Software Technology Co Ltd
Original Assignee
Nanjing Coolpad Software Technology Co 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 Nanjing Coolpad Software Technology Co Ltd filed Critical Nanjing Coolpad Software Technology Co Ltd
Priority to CN202010983465.9A priority Critical patent/CN114285935B/en
Publication of CN114285935A publication Critical patent/CN114285935A/en
Application granted granted Critical
Publication of CN114285935B publication Critical patent/CN114285935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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 application discloses a terminal control method, a terminal control device, a storage medium and electronic equipment, and belongs to the technical field of communication. When the display screen needs to be switched from the screen-off state to the screen-on state, the application processor sends a first level signal to the coprocessor through the first GPIO general pin, receives a second level signal from the coprocessor through the second GPIO, and responds to the second level signal to switch the display screen to the screen-on state. The coprocessor receives a first level signal from the application processor, turns off a light emitter of the proximity sensor in response to the first level signal, and sends a second level signal to the application processor. Therefore, the processor switches the display screen and the light emitter in an interruption mode, the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.

Description

Terminal control method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for controlling a terminal, a storage medium, and an electronic device.
Background
At present, with the rapid development of science and technology, terminals with display screens are widely applied, and when the terminals with the display screens are used, the terminals can be operated and controlled through the display screens. In order to prevent misoperation of a display screen and save power consumption of the terminal due to the fact that the display screen is too close to the terminal with the display screen, the terminal can close the display screen when the display screen is close to an object, and can light the display screen when the display screen is far away from the object. The prior art generally uses a sensor with a light emitter to detect the distance, because the sensor and the display screen are respectively controlled by different processors, the communication between the different processors can cause the problem of delay, and if the display screen and the light emitter are simultaneously lighted, the display screen can even be burnt. Therefore, how to reduce the delay of switching between the display screen and the light emitter of the sensor is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a terminal control method and device, a storage medium and electronic equipment, which can control the working state between a display screen and a light emitter of a sensor and reduce the switching delay time. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for controlling a terminal, including:
when the display screen needs to be switched from a screen-off state to a screen-on state, the application processor sends a first level signal to the coprocessor through the first GPIO general pin; wherein the first level signal is used to instruct the co-processor to turn off a light emitter of a proximity sensor and to send a second level signal to the application processor;
the application processor receives the second level signal from the coprocessor through a second GPIO;
the application processor switches the display screen to a bright screen state in response to the second level signal.
In a second aspect, an embodiment of the present application provides another method for controlling a terminal, including:
the coprocessor receives a first level signal from the application processor;
turning off a light emitter of a proximity sensor in response to the first level signal;
sending a second level signal to the application processor; the second level signal is used for indicating the application processor to control the display screen to be switched from the screen-off state to the screen-on state.
In a third aspect, an embodiment of the present application provides a control apparatus for a terminal, where the apparatus includes:
the sending module is used for sending a first level signal to the coprocessor through the first GPIO general pin when the display screen needs to be switched from a screen-off state to a screen-on state by the application processor; wherein the first level signal is used to instruct the co-processor to turn off a light emitter of a proximity sensor and to send a second level signal to the application processor;
a receiving module, configured to receive, by the application processor, the second level signal from the coprocessor through a second GPIO;
and the switching module is used for responding to the second level signal by the application processor to switch the display screen into a bright screen state.
In a fourth aspect, an embodiment of the present application provides another apparatus for controlling a terminal, where the apparatus includes:
the receiving module is used for the coprocessor to receive the first level signal from the application processor;
a response module for turning off a light emitter of a proximity sensor in response to the first level signal;
a sending module, configured to send a second level signal to the application processor; the second level signal is used for indicating the application processor to control the display screen to be switched from the screen-off state to the screen-on state.
In a fifth aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a sixth aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
when the control method, the control device, the storage medium and the electronic equipment of the terminal work, the application processor sends a first level signal to the coprocessor through the first GPIO general pin when the display screen needs to be switched from the screen-off state to the screen-on state; wherein the first level signal is used to instruct the co-processor to turn off a light emitter of a proximity sensor and to send a second level signal to the application processor; the application processor receives the second level signal from the coprocessor through a second GPIO; the application processor switches the display screen to a bright screen state in response to the second level signal. The coprocessor receives a first level signal from the application processor; turning off a light emitter of a proximity sensor in response to the first level signal; sending a second level signal to the application processor; the second level signal is used for indicating the application processor to control the display screen to be switched from the screen-off state to the screen-on state. The processor switches the display screen and the light emitter in an interrupt mode, so that the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic diagram illustrating a method for controlling a terminal according to an embodiment of the present disclosure;
fig. 1b is an interaction diagram of a control method of a terminal according to an embodiment of the present disclosure;
fig. 1c is a first flowchart of a control method of a terminal according to an embodiment of the present disclosure;
fig. 2 is a second flowchart of a control method of a terminal according to an embodiment of the present disclosure;
fig. 3 is a third flowchart of a control method for a terminal according to an embodiment of the present application;
fig. 4 is a fourth flowchart illustrating a control method of a terminal according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a control device of a terminal according to an embodiment of the present application;
fig. 6 is another schematic structural diagram of a control device of a terminal according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The following description refers to the accompanying drawings in which like numerals refer to the same or similar elements throughout the different views, unless otherwise specified. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In order to solve the above-mentioned problem that communication between different processors causes delay due to the fact that the sensor and the display screen are respectively controlled by different processors, and even the display screen is burnt if the display screen and the light emitter are simultaneously lighted, a control method of a terminal is particularly provided. The computer system can be computer equipment with a touch display screen such as a smart phone, a notebook computer and a tablet computer.
In the following method embodiments, for convenience of description, only the main body of execution of each step is described as the terminal device.
The following describes a control method of a terminal according to an embodiment of the present application in detail with reference to fig. 1 to 4.
Please refer to fig. 1a, which is a schematic diagram illustrating a method for controlling a terminal according to an embodiment of the present application. An Application Processor (APPS) is a very large scale integrated circuit (lsi) which extends audio and video functions and a dedicated interface on the basis of a Central Processing Unit (CPU), an Advanced Digital Signal Processor (ADSP) is a coprocessor, a display screen is controlled by the APPS, an optical transmitter of a proximity sensor is controlled by the ADSP, the APPS sends the working state of the display screen to the ADSP in the form of a level Signal through a first General-purpose pin (GPIO), and the ADSP sends the working state of the optical transmitter of the proximity sensor to the APPS in the form of a level Signal through a second GPIO.
Please refer to fig. 1b, which is an interaction diagram of a control method of a terminal according to an embodiment of the present application. And the application processor and the coprocessor are interacted through GPIO (general purpose input/output), and the switching between the process display screen and the light emitter of the proximity sensor is controlled.
Please refer to fig. 1c, which is a first flowchart of a terminal control method according to an embodiment of the present disclosure. The method may comprise the steps of:
s101, when the display screen needs to be switched from a screen-off state to a screen-on state, the application processor sends a first level signal to the coprocessor through the first GPIO general pin.
Generally, a processor is a final execution unit for interpreting computer instructions and processing data in computer software, and a plurality of processors may be provided in a terminal device, for example: a primary controlling application processor and a secondary controlling co-processor. The display screen refers to input/output equipment of terminal equipment, is a display tool which displays a certain electronic file on a screen through specific transmission equipment and reflects the electronic file to human eyes, and in the embodiment of the application, the display screen refers to a touch display screen which can replace a mechanical button and is controlled through a tactile feedback system on the screen, for example: infrared display screen, resistance-type display screen and capacitive display screen etc.. The screen-off state and the screen-on state refer to two working states of the display screen, and the display screen is always switched between the two working states. The GPIO is a general-purpose pin used to connect different external devices or circuits, and the processor can control the hardware by sending signals through the GPIO. A coprocessor refers to a processor that is used to work with an auxiliary application processor, such as: an application processor for controlling terminal operation and a coprocessor for controlling transmission information. The first level signal is that after the display screen is switched to the lighting state, the application processor sends a high level signal to the first GPIO, so that the first GPIO level signal is changed into high level.
S102, the application processor receives the second level signal from the coprocessor through a second GPIO.
Generally, the application processor determines a level signal on the GPIO by reading a register corresponding to the second GPIO, and the level signal is a low level signal sent by the coprocessor and written into a relevant register to control the level change on the GPIO.
S103, the application processor responds to the second level signal to switch the display screen to be in a bright screen state.
Generally, the application processor receives the second low level signal sent by the coprocessor, and determines whether a preset interrupt mode condition is met, for example: rising edge, falling edge, double edge, high level trigger and low level trigger. If yes, the application processor executes the recovery interrupt program and lights the display screen.
According to the above, when the display screen needs to be switched from the screen-off state to the screen-on state, the application processor sends the first level signal to the coprocessor through the first GPIO general pin. The application processor receives the second level signal from the coprocessor through a second GPIO. The application processor switches the display screen to a bright screen state in response to the second level signal. The application processor controls the working state of the display screen in an interrupt mode, so that the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.
Referring to fig. 2, a second flow chart of a terminal control method is provided in the embodiment of the present application. The method may comprise the steps of:
s201, the coprocessor receives a first level signal from the application processor.
Typically, the coprocessor determines that the GPIO is high by reading the second GPIO related register, which is sent by the application processor, and writing to the second GPIO related register to indicate the second GPIO level change.
And S202, turning off a light emitter of the proximity sensor in response to the first level signal.
Generally, after the coprocessor receives the first low level signal, if it is determined that a preset interrupt mode condition is satisfied, the coprocessor executes a related configuration to turn off the light emitter of the proximity sensor.
And S203, sending a second level signal to the application processor.
Typically, the coprocessor changes the GPIO up level by writing a second low level signal to a second GPIO related register, and the application processor may receive the second low level signal from the coprocessor by reading the second GPIO related register.
As can be seen from the above, the coprocessor receives a first level signal from the application processor, turns off the light emitter of the proximity sensor in response to the first level signal, and sends a second level signal to the application processor. The coprocessor controls the working state of the light emitter in an interrupt mode, the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.
Referring to fig. 3, a third flowchart of a method for controlling a terminal is provided in an embodiment of the present application. The method may comprise the steps of:
s301, sending a first level signal to the coprocessor through the first GPIO general pin.
Generally, an application processor sends a first high-level signal to a coprocessor through a first GPIO, firstly sets the GPIO to be in an input state, sends the first high-level signal to be written into a register related to the first GPIO, controls the first GPIO to be changed from a low level to a high level, and the coprocessor receives the first high-level signal by reading the register related to the first GPIO.
S302, receiving the second level signal from the coprocessor.
Generally, after the coprocessor indicates that the proximity sensor is turned off, the coprocessor sends a second low-level signal to the application processor through the second GPIO, and the application processor receives the second low-level signal through the second GPIO.
S303, receiving an interrupt recovery command.
In general, the interrupt recovery instruction switches the device from the interrupt state to the recovery state, for example: and the application processor receives the interrupt recovery instruction to switch the display screen from the screen-off state to the lighting state. The application processor receives a second low level signal sent by the second GPIO, and judges whether the level change of the second GPIO meets a preset interrupt mode, for example: and the application processor detects that the second GPIO is changed from high level to low level, the preset falling edge of the application processor triggers an interrupt mode, and an interrupt instruction is sent to control the display screen to be off and interrupted.
And S304, reading the running state data saved in the stack in response to the interrupt recovery instruction.
Generally, an interrupt refers to that when some unexpected situations occur in the running process of a computer and a host needs to intervene, the machine can automatically stop a running program and transfer the running program into a program for processing a new situation, and after the processing is finished, the original suspended program is returned to continue running. When the application processor is in interrupt, it automatically obtains the entry address of the interrupt service subprogram, executes the interrupt service subprogram, and reads the data stored in the stack, for example: code segment register (CS), Instruction Pointer register (IP), and Instruction Pointer register (32-bit) (EIP).
S305, after the register corresponding to the display screen is subjected to numerical value recovery based on the running state data, the display screen is switched to a bright screen state.
Generally, after reading the running state data, the application processor writes the running state data into a corresponding register of the display screen, and executes a program for lighting the display screen based on the data, so as to switch the display screen to a screen-lighting state.
S306, receiving an interrupt request signal.
Generally, the interrupt request signal is an interrupt request signal that the application processor determines whether the interrupt mode satisfies a preset condition, and if so, the application processor sends an interrupt request signal to the display screen to instruct the display screen to interrupt, for example: and the interrupt mode is GPIO falling edge interrupt, the interrupt condition is determined to be met, and the application processor sends an interrupt request signal. When one interrupt source needs the processor to perform interrupt service for the interrupt source, an interrupt request signal is output, an interrupt request trigger of the interrupt control system is set, and the application processor is requested to be interrupted. In the embodiment of the present application, the terminal controls to switch the display screen from the lighting state to the screen-off state through the displacement sensor, for example: when a user takes out the mobile phone and approaches to ears, the displacement sensor detects that the displacement form of the mobile phone meets a preset displacement condition, the coprocessor sends a level signal to the GPIO, the application processor detects that the level change of the GPIO is falling edge interrupt trigger, and the application processor sends an interrupt request signal.
S307, responding to the interrupt request signal, and pushing the running state data of the display screen into a stack for saving.
Generally, after receiving the interrupt request signal, the application processor pushes the current operating state data in the register related to the second GPIO to the stack, so that the application processor can return to the original interrupted program for execution after the interrupt processing is completed, that is, the interrupt is resumed.
And S308, sending a third level signal to the coprocessor through the first GPIO general pin.
Generally, after the display screen is switched from the bright screen state to the off screen state, the display screen still needs to wait for a certain preset time, because the display screen is off and is lighted and also consumes a certain time, for example: the screen-off time of the display screen is 10 milliseconds, the screen-on time is 8 milliseconds, and the co-processor cannot immediately turn on the light emitter of the proximity sensor. And then the application processor sends a third low-level signal to the coprocessor through the first GPIO.
And S309, receiving a fourth level signal from the coprocessor through a second GPIO.
Generally, after receiving the third low level signal, the coprocessor turns on the light emitter of the proximity sensor, and sends a fourth high level signal to the application processor through the second GPIO.
As can be seen from the above, a first GPIO general pin is used to send a first level signal to a coprocessor, receive a second level signal from the coprocessor, receive an interrupt recovery instruction, read running state data stored in a stack in response to the interrupt recovery instruction, perform numerical value recovery on a register corresponding to a display screen based on the running state data, switch the display screen to a bright screen state, receive an interrupt request signal, press the running state data of the display screen into the stack for storage in response to the interrupt request signal, send a third level signal to the coprocessor via the first GPIO general pin, and receive a fourth level signal from the coprocessor via a second GPIO. The application processor controls the working state of the display screen in an interrupt mode, so that the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.
Please refer to fig. 4, which is a fourth flowchart illustrating a control method of a terminal according to an embodiment of the present application. The method may comprise the steps of:
s401, the coprocessor receives a first level signal from the application processor.
Typically, the coprocessor determines by reading a first GPIO related register, a first high signal written into the first GPIO related register by the application processor.
And S402, turning off a light emitter of the proximity sensor in response to the first level signal.
In general, a proximity sensor refers to a detection device for measuring a distance between objects, generally with a light emitter, which determines the distance by optical principles, such as: infrared laser emitters and ultraviolet light emitters, etc. The coprocessor detects a first GPIO level change, for example: detecting that the level change is falling edge interrupt trigger, determining that a preset interrupt trigger condition is met, receiving an interrupt instruction request signal, responding to the interrupt request signal, pushing the running state data of the light emitter of the proximity sensor into a stack for storage, and closing the light emitter of the proximity sensor.
And S403, sending a second level signal to the application processor.
Generally, after the co-processor turns off the light emitter of the proximity sensor, the co-processor sends a second low level signal to the application processor, and the application processor determines the working state of the display screen according to the second low level signal.
S404, the coprocessor receives a third level signal from the application processor.
Typically, the coprocessor determines the third low level signal by reading the first GPIO related register, wherein the third low level signal is changed by the application processor writing into the first GPIO related register.
And S405, responding to the third level signal to turn on a light emitter of the proximity sensor.
Typically, the coprocessor detects a first GPIO level change, such as: detecting that the change mode is rising edge interrupt triggering, determining that preset interrupt triggering conditions are not met, receiving an interrupt recovery instruction, responding to the interrupt recovery instruction, reading operation state data of the light emitter of the proximity sensor, stored in a stack, and turning on the light emitter of the proximity sensor after the display screen is completely turned off for a long time.
And S406, sending a fourth level signal to the application processor.
Generally, after the co-processor turns on the light emitter of the proximity sensor, it sends a fourth high level signal to the application processor, and the application processor can determine the working state of the display screen according to the level signal.
As can be seen from the above, the coprocessor receives a first level signal from the application processor, turns off the light emitter of the proximity sensor in response to the first level signal, and sends a second level signal to the application processor, and the coprocessor receives a third level signal from the application processor, turns on the light emitter of the proximity sensor in response to the third level signal, and sends a fourth level signal to the application processor. The coprocessor controls the working state of the light emitter in an interrupt mode, the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 5, a schematic structural diagram of a control device of a terminal according to an exemplary embodiment of the present application is shown, and hereinafter referred to as the control device 5. The control means 5 may be implemented as all or part of the terminal by software, hardware or a combination of both. The method comprises the following steps:
the sending module 501 is configured to send a first level signal to the coprocessor through a first GPIO general pin when the display screen needs to be switched from a screen-off state to a screen-on state; wherein the first level signal is used to instruct the co-processor to turn off a light emitter of a proximity sensor and to send a second level signal to the application processor;
a receiving module 502, configured to receive, by the application processor, the second level signal from the coprocessor through a second GPIO;
a switching module 503, configured to switch the display screen to a bright screen state by the application processor in response to the second level signal.
Optionally, the switching module 503 further includes:
the processing unit is used for controlling the display screen to be switched to the screen-off state after preset time when the display screen needs to be switched to the screen-off state from the screen-on state; sending a third level signal to a coprocessor through the first GPIO; wherein the third level signal is used for instructing the coprocessor to turn on the optical transmitter after the preset duration and to send a fourth level signal to the application processor; receiving a fourth level signal from the coprocessor through the second GPIO.
A reading unit for receiving an interrupt resume instruction; reading running state data saved in a stack in response to the interrupt recovery instruction; and switching the display screen to a bright screen state after the register corresponding to the display screen is subjected to numerical value recovery based on the running state data.
A write unit for receiving an interrupt request signal; pushing the running state data of the display screen to a stack for saving in response to the interrupt request signal; and controlling the display screen to be switched to a screen extinguishing state after a preset time length.
The embodiment of the present application and the embodiment of the method in fig. 1c or fig. 3 are based on the same concept, and the technical effects brought by the embodiment are also the same, and the specific process may refer to the description of the embodiment of the method in fig. 1c or fig. 3, and will not be described again here.
The device 5 may be a field-programmable gate array (FPGA), an application-specific integrated chip, a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit, a Micro Controller Unit (MCU), or a Programmable Logic Device (PLD) or other integrated chips.
When the scheme of the embodiment of the application is executed, when the display screen needs to be switched from the screen-off state to the screen-on state, the application processor sends a first level signal to the coprocessor through the first GPIO general pin. The application processor receives the second level signal from the coprocessor through a second GPIO. The application processor switches the display screen to a bright screen state in response to the second level signal. The application processor controls the working state of the display screen in an interrupt mode, so that the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.
Referring to fig. 6, another schematic structural diagram of a control device of a terminal according to an exemplary embodiment of the present application is shown, which is hereinafter referred to as the control device 6. The control means 6 may be implemented as all or part of the terminal by software, hardware or a combination of both. The method comprises the following steps:
a receiving module 601, configured to receive a first level signal from an application processor by a coprocessor;
a response module 602 for turning off a light emitter of a proximity sensor in response to the first level signal;
a sending module 603, configured to send a second level signal to the application processor; the second level signal is used for indicating the application processor to control the display screen to be switched from the screen-off state to the screen-on state.
Optionally, the response module 602 further includes:
the processing unit is used for the coprocessor to receive a third level signal from the application processor; turning on a light emitter of the proximity sensor in response to the third level signal; transmitting a fourth level signal to the application processor; the fourth level signal is used for indicating the application processor to control the display screen to be switched from a bright screen state to a dark screen state.
The embodiment of the present application and the embodiment of the method in fig. 2 or fig. 4 are based on the same concept, and the technical effects brought by the embodiment are also the same, and the specific process may refer to the description of the embodiment of the method in fig. 2 or fig. 4, and will not be described again here.
The device 6 may be a field-programmable gate array (FPGA), an application-specific integrated chip, a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit, a Micro Controller Unit (MCU), or a Programmable Logic Device (PLD) or other integrated chips.
When the scheme of the embodiment of the application is executed, the coprocessor receives a first level signal from the application processor, responds to the first level signal to turn off the light emitter of the proximity sensor, and sends a second level signal to the application processor. The coprocessor controls the working state of the light emitter in an interrupt mode, the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the above method steps, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 1c to fig. 4, which are not described herein again.
The present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the template control method according to the above embodiments.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 7, the electronic device 7 may include: at least one processor 701, at least one network interface 704, a user interface 703, memory 705, at least one communication bus 702.
Wherein a communication bus 702 is used to enable connective communication between these components.
The user interface 703 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 703 may also include a standard wired interface and a standard wireless interface.
The network interface 704 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 701 may include one or more processing cores, among other things. The processor 701 connects various parts within the overall terminal 700 using various interfaces and lines, and performs various functions of the terminal 700 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 705, as well as calling data stored in the memory 705. Optionally, the processor 701 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 701 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 701, and may be implemented by a single chip.
The Memory 705 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 705 includes a non-transitory computer-readable medium. The memory 705 may be used to store instructions, programs, code sets, or instruction sets. The memory 705 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 705 may optionally be at least one memory device located remotely from the processor 701. As shown in fig. 7, the memory 705, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a control application of the terminal.
In the electronic device 700 shown in fig. 7, the user interface 703 is mainly used as an interface for providing input for a user to obtain data input by the user; the processor 701 may be configured to call a control application of the terminal stored in the memory 705, and specifically perform the following operations:
when the display screen needs to be switched from a screen-off state to a screen-on state, the application processor sends a first level signal to the coprocessor through the first GPIO general pin; wherein the first level signal is used to instruct the co-processor to turn off a light emitter of a proximity sensor and to send a second level signal to the application processor;
the application processor receives the second level signal from the coprocessor through a second GPIO;
the application processor switches the display screen to a bright screen state in response to the second level signal.
The present application program can also perform the following operations:
the coprocessor receives a first level signal from the application processor;
turning off a light emitter of a proximity sensor in response to the first level signal;
sending a second level signal to the application processor; the second level signal is used for indicating the application processor to control the display screen to be switched from the screen-off state to the screen-on state.
In one embodiment, processor 501 performs the method, further comprising:
when the display screen needs to be switched from a bright screen state to an off screen state, controlling the display screen to be switched to the off screen state after a preset time;
sending a third level signal to a coprocessor through the first GPIO; wherein the third level signal is used for instructing the coprocessor to turn on the optical transmitter after the preset duration and to send a fourth level signal to the application processor;
receiving a fourth level signal from the coprocessor through the second GPIO.
In one embodiment, processor 501 executes the application processor to switch the display screen to a bright screen state in response to the second level signal, including:
receiving an interrupt recovery instruction;
reading running state data saved in a stack in response to the interrupt recovery instruction;
and switching the display screen to a bright screen state after the register corresponding to the display screen is subjected to numerical value recovery based on the running state data.
In one embodiment, the controlling of the display screen to switch to the screen-off state after the preset time period by the processor 501 includes:
receiving an interrupt request signal;
pushing the running state data of the display screen to a stack for saving in response to the interrupt request signal;
and controlling the display screen to be switched to a screen extinguishing state after a preset time length.
In one embodiment, processor 501 performs the method, further comprising:
the coprocessor receives a third level signal from the application processor;
turning on a light emitter of the proximity sensor in response to the third level signal;
transmitting a fourth level signal to the application processor; the fourth level signal is used for indicating the application processor to control the display screen to be switched from a bright screen state to a dark screen state.
The technical concept of the embodiment of the present application is the same as that of fig. 1c to 4, and the specific process may refer to the method embodiment of fig. 1c to 4, which is not described herein again.
In the embodiment of the application, when the display screen needs to be switched from the screen-off state to the screen-on state, the application processor sends a first level signal to the coprocessor through the first GPIO general pin; wherein the first level signal is used to instruct the co-processor to turn off a light emitter of a proximity sensor and to send a second level signal to the application processor; the application processor receives the second level signal from the coprocessor through a second GPIO; the application processor switches the display screen to a bright screen state in response to the second level signal. The coprocessor receives a first level signal from the application processor; turning off a light emitter of a proximity sensor in response to the first level signal; sending a second level signal to the application processor; the second level signal is used for indicating the application processor to control the display screen to be switched from the screen-off state to the screen-on state. The processor switches the display screen and the light emitter in an interrupt mode, so that the problem of overlarge delay caused by interaction between different processor bottom layers in the related technology is solved, the delay of terminal switching is reduced, and the endurance time is prolonged.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (11)

1. A method for controlling a terminal, the method comprising:
when the display screen needs to be switched from a screen-off state to a screen-on state, the application processor sends a first level signal to the coprocessor through the first GPIO general pin; wherein the first level signal is used to instruct the co-processor to turn off a light emitter of a proximity sensor and to send a second level signal to the application processor;
the application processor receives the second level signal from the coprocessor through a second GPIO;
the application processor switches the display screen to a bright screen state in response to the second level signal.
2. The control method according to claim 1, characterized by further comprising:
when the display screen needs to be switched from a bright screen state to an off screen state, controlling the display screen to be switched to the off screen state after a preset time;
sending a third level signal to a coprocessor through the first GPIO; wherein the third level signal is used for instructing the coprocessor to turn on the optical transmitter after the preset duration and to send a fourth level signal to the application processor;
receiving a fourth level signal from the coprocessor through the second GPIO.
3. The control method of claim 1, wherein the application processor switching the display screen to a bright screen state in response to the second level signal comprises:
receiving an interrupt recovery instruction;
reading running state data saved in a stack in response to the interrupt recovery instruction;
and switching the display screen to a bright screen state after the register corresponding to the display screen is subjected to numerical value recovery based on the running state data.
4. The control method according to claim 2, wherein the controlling the display screen to switch to the screen-off state after a preset time period comprises:
receiving an interrupt request signal;
pushing the running state data of the display screen to a stack for saving in response to the interrupt request signal;
and controlling the display screen to be switched to a screen extinguishing state after a preset time length.
5. The control method according to claim 2, wherein the first level signal is high level, the second level signal is low level, the third level signal is low level, and the fourth level signal is high level.
6. A method for controlling a terminal, the method comprising:
the coprocessor receives a first level signal from the application processor;
turning off a light emitter of a proximity sensor in response to the first level signal;
sending a second level signal to the application processor; the second level signal is used for indicating the application processor to control the display screen to be switched from the screen-off state to the screen-on state.
7. The control method according to claim 6, characterized by further comprising:
the coprocessor receives a third level signal from the application processor;
turning on a light emitter of the proximity sensor in response to the third level signal;
transmitting a fourth level signal to the application processor; the fourth level signal is used for indicating the application processor to control the display screen to be switched from a bright screen state to a dark screen state.
8. A control apparatus of a terminal, comprising:
the sending module is used for sending a first level signal to the coprocessor through the first GPIO general pin when the display screen needs to be switched from a screen-off state to a screen-on state by the application processor; wherein the first level signal is used to instruct the co-processor to turn off a light emitter of a proximity sensor and to send a second level signal to the application processor;
a receiving module, configured to receive, by the application processor, the second level signal from the coprocessor through a second GPIO;
and the switching module is used for responding to the second level signal by the application processor to switch the display screen into a bright screen state.
9. A control apparatus of a terminal, characterized in that the method comprises:
the receiving module is used for the coprocessor to receive the first level signal from the application processor;
a response module for turning off a light emitter of a proximity sensor in response to the first level signal;
a sending module, configured to send a second level signal to the application processor; the second level signal is used for indicating the application processor to control the display screen to be switched from the screen-off state to the screen-on state.
10. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
11. An electronic device, comprising: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
CN202010983465.9A 2020-09-17 2020-09-17 Terminal control method and device, storage medium and electronic equipment Active CN114285935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010983465.9A CN114285935B (en) 2020-09-17 2020-09-17 Terminal control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010983465.9A CN114285935B (en) 2020-09-17 2020-09-17 Terminal control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114285935A true CN114285935A (en) 2022-04-05
CN114285935B CN114285935B (en) 2023-09-15

Family

ID=80867374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010983465.9A Active CN114285935B (en) 2020-09-17 2020-09-17 Terminal control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114285935B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578253A (en) * 2022-05-31 2023-08-11 广州星际悦动股份有限公司 Display control method, display control device, storage medium and oral care system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020423A (en) * 2016-05-25 2016-10-12 努比亚技术有限公司 Screen control device and method for terminal
WO2018006794A1 (en) * 2016-07-08 2018-01-11 深圳市万普拉斯科技有限公司 Brightness adjustment method and apparatus, and mobile terminal and computer storage medium
CN108182085A (en) * 2017-12-27 2018-06-19 上海传英信息技术有限公司 Awakening method, device, terminal and the storage medium of terminal screen
CN109271019A (en) * 2018-08-22 2019-01-25 Oppo广东移动通信有限公司 Close to event detection element method for handover control and device
CN110351418A (en) * 2018-04-02 2019-10-18 广东欧珀移动通信有限公司 Screen control method, device, mobile terminal and computer-readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020423A (en) * 2016-05-25 2016-10-12 努比亚技术有限公司 Screen control device and method for terminal
WO2018006794A1 (en) * 2016-07-08 2018-01-11 深圳市万普拉斯科技有限公司 Brightness adjustment method and apparatus, and mobile terminal and computer storage medium
CN108182085A (en) * 2017-12-27 2018-06-19 上海传英信息技术有限公司 Awakening method, device, terminal and the storage medium of terminal screen
CN110351418A (en) * 2018-04-02 2019-10-18 广东欧珀移动通信有限公司 Screen control method, device, mobile terminal and computer-readable medium
CN109271019A (en) * 2018-08-22 2019-01-25 Oppo广东移动通信有限公司 Close to event detection element method for handover control and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578253A (en) * 2022-05-31 2023-08-11 广州星际悦动股份有限公司 Display control method, display control device, storage medium and oral care system
CN116578253B (en) * 2022-05-31 2023-12-19 广州星际悦动股份有限公司 Display control method, display control device, storage medium and oral care system

Also Published As

Publication number Publication date
CN114285935B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
EP3336679B1 (en) Method and terminal for preventing unintentional triggering of a touch key and storage medium
JP6096900B2 (en) Information display terminal
CN109064538B (en) View rendering method and device, storage medium and intelligent terminal
US9829961B2 (en) Electronic device
CN103472906A (en) Method and device for switching double screens of terminal, and terminal equipment
WO2021110133A1 (en) Control operation method and electronic device
TW201421350A (en) Method for displaying images of touch control device on external display device
KR20140060748A (en) Apparatas and method for changing a setting value in an electronic device
CN107450838B (en) Response method and device of black screen gesture, storage medium and mobile terminal
WO2019019835A1 (en) Method and device for responding to blank screen gesture, and storage medium and mobile terminal
CN114285935B (en) Terminal control method and device, storage medium and electronic equipment
CN102929444A (en) Man-machine interaction method and device
KR20130101754A (en) Control method for mobile device using setting pattern and mobile device using it
EP4130964A1 (en) Setting control display method and apparatus, storage medium, and electronic device
KR20200100492A (en) Electronic device and applacation managing method thereof
CN112988246A (en) System switching method and device, electronic equipment and storage medium
CN110471870B (en) Multi-system operation method and device, electronic equipment and storage medium
CN110515662B (en) Remote control method, system, equipment and readable storage medium for dual-system equipment
CN106249874A (en) The report method of a kind of sensing data, processor and mobile terminal
CN213069764U (en) Touch control equipment
CN106126360B (en) Address hole shielding method and device
CN210295083U (en) Display board card USB peripheral hardware connecting system
WO2021068112A1 (en) Method and apparatus for processing touch event, mobile terminal and storage medium
CN111045738B (en) Electronic equipment control method and device, electronic equipment and storage medium
CN105721665A (en) Mobile terminal incoming call answering method and device

Legal Events

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