DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
The term "module" as used herein may be considered a software object executing on the computing system. The various components, modules, engines, and services described herein may be viewed as objects implemented on the computing system. The apparatus and method described herein are preferably implemented in software, but may also be implemented in hardware, and are within the scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 1, the electronic device includes an application processor, a coprocessor and a touch screen, where the application processor and the coprocessor are both electrically connected to the touch screen, and power consumption of the coprocessor during operation is less than that of the application processor during operation. The coprocessor can control the updating and displaying of information such as time, date, weather, calendar and the like, can also control the display of the icon of the shortcut tool on a screen-off display interface, and can also support the running of some lightweight application programs such as an electronic book, a compass, a calculator, a handwriting board and the like. When the coprocessor is in a working state, the application processor is in a dormant state, so that the power consumption of the electronic equipment is reduced by the coprocessor with lower power consumption.
The coprocessor and the application processor can be integrated with one or more of a central 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 contents required to be displayed by the touch screen; the modem is used to handle wireless communications. It is understood that the modem may be implemented by a single chip without being integrated into the application processor and the coprocessor.
The coprocessor and the application processor can be connected through a communication bus. The communication bus may be an I2C (Inter-Integrated Circuit) bus or an SPI (Serial Peripheral Interface) bus. In other embodiments, other formats of communication buses may be used, and are not specifically limited herein.
The touch screen may include a glass cover plate, a touch sensor, and a display assembly. Wherein the touch sensor can be integrated under a glass cover plate, the glass cover plate being used to protect the touch sensor and the display assembly. Optionally, the display component may include pixel points. The electronic equipment can independently emit light through the pixel points so as to display corresponding images on the touch screen.
Referring to fig. 2, fig. 2 is a second structural schematic diagram of an electronic device according to an embodiment of the present disclosure.
The application processor may be integrated in the first control Chip, and the first control Chip may be used as a main control SOC (System on Chip) of the electronic device. In some embodiments, the electronic device further comprises a first memory co-integrated with the application processor in the first control chip. The coprocessor can be integrated in the second control chip, so that the power consumption of the second control chip in the working state is far smaller than that of the first control chip in the working state. In some embodiments, the electronic device further comprises a second memory, the memory capacity of the second memory is smaller than that of the first memory, and the second memory and the coprocessor are integrated into a second control chip together.
The first control chip comprises acommunication port 10a and a display control port 10 b. The second control chip comprises acommunication port 20a and a display control port 20 b. Thecommunication port 20a of the second control chip is electrically connected with thecommunication port 10a of the first control chip to realize the communication between the second control chip and the first control chip. Thecommunication port 20a may be, for example, an SPISLV interface and an I2CSLV interface of the second control chip.
In some embodiments, the electronic device further comprises a switching module comprising adata input port 30a, adata input port 30b, a switching control port 30c, and a data output port 30 d. Thedata input port 30a is electrically connected to the display control port 10b of the first control chip to enable communication between the first control chip and the switching module, which can receive the image data generated by the first control chip through thedata input port 30 a. And the switching module can also be electrically connected with the touch screen through the data output port 30d, so that the switching module can send the received image data generated by the first control chip to the touch screen through the data output port 30 d. Therefore, the image data generated by the first control chip is sent to the touch screen through the switching module so as to control the touch screen to display the corresponding image.
Thedata input port 30b is electrically connected to the display control port 20b of the second control chip to enable communication between the second control chip and the switching module, which can receive image data generated by the second control chip through thedata input port 30 b. And the switching module can also be electrically connected with the touch screen through the data output port 30d, so that the switching module can send the received image data generated by the second control chip to the touch screen through the data output port 30 d. And sending the image data generated by the second control chip to the touch screen through the switching module so as to control the touch screen to display the corresponding image.
The switching module is specifically used for switching a display data conduction path of the touch screen between the first control chip and the second control chip. For example, case A: when the first control chip is in a working state and the second control chip is in a dormant state, the display data of the first control chip is input to the touch screen through the switching module to be displayed and controlled. Case B: when the first control chip detects a starting instruction of a target application such as a handwriting board application, the second control chip is awakened, and the first control chip enters a dormant state. After the second control chip is awakened, the switching module is controlled to execute switching operation, and then the switching module switches the input source of the display data of the touch screen from the first control chip to the second control chip, namely the display data of the second control chip is input to the touch screen through the switching module to be displayed and controlled. Case C: when the second control chip detects the awakening instruction of the first control chip, the second control chip awakens the first control chip, and when the first control chip is awakened to enter a working state, if the first control chip needs to display information on the touch screen, the second control chip controls the switching module to execute switching operation, and switching is performed to switch on display data output by the first control chip to the touch screen for display control. After switching, the second control chip can go to a sleep state, i.e. return to the state a, and thus the switching control of the touch screen is cyclically realized.
In the above manner, the second control chip may further include a switchingsignal output port 20c, and the switchingsignal output port 20c is electrically connected to the switching control port 30c of the switching module, so that the second control chip may send the switching control signal to the switching module through the switchingsignal output port 20c and the switching control port 30c, so as to implement the switching of the switching module controlled by the second control chip, and the interface occupation of the first control chip may be saved in a hardware design level. It can be understood that, since the first control chip is a main control SOC chip in the electronic device, the main control SOC generally undertakes more functional control, and interface resources thereof are more tense. The second control chip outputs the switching control signal to control the switching of the switching module, so that an interface (such as a bus interface) of the main control SOC is not occupied, and the complexity of circuit design is reduced conveniently.
Referring to fig. 3, fig. 3 is a first flowchart illustrating a display control method according to an embodiment of the present disclosure. The display control method is applied to the electronic equipment, wherein the electronic equipment comprises a touch screen, an application processor and a coprocessor, the application processor and the coprocessor are electrically connected with the touch screen, and the power consumption of the coprocessor during operation is smaller than that of the application processor during operation; specifically, the display control method may include the steps of:
in step S101, a touch operation of a user is detected through a touch screen.
When a target application such as a handwriting pad application is run through the coprocessor, touch operation of a user on the touch screen is detected in real time through a touch sensor in the touch screen. For example, the touch sensor detects a touch operation of a user on the touch screen according to a preset sampling frequency, generates a corresponding touch event when the touch operation is detected, and reports input information corresponding to the touch event to the coprocessor through the driver. The touch operation may be a click operation, a slide operation, a long press operation, or the like.
In some embodiments, the touch sensor acquires parameters such as a touch point coordinate, a pressing strength, a pressing frequency within a preset time, and a pressing duration corresponding to each touch operation, and reports the parameters such as the touch point coordinate, the pressing duration, the pressing frequency, and the pressing strength to the coprocessor.
In step S102, when the application processor is in the sleep state, the input information corresponding to the touch operation is acquired by the coprocessor.
The input information corresponding to the touch operation may include information of a target pixel point of the touch operation on the display component, such as coordinate information corresponding to the target pixel point. When the application processor is in a dormant state, the touch point coordinates corresponding to the touch operation reported to the target application by the touch sensor are obtained through the coprocessor, and the coordinate information of the target pixel point of the touch operation on the display component is determined according to the touch point coordinates.
The input information may include coordinate information corresponding to one or more target pixel points, for example, when the touch operation is a sliding operation or a long-press operation, the coordinate information of a plurality of target pixel points corresponding to the sliding operation or the long-press operation may be sequentially obtained by the coprocessor. When the touch operation is a click operation, the coordinate information of a single target pixel point corresponding to the click operation can be acquired through the coprocessor.
In some embodiments, before the step of obtaining, by the coprocessor, input information corresponding to a touch operation, the method further includes:
determining whether the touch operation is effective touch operation or not through the coprocessor according to the pressing force degree and the pressing duration of the touch operation; when the touch operation is effective touch operation, acquiring input information corresponding to the touch operation through a coprocessor; and when the touch operation is not the effective touch operation, the step of acquiring the input information corresponding to the touch operation through the coprocessor is not executed.
In some embodiments, after the step of obtaining, by the coprocessor, input information corresponding to the touch operation, the display control method may further include:
(1) detecting whether the touch operation is a preset touch operation or not through a coprocessor;
(2) when the touch operation is detected to be a preset touch operation, the touch operation is sent to the application processor through the coprocessor, the application processor is awakened temporarily, and the coprocessor is controlled to enter a dormant state;
(3) acquiring input information corresponding to touch operation through an application processor;
(4) controlling the touch screen to display an image corresponding to the input information through the application processor
(5) When the application processor detects that the image display is finished, the application processor wakes up the coprocessor and controls the application processor to enter a dormant state;
(6) and when the touch operation is not detected to be the preset touch operation, executing a step of acquiring input information corresponding to the touch operation through the coprocessor.
The coprocessor detects whether the touch operation is a preset touch operation, the preset touch operation can be a touch operation with complex operation or a large amount of data, for example, the preset touch operation is a quick drawing operation, and when a user triggers the quick drawing operation, the electronic device can directly display an image with rich colors or complex graphs on the display assembly according to the quick drawing operation. For example, when the preset touch operation is an operation of quickly generating a cartoon character image with rich colors, the image color corresponding to the preset touch operation is complex and a complex graphic library needs to be used, but the processing capability of the coprocessor cannot reach the operation of the complex graphic library, and the frequency of the coprocessor is far less than that of the application processor, so that the processing speed of the coprocessor is low when the preset touch operation is processed, and the complex image cannot be quickly displayed on the touch screen.
Therefore, when it is detected that the touch operation is the preset touch operation, the input information needs to be processed by the application processor, so as to display an image corresponding to the input information on the touch screen. The coprocessor comprises a coprocessor, an application processor, a display data output end and a display data output end, wherein the coprocessor can send a wake-up request to the application processor through coprocessing, send input information to the application processor through the output end of the display data, and then temporarily control the coprocessor to enter a dormant state. After the application processor receives the awakening request, the application processor is controlled to enter a working state, and the touch screen is controlled to display an image corresponding to the input information through the application processor. And finally, after the image display is finished, switching back to the coprocessor and controlling the application processor to be in a dormant state.
In addition, when it is detected that the touch operation is not the preset touch operation, it indicates that the coprocessor can normally process the touch operation, and at this time, the operation in step S103 is executed, that is, the step of acquiring the input information corresponding to the touch operation by the coprocessor is executed.
In step S103, the coprocessor controls the touch screen to display an image corresponding to the input information.
After the target pixel points of the touch operation in the display component are acquired through the coprocessor, the target pixel points of the display component can be controlled through the coprocessor to be displayed according to preset filling parameters, and corresponding images are generated on the touch screen. For example, when the touch operation is a sliding operation, for example, the coprocessor may control a plurality of target pixel points of the display element to be displayed with preset filling parameters, so as to display a corresponding line or other shape image on the touch screen. When the touch operation is a sliding operation along the width direction of the touch screen, a line image along the width direction of the touch screen may be displayed on the touch screen. When the touch operation is a long press operation, a corresponding preset image, such as a circular image or a rectangular image, may be displayed on the touch screen. When the touch operation is a click operation, a single target pixel point of the display component can be controlled by the coprocessor to be displayed according to the preset filling parameter, so that a single-point image is displayed on the touch screen.
As can be seen from the above, the display control method provided in the embodiment of the present application is applied to an electronic device, where the electronic device includes a touch screen, an application processor, and a coprocessor, the application processor and the coprocessor are electrically connected to the touch screen, and power consumption of the coprocessor during operation is less than power consumption of the application processor during operation; when the electronic equipment runs a target application with simple functions, the touch operation of a user can be detected through the touch screen; when the application processor is in a dormant state, acquiring input information corresponding to touch operation through a coprocessor; and controlling the touch screen to display an image corresponding to the input information through the coprocessor. Therefore, when the target application is operated, the application processor with higher power consumption is in a dormant state, and the target application is operated through the low-power-consumption coprocessor, so that the overall power consumption of the electronic equipment is reduced.
Referring to fig. 4, fig. 4 is a second flowchart illustrating a display control method according to an embodiment of the present disclosure. The display control method is applied to the electronic device 100, the electronic device comprises a touch screen, an application processor and a coprocessor, the application processor and the coprocessor are electrically connected with the touch screen, and the power consumption of the coprocessor during operation is smaller than that of the application processor during operation; as shown in the figure, the display control method may include the steps of:
in step S201, a touch operation of a user is detected through a touch screen.
When a target application such as a handwriting pad application is run through the coprocessor, touch operation of a user on the touch screen is detected in real time through a touch sensor in the touch screen. For example, the touch sensor detects a touch operation of a user on the touch screen according to a preset sampling frequency.
In step S202, information of a target pixel corresponding to a touch operation is written into a first preset buffer of the coprocessor through the touch screen.
The information of the target pixel points corresponding to the touch operation reported by the touch sensor is, for example, the coordinate information of the target pixel points, and the coordinate information of the target pixel points is sequentially written into the first preset buffer area of the coprocessor. The touch sensor can call a callback function to write the coordinate information of the target pixel points into the first preset buffer area, and after the touch sensor successfully writes the coordinate information of each target pixel point into the first preset buffer area, the touch sensor can send the information write-in event of the target pixel points to the target thread of the coprocessor according to the callback function. When the target thread receives the information writing event of the target pixel, the electronic device executes the operation of step S203, that is, executes the operation of sequentially calling the information of the target pixel in the first preset buffer through the target thread.
The First predetermined buffer is a First In First Out (FIFO) buffer. Furthermore, the first preset buffer area comprises at least one array, and then the information of the target pixel point can be sequentially written into the arrays in the first preset buffer area through the coprocessor, so that the information of the target pixel point is stored in the first preset buffer area in an array form.
Referring to fig. 5, fig. 5 is a schematic diagram of an array provided in the present embodiment. As shown in the figure, the array a is a blank array, wherein the parameter of each element in the array a is an initial value (0,0) of the array, and when a user performs a click operation on the touch screen, the coordinate information corresponding to the target pixel point corresponding to the click operation reported by the touch sensor is (300 ) and (0, 0). Wherein (300 ) is the coordinate parameter of the contact point during the single click operation, and (0,0) is the coordinate parameter of the contact point during the lifting of the single click operation. At this time, coordinate information (300 ) and (0,0) are written into the array a in sequence by the coprocessor to generate the array b. Then, when the user touches the touch screen again after the click operation, the co-processor receives the coordinate information (400 ) corresponding to the target pixel point corresponding to the touch operation reported by the touch screen, and at the moment, the co-processor writes the coordinate information (400 ) into the array b to generate an array c. When the coordinate information (400 ) is written into the array b, the coordinate information (0,0) when the last click operation is lifted needs to be overwritten, namely the coordinate information (0,0) when the last click operation is lifted is written into the array b (400 ), so as to generate the array c.
In some embodiments, before the step of writing information of a target pixel point corresponding to a touch operation into a first preset buffer of a coprocessor through a touch screen, the method further includes: detecting whether a target pixel point corresponding to the touch operation is located in a preset input area corresponding to the target application or not through a touch sensor; and when the target pixel point is positioned in the preset input area, executing the step of writing the information of the target pixel point corresponding to the touch operation into a first preset buffer area of the coprocessor through the touch screen.
In step S203, the information of the target pixel points in the first preset buffer is sequentially called by the target thread of the coprocessor.
If the coordinate information of the target pixel point is stored in the first preset buffer area in the form of array c, the coordinate information of the target pixel point first called from array c by the display thread of the coprocessor is (300 ).
In step S204, the coprocessor detects whether the target pixel is a preset pixel.
And detecting whether the target pixel point is a preset pixel point according to the coordinate information of the target pixel point. When the target pixel is the preset pixel, the operation of step S205 is executed. When the target pixel is not the preset pixel, the operation of step S206 is executed.
In step S205, the information of the target pixel point and the preset fill parameter are stored in a second preset buffer of the coprocessor through the target thread.
For example, when it is detected that the target pixel is not the preset pixel, the information of the target pixel and the preset filling parameter are stored in the second preset buffer of the coprocessor through the target thread, and the process returns to step S203, i.e., the coordinate information of the target pixel in the array c is continuously retrieved through the display thread (400 ). Wherein, the second predetermined buffer is a frame buffer (framebuffer).
In step S206, the information of the target pixels in the second preset buffer and the preset fill parameters are submitted to the display driver of the coprocessor through the target thread.
When the target pixel point is detected to be a preset pixel point, for example, when the display thread calls that the coordinate information of the target pixel point in the array c is (0,0), the information of the target pixel points of the second preset buffer area, such as the coordinate information (300 ) and the coordinate information (400 ), and the preset filling parameters, such as RGB (255 ), are collectively submitted to the display driver of the coprocessor through the display thread.
In some embodiments, the touch screen may be divided into a plurality of preset display regions, and when it is detected that the target pixel is a preset pixel, the display control method may further include:
(a) acquiring a first target pixel point which is not displayed in a second preset buffer area through a coprocessor;
(b) determining a preset display area corresponding to the first target pixel point as a target display area through a coprocessor;
(c) and controlling each target pixel point in the target display area in the touch screen to be displayed by preset filling parameters through the coprocessor so as to generate a corresponding image on the touch screen.
The display component of the touch screen can be averagely divided into a plurality of preset display areas, for example, the display interval is averagely divided into three preset display areas, namely a first display area, a second display area and a third display area. And acquiring the first target pixel points which are not displayed in the second preset buffer area through the coprocessor, and not acquiring the target pixel points which are displayed in the display component at the moment. And determining a preset display area corresponding to the first target pixel point as a target display area through the coprocessor, for example, when the undisplayed first target pixel points are all located in the second display area, controlling each target pixel point located in the second display area in the touch screen to be displayed according to preset filling parameters through the coprocessor, so as to generate a corresponding image on the touch screen.
Therefore, the target display area to be refreshed is determined according to the undisplayed first target pixel points, when the newly added first target pixel points are only located in the partial display area, only the pixel points located in the partial display area in the display assembly are controlled to be refreshed and displayed, all the pixel points of the whole display assembly do not need to be refreshed, and power consumption of the electronic equipment is further saved.
In step S207, the display driver controls the touch screen to display each target pixel point according to the preset filling parameter, so as to generate a corresponding image on the touch screen.
The target pixel points with the coordinate information of (300 ) and the target pixel points with the coordinate information of (400 ) in the display driving control display assembly are displayed by preset filling parameters RGB (255 ) so as to display corresponding images.
In some embodiments, the display control method further includes: and when an image saving instruction is received by the coprocessor, the image is sent to the storage space of the application processor by the coprocessor, wherein the coprocessor sends the image to the application processor by a preset interface.
When the user saves the image on the touch screen, for example, when the user is detected to perform touch operation on the saving component on the touch screen, the image is sent to a storage space of the application processor, for example, a storage space in the first memory, through the coprocessor. Wherein the coprocessor sends the image to the application processor through a preset interface, such as an SPI interface.
In some embodiments, when the image saving instruction is received by the coprocessor, the display control method may further include: and adding the information of each target pixel point in the second preset buffer area and the preset filling parameters into a linked list of the coprocessor through the coprocessor.
When an image saving instruction is received by the coprocessor, information of each target pixel point in the second preset buffer area, such as coordinate information and preset filling parameters, can be added to a linked list of the coprocessor by the coprocessor. When the user views the saved image, the saved image can be viewed by triggering the corresponding viewing instruction. For example, when the user triggers an instruction to view the previous page, the image originally saved in the storage space of the application processor may be displayed on the touch screen, so that the user can view the saved image conveniently.
As can be seen from the above, the display control method provided in the embodiment of the present application is applied to an electronic device, where the electronic device includes a touch screen, an application processor and a coprocessor, both the application processor and the coprocessor are electrically connected to the touch screen, and power consumption of the coprocessor during operation is less than power consumption of the application processor during operation; when the electronic equipment runs a target application with simple functions, the touch operation of a user can be detected through the touch screen; when the application processor is in a dormant state, acquiring input information corresponding to touch operation through a coprocessor; and controlling the touch screen to display an image corresponding to the input information through the coprocessor. Therefore, when the target application is operated, the application processor with higher power consumption is in a dormant state, and the target application is operated through the low-power-consumption coprocessor, so that the overall power consumption of the electronic equipment is reduced.
Referring to fig. 6, fig. 6 is a third flowchart illustrating a display control method according to an embodiment of the present disclosure. The display control method is applied to the electronic device 100 provided in the above embodiment, where the electronic device includes a touch screen, an application processor and a coprocessor, the application processor, the coprocessor and the touch screen are electrically connected to the application processor and run in an application operating system, the coprocessor runs in a real-time operating system, and power consumption of the real-time operating system during running is less than that of the application operating system during running;
different operating systems can be run in the electronic device, wherein the different operating systems include an application operating system and a real-time operating system, the application operating system is, for example, an Android operating system or a Linux operating system, and the real-time operating system is, for example, an RT-Thread20 operating system, and the application operating system is generally suitable for controlling an application program with a higher resource requirement, and the real-time operating system is suitable for controlling an application program with a lower resource requirement. In this embodiment, the application operating system and the real-time operating system may be pre-stored in a memory of the electronic device, for example, the application operating system may be pre-stored in a first memory of the electronic device, the real-time operating system may be pre-stored in a second memory of the electronic device, and the application operating system and the real-time operating system may run independently of each other.
Specifically, the display control method may include the steps of:
in step S301, a touch operation of a user is detected through a touch screen.
When a target application such as a handwriting pad application is run through a real-time operating system, touch operation of a user on a touch screen is detected in real time through a touch sensor in the touch screen. For example, the touch sensor detects a touch operation of a user on a touch screen according to a preset sampling frequency, generates a corresponding touch event when the touch operation is detected, and reports input information corresponding to the touch event to a real-time operating system through a driver. The touch operation may be a click operation, a slide operation, a long press operation, or the like.
In some embodiments, the touch sensor acquires parameters such as a touch point coordinate, a pressing strength, a pressing frequency within a preset time, and a pressing duration corresponding to each touch operation, and reports the parameters such as the touch point coordinate, the pressing duration, the pressing frequency, and the pressing strength to the real-time operating system.
In step S302, when the application processor is in a sleep state, the input information corresponding to the touch operation is acquired through the real-time operating system.
The input information corresponding to the touch operation may include coordinate information of a target pixel point of the touch operation on the display component. And acquiring a touch point coordinate corresponding to the touch operation reported to the target application by the touch sensor through the real-time operating system, and determining coordinate information of a target pixel point of the touch operation on the display component according to the touch point coordinate.
The input information may include coordinate information of one or more target pixel points, for example, when the touch operation is a sliding operation or a long-press operation, the coordinate information of a plurality of target pixel points corresponding to the sliding operation or the long-press operation may be sequentially obtained by the real-time operating system. When the touch operation is a click operation, the coordinate information of a single target pixel point corresponding to the click operation can be acquired through the real-time operating system.
In some embodiments, before the step of obtaining the input information corresponding to the touch operation by the real-time operating system, the method further includes:
determining whether the touch operation is effective touch operation or not according to the pressing force and the pressing duration of the touch operation through the real-time operating system; when the touch operation is effective touch operation, acquiring input information corresponding to the touch operation through a real-time operating system; and when the touch operation is not the effective touch operation, the step of acquiring the input information corresponding to the touch operation through the real-time operating system is not executed.
In some embodiments, after the step of obtaining, by the real-time operating system, the input information corresponding to the touch operation, the display control method may further include:
1. detecting whether the touch operation is a preset touch operation or not through a real-time operating system;
2. when the touch operation is detected to be a preset touch operation, the real-time operating system sends the touch operation to the application operating system, temporarily wakes up the application operating system, and correspondingly closes the real-time operating system;
3. acquiring input information corresponding to touch operation through an application operating system;
4. controlling a touch screen to display an image corresponding to input information by using an application operating system;
5. when the application operating system detects that the image display is finished, the application operating system wakes up the real-time operating system and correspondingly closes the application operating system;
6. and when the touch operation is not detected to be the preset touch operation, executing a step of acquiring input information corresponding to the touch operation through a real-time operating system.
The electronic device can detect whether the touch operation is a preset touch operation through the real-time operating system, the preset touch operation can be responsible for operation or touch operation with a large amount of data, for example, the preset touch operation is a quick drawing operation, and when a user triggers the quick drawing operation, the electronic device can directly display an image with rich colors or complex figures on the display assembly according to the quick drawing operation. For example, when the preset touch operation is an operation of quickly generating a cartoon character image with rich colors, the preset touch operation corresponds to a higher resource requirement due to a complex image color corresponding to the preset touch operation and a complex graphic library, and the target application with the higher resource requirement cannot be controlled by the real-time operating system, so that the target application cannot be normally operated when the real-time operating system receives input information corresponding to the preset touch operation.
Therefore, when it is detected that the touch operation is the preset touch operation, the input information needs to be processed by the application processor, so as to display an image corresponding to the input information on the touch screen. The real-time operating system sends a wake-up request to the application operating system and sends input information to the application operating system, and then the real-time operating system is temporarily controlled to enter a dormant state. After the application operating system receives the awakening request, the application processor is controlled to enter a working state, the target application with higher resource requirements is operated through the application operating system, and then the touch screen is controlled to display the image corresponding to the input information. And finally, switching back to the real-time operating system and correspondingly closing the application operating system after the image display is detected to be completed.
In addition, when it is detected that the touch operation is not the preset touch operation, it indicates that the target application is an application program with a low resource requirement, and the real-time operating system can control the application program with the low resource requirement, and at this time, the operation in step S303 is executed, that is, the step of acquiring the input information corresponding to the touch operation by the real-time operating system is executed.
In step S303, the real-time operating system controls the touch screen to display an image corresponding to the input information.
After coordinate information of target pixel points of touch operation in the display assembly is acquired through the real-time operating system, the target pixel points of the display assembly can be controlled through the real-time operating system to be displayed according to preset filling parameters, and corresponding images are generated on the touch screen. For example, when the touch operation is a sliding operation, for example, the real-time operating system may control a plurality of target pixel points of the display component to be displayed with preset filling parameters, so as to display a corresponding line or other shape image on the touch screen. When the touch operation is a sliding operation along the width direction of the touch screen, a line image along the width direction of the touch screen may be displayed on the touch screen. When the touch operation is a long press operation, a corresponding preset image, such as a circular image or a rectangular image, may be displayed on the touch screen. When the touch control operation is a click operation, a single target pixel point of the display component can be controlled by the real-time operating system to be displayed according to the preset filling parameter, so that a single-point image is displayed on the touch control screen.
As can be seen from the above, the display control method provided in the embodiment of the present application is applied to an electronic device, where the electronic device includes a touch screen, an application processor and a real-time operating system, the application processor and a coprocessor are both electrically connected to the touch screen, the application processor runs in the application operating system, the coprocessor runs in the real-time operating system, and the power consumption of the real-time operating system during running is less than the power consumption of the application operating system during running; when the electronic equipment runs a target application with simple functions, the touch operation of a user can be detected through the touch screen; when the application processor is in a dormant state, acquiring input information corresponding to touch operation through a real-time operating system; and controlling the touch screen to display an image corresponding to the input information through the real-time operating system. Therefore, when the target application is operated, the application processor with higher power consumption and the application operating system are in a dormant state, and the target application is operated through the low-power-consumption coprocessor and the real-time operating system, so that the overall power consumption of the electronic equipment is reduced.
Referring to fig. 7, fig. 7 is a fourth flowchart illustrating a display control method according to an embodiment of the present disclosure. The display control method is applied to the electronic device 100, the electronic device comprises a touch screen, an application processor and a real-time operating system, the application processor and a coprocessor are electrically connected with the touch screen, the application processor runs in the application operating system, the coprocessor runs in the real-time operating system, and the power consumption of the real-time operating system in running is smaller than that of the application operating system in running; as shown in the figure, the display control method may include the steps of:
in step S401, a touch operation of a user is detected through a touch screen.
When a target application such as a handwriting pad application is run through a real-time operating system, touch operation of a user on a touch screen is detected in real time through a touch sensor in the touch screen. For example, the touch sensor detects a touch operation of a user on the touch screen according to a preset sampling frequency.
In step S402, information of a target pixel corresponding to a touch operation is written into a first preset buffer of the coprocessor through the touch screen.
The information of the target pixel points corresponding to the touch operation reported by the touch sensor, such as coordinate information, is sequentially written into a first preset buffer area of the coprocessor. The touch sensor can call a callback function to write the coordinate information of the target pixel points into a first preset buffer area, and after the touch sensor successfully writes the coordinate information of each target pixel point into the first preset buffer area, the touch sensor can send the information write-in event of the target pixel points to a target thread of the real-time operating system according to the callback function. When the target thread receives the information writing event of the target pixel, the electronic device executes the operation of step S403, that is, executes the operation of sequentially calling the information of the target pixel in the first preset buffer through the target thread.
The first preset buffer area is a first-in first-out buffer area. Furthermore, the first preset buffer area comprises at least one array, and then the information of the target pixel point can be sequentially written into the arrays in the first preset buffer area through the real-time operating system, so that the information of the target pixel point is stored in the first preset buffer area in an array form.
Referring to fig. 5, fig. 5 is a schematic diagram of an array provided in the embodiment of the present application, as shown in the figure, the array a is a blank array, where a parameter of each element in the array a is an initial value (0,0) of the array, and when a user performs a single-click operation on the touch screen, coordinate information corresponding to a target pixel point corresponding to the single-click operation reported by the touch sensor is (300 ) and (0,0), respectively. Wherein (300 ) is the coordinate parameter of the contact point during the single click operation, and (0,0) is the coordinate parameter of the contact point during the lifting of the single click operation. The coordinate information of (300 ) and (0,0) is written into the array a by the real-time operating system to generate the array b. Then, when the user touches the touch screen again after the click operation, the real-time operating system receives coordinate information (400 ) corresponding to the target pixel point corresponding to the touch operation reported by the touch screen, and at the moment, the coordinate information (400 ) is written into the array b to generate an array c. When the coordinate information (400 ) is written into the array b, the coordinate information (0,0) when the last click operation is lifted needs to be overwritten, that is, the coordinate information (400 ) is written into the position of the coordinate information (0,0) when the last click operation is lifted in the array b, so as to generate the array c.
In some embodiments, before the step of writing information of a target pixel point corresponding to a touch operation into a first preset buffer of a coprocessor through a touch screen, the method further includes: detecting whether a target pixel point corresponding to the touch operation is located in a preset input area corresponding to the target application or not through a touch sensor; and when the target pixel point is positioned in the preset input area, executing the step of writing the target pixel point corresponding to the touch operation into a first preset buffer area of the coprocessor through the touch screen.
In step S403, the information of the target pixel points in the first preset buffer is sequentially called by the target thread of the real-time operating system.
If the target pixel point is stored in the first preset buffer area in the form of array c, the display thread of the real-time operating system first retrieves the coordinate information (300 ) of the target pixel point from array c.
In step S404, the real-time operating system detects whether the target pixel point is a preset pixel point.
And detecting whether the target pixel point is a preset pixel point or not through a real-time operating system. When the target pixel is the preset pixel, the operation of step S205 is executed. When the target pixel is not the preset pixel, the operation of step S206 is executed.
In step S405, the target pixel point and the preset filling parameter are stored in a second preset buffer of the real-time operating system through the target thread.
For example, when it is detected that the target pixel with the coordinate information of (300 ) is not the preset pixel, the target thread stores the coordinate information of the target pixel (300 ) and the preset fill parameter in the second preset buffer of the real-time operating system, and returns to step S203, i.e., the display thread continues to retrieve the coordinate information of the target pixel (400 ) in the array c. Wherein, the second predetermined buffer is a frame buffer (framebuffer).
In step S406, the information of the target pixels in the second preset buffer and the preset filling parameters are submitted to the display driver of the real-time operating system through the target thread.
When the coordinate information (0,0) of the target pixel point is detected to be the preset pixel point, for example, when the display thread calls the target pixel point (0,0) in the array c, the information of the target pixel points in the second preset buffer area, such as the coordinate information (300 ) and the coordinate information (400 ), and the preset filling parameters, such as RGB (255 ), are collectively submitted to the display driver of the real-time operating system through the display thread.
In some embodiments, the touch screen may be divided into a plurality of preset display regions, and when it is detected that the target pixel is a preset pixel, the display control method may further include:
a. acquiring a first target pixel point which is not displayed in a second preset buffer area through a real-time operating system;
b. determining a preset display area corresponding to the first target pixel point as a target display area through a real-time operating system;
c. and controlling each target pixel point in the target display area in the touch screen to display according to the preset filling parameters through the real-time operating system so as to generate a corresponding image on the touch screen.
The display component of the touch screen can be averagely divided into a plurality of preset display areas, for example, the display interval is averagely divided into three preset display areas, namely a first display area, a second display area and a third display area. And acquiring the first target pixel points which are not displayed in the second preset buffer area through the real-time operating system, and not acquiring the target pixel points which are displayed in the display component at the moment. And determining a preset display area corresponding to the first target pixel point as a target display area through the real-time operating system, for example, when the undisplayed first target pixel point is located in the second display area, controlling each target pixel point located in the second display area in the touch screen to be displayed according to preset filling parameters through the real-time operating system so as to generate a corresponding image on the touch screen.
Therefore, the target display area to be refreshed is determined according to the undisplayed first target pixel points, when the newly added first target pixel points are only located in the partial display area, only the pixel points located in the partial display area in the display assembly are controlled to be refreshed and displayed, all the pixel points of the whole display assembly do not need to be refreshed, and power consumption of the electronic equipment is further saved.
In step S407, the display driver controls the touch screen to display each target pixel point according to the preset filling parameter, so as to generate a corresponding image on the touch screen.
Target pixel points with coordinate information (300 ) and target pixel points with coordinate information (400 ) in the display driving control display assembly are displayed by preset filling parameters RGB (255 ) so as to display corresponding images.
In some embodiments, the display control method further includes: and when the image storage instruction is received through the real-time operating system, the image is sent to the storage space of the application processor through the real-time operating system, wherein the real-time operating system sends the image to the application processor through a preset interface.
When the user saves the image on the touch screen, for example, when the user is detected to perform touch operation on the saving component on the touch screen, the image is sent to the storage space of the application processor, for example, the storage space in the first memory, through the real-time operating system. Wherein the real-time operating system sends the image to the application processor through a preset interface, such as an SPI interface.
In some embodiments, when the image saving instruction is received through the real-time operating system, the display control method may further include: and adding the information of each target pixel point in the second preset buffer area and the preset filling parameters into a linked list of the coprocessor through a real-time operating system.
When an image storage instruction is received through the real-time operating system, the information of each target pixel point in the second preset buffer area and the preset filling parameters can be added into the linked list of the coprocessor through the real-time operating system. When the user views the saved image, the saved image can be viewed by triggering the corresponding viewing instruction. For example, when the user triggers an instruction to view the previous page, the image originally saved in the storage space of the application processor may be displayed on the touch screen, so that the user can view the saved image conveniently.
As can be seen from the above, the display control method provided in the embodiment of the present application is applied to an electronic device, where the electronic device includes a touch screen, an application processor and a real-time operating system, the application processor and a coprocessor are both electrically connected to the touch screen, the application processor runs in the application operating system, the coprocessor runs in the real-time operating system, and the power consumption of the real-time operating system during running is less than that of the application operating system during running; when the electronic equipment runs a target application with simple functions, the touch operation of a user can be detected through the touch screen; when the application processor is in a dormant state, acquiring input information corresponding to touch operation through a real-time operating system; and controlling the touch screen to display an image corresponding to the input information through the real-time operating system. Therefore, when the target application is operated, the application processor with higher power consumption and the application operating system are in a dormant state, and the target application is operated through the low-power-consumption coprocessor and the real-time operating system, so that the overall power consumption of the electronic equipment is reduced.
The embodiment of the application also provides the electronic equipment. The electronic device may be a smartphone, a tablet computer, or the like. Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. Based on the structure of the electronic apparatus described above, thefirst control chip 501 includes theapplication processor 5011 and thefirst memory 5012. Thesecond controller chip 502 includes acoprocessor 5021 and asecond memory 5022. Thecoprocessor 5021 is electrically connected to thesecond memory 5022. Theapplication processor 5011 is electrically connected to thefirst memory 5012. In other embodiments, thefirst memory 5012 may also be provided separately and not integrated into thefirst control chip 501.
In some embodiments, thefirst control chip 501 may serve as a master SOC of the electronic device; thesecond control chip 502 is a low power SOC that consumes less power than thefirst control chip 501.
Theapplication processor 5011 is a control center of the electronic apparatus, connects various parts of the entire electronic apparatus with various interfaces and lines, performs various functions of the electronic apparatus and processes data by running or calling the first computer program stored in thefirst memory 5012, and calling the data stored in thefirst memory 5012, thereby monitoring the electronic apparatus as a whole.
Thefirst memory 5012 may be used to store first computer programs and data. Thefirst memory 5012 stores a first computer program having instructions contained therein that are executable in the application processor. The first computer program may constitute various functional modules. Theapplication processor 5011 executes various functional applications and data processing by calling a first computer program stored in thefirst memory 5012.
Thecoprocessor 5021 may also be used as a control center of the electronic device, and may be connected to various parts of the electronic device through various interfaces and lines, so as to perform various functions of the electronic device and process data by running or calling the first computer program stored in thesecond storage 5022 and calling the data stored in thesecond storage 5022, thereby monitoring the electronic device as a whole.
Thesecond memory 5022 may be used to store a first computer program and data. Thesecond memory 5022 stores a first computer program having instructions embodied therein that are executable in the application processor. The first computer program may constitute various functional modules. Thecoprocessor 5021 executes various functional applications and data processing by calling a first computer program stored in thesecond memory 5022.
Thefirst memory 5012 stores therein an application operating system, and theapplication processor 5011 is configured to run the application operating system. A real-time operating system is stored in thesecond memory 5022, and thecoprocessor 5021 is used for running the real-time operating system. The power consumption of the real-time operating system in operation is less than that of the application operating system in operation;
in this embodiment, theapplication processor 5011 in the electronic device loads instructions corresponding to one or more processes of the first computer program into thefirst memory 5012 according to the following steps, and theapplication processor 5011 runs the first computer program stored in thefirst memory 5012, so as to implement various functions:
when the starting instruction of the target application is detected, the coprocessor is awakened, and the application processor is controlled to enter a dormant state after the coprocessor is awakened.
In this embodiment, thecoprocessor 5021 in the electronic device loads instructions corresponding to one or more processes of the first computer program into thesecond memory 5022 according to the following steps, and thecoprocessor 5021 runs the first computer program stored in thesecond memory 5022, so as to implement various functions:
detecting touch operation of a user through a touch screen;
when the application processor is in a dormant state, acquiring input information corresponding to touch operation through a coprocessor;
and controlling the touch screen to display an image corresponding to the input information through the coprocessor.
In this embodiment, when thecoprocessor 5021 of the electronic device runs the real-time operating system, the electronic device may implement the following functions:
detecting touch operation of a user through a touch screen;
when the application processor is in a dormant state, acquiring input information corresponding to touch operation through a real-time operating system;
and controlling the touch screen to display an image corresponding to the input information through the real-time operating system.
It should be noted that the explanation of the display control method in the embodiments of fig. 3 to fig. 7 is also applied to the electronic device 100 of the present embodiment, and the implementation principle is similar, which is not repeated herein.
In some embodiments, please refer to fig. 9, and fig. 9 is a fourth structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device further includes:radio frequency circuit 503,touch screen 504,control circuit 505,input unit 506,audio circuit 507,sensor 508, touch circuit 410, andpower supply 509. Thefirst control chip 501 and thesecond control chip 502 are electrically connected to theradio frequency circuit 503, thetouch screen 504, thecontrol circuit 505, theinput unit 506, theaudio circuit 507, thesensor 508, the touch circuit 410, and thepower supply 509, respectively.
Theradio frequency circuit 503 is used for transceiving radio frequency signals to communicate with a network device or other electronic devices through wireless communication.
Thetouch screen 504 may be used to display information input by or provided to a user as well as various graphical user interfaces of the electronic device, which may be comprised of images, text, icons, video, and any combination thereof.
Thecontrol circuit 505 is electrically connected to thetouch screen 504 and is configured to control thetouch screen 504 to display information.
Theinput unit 506 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Theinput unit 506 may include a fingerprint recognition module.
Audio circuitry 507 may provide an audio interface between a user and an electronic device through a speaker, microphone. Whereaudio circuitry 507 includes a microphone. The microphone is electrically connected to theprocessor 501. The microphone is used for receiving voice information input by a user.
Thesensor 508 is used to collect external environmental information. Thesensors 508 may include one or more of ambient light sensors, acceleration sensors, gyroscopes, and the like.
Thepower supply 509 is used to power the various components of the electronic device. In some embodiments,power supply 509 may be logically coupled toprocessor 501 through a power management system to manage charging, discharging, and power consumption management functions through the power management system.
Although not shown in fig. 9, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
In view of the above, an embodiment of the present application provides an electronic device, where the electronic device includes a touch screen, an application processor, and a coprocessor, the application processor and the coprocessor are electrically connected to the touch screen, and power consumption of the coprocessor during operation is less than power consumption of the application processor during operation; when the electronic equipment runs a target application with simple functions, the touch operation of a user can be detected through the touch screen; when the application processor is in a dormant state, acquiring input information corresponding to touch operation through a coprocessor; and controlling the touch screen to display an image corresponding to the input information through the coprocessor. Therefore, when the target application is operated, the application processor with higher power consumption and the application operating system are in a dormant state, and the target application is operated through the low-power-consumption coprocessor and the real-time operating system, so that the overall power consumption of the electronic equipment is reduced.
The embodiment of the present application further provides a storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer executes the display control method provided in any of the above embodiments.
It should be noted that, those skilled in the art can understand that all or part of the steps in the methods of the above embodiments can be implemented by the relevant hardware instructed by the computer program, and the computer program can be stored in the computer readable storage medium, which can include but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Furthermore, the terms "first", "second", and "third", etc. in this application are used to distinguish different objects, and are not used to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules listed, but rather, some embodiments may include other steps or modules not listed or inherent to such process, method, article, or apparatus.
The display control method, the storage medium, and the electronic device provided in the embodiments of the present application are described in detail above. The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.