A method, device, equipment, medium and program product for refreshing ink screen
Passing refresh parameters through the shared memory mechanism and supporting passive refresh mode ink screens solves the problem that the existing operating system only supports active refresh mode and improves the display effect.
Patent Information
- Application Number
- CN202111294977.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-11-03
AI Technical Summary
The existing operating system only supports active refresh mode, and cannot adapt to the ink screen of passive refresh mode, resulting in poor refresh effect.
Through the shared memory mechanism, the application process passes refresh parameters to the synthesis service process. The synthesis service process refreshes the ink screen based on the refresh parameters and rendering results, supporting passive refresh methods.
It realizes an ink screen that supports passive refresh mode that the operating system supports, improves the display effect and provides a richer refresh mode.
Smart Images

Figure CN114020388B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of operating systems. Specifically, the present application relates to a method, device, equipment, medium and program product for refreshing an ink screen. Background Art
[0002] E-ink screens are becoming a popular screen type on mobile terminals due to their low power consumption, ultra-thinness, and visibility under strong light. There are multiple refresh modes for e-ink screens. Setting the refresh mode as needed will achieve better display effects. Currently, the refresh modes for screens on the market are divided into active refresh mode and passive refresh mode, and e-ink screens are more suitable for passive refresh mode.
[0003] For the terminal, the type of operating system configured on the terminal is the key to determining the refresh method. Among them, the Android operating system can support passive refresh mode, which includes refreshing according to the refresh mode provided by the screen. However, some operating systems only support active refresh mode, that is, refreshing according to the system default refresh mode. For an ink screen that provides multiple refresh modes, if only the active refresh mode is used for the ink screen, a very friendly refresh effect cannot be obtained.
[0004] Therefore, how to make an operating system that only supports active refresh mode support an ink screen that adapts to passive refresh mode is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The purpose of the embodiments of the present application is to solve the technical problem of how to enable an operating system that only supports active refresh mode to support an ink screen that adapts to passive refresh mode.
[0006] According to one aspect of an embodiment of the present application, a method for refreshing an ink screen is provided, the method comprising:
[0007] When the application process writes the refresh parameters to the shared memory, the synthesis service process obtains the refresh parameters from the shared memory;
[0008] The synthesis service process performs synthesis operations based on the rendering results delivered by the application process;
[0009] The synthesis service process refreshes the ink screen according to the refresh parameters and synthesis results.
[0010] In a possible implementation, the application process includes at least one page, each page includes a predefined interface, and the application process writes refresh parameters to the shared memory, including:
[0011] Writes refresh parameters to the shared memory according to the parameters defined in the predefined interface.
[0012] In another possible implementation, the refresh parameter includes a refresh mode, and the synthesis service process refreshes the ink screen according to the refresh parameter and the synthesis result, including:
[0013] When the refresh mode is a passive refresh mode, a custom refresh mode is determined from the refresh parameters, wherein the ink screen includes at least one custom refresh mode;
[0014] The synthesis service process sends the synthesis result to the ink screen and refreshes the ink screen according to the determined custom refresh mode;
[0015] or,
[0016] When the refresh mode is active refresh mode, the synthesis service process sends the synthesis result to the ink screen and refreshes the ink screen according to the default refresh mode of the terminal.
[0017] In another possible implementation, before the application process writes the refresh parameters to the shared memory, the following steps are included:
[0018] Configure polling for the composite service process;
[0019] The synthesis service process detects write operations to the shared memory based on polling.
[0020] In another possible implementation, when the application process writes the refresh parameter to the shared memory, the synthesis service process obtains the refresh parameter from the shared memory, including:
[0021] When it is detected that the refresh parameters are written to the shared memory, the synthesis service process obtains the refresh parameters from the shared memory.
[0022] According to another aspect of an embodiment of the present application, a device for refreshing an ink screen is provided, the device comprising:
[0023] The application module is used to call the application process to write refresh parameters into the shared memory;
[0024] The synthesis service module is used to call the synthesis service process to obtain the refresh parameters from the shared memory when the application process writes the refresh parameters to the shared memory, and to call the synthesis service process to perform synthesis operations according to the rendering results passed by the application process, and refresh the ink screen according to the refresh parameters and the synthesis results.
[0025] According to another aspect of an embodiment of the present application, an electronic device is provided, the electronic device comprising:
[0026] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of a method for refreshing an ink screen shown in one aspect of an embodiment of the present application.
[0027] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for refreshing an ink screen shown in one aspect of an embodiment of the present application are implemented.
[0028] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, the steps of a method for refreshing an ink screen shown in one aspect of an embodiment of the present application are implemented.
[0029] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0030] The embodiment of the present application provides a method for refreshing an ink screen. The method uses shared memory as a communication mechanism between an application process and a synthetic service process. The application process transmits refresh parameters through the shared memory. After the synthetic service process obtains the refresh parameters, it can refresh the ink screen according to the refresh parameters. On the basis of the active refresh method of the operating system, a passive refresh method can also be provided for refreshing according to the instructions of the application process. The rich refresh methods enable the operating system to support ink screens that adapt to the passive refresh method, and terminals equipped with ink screens can provide better display effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.
[0032] Figure 1 A schematic diagram of a flow chart of a method for refreshing an ink screen provided in an embodiment of the present application;
[0033] Figure 2 A schematic diagram of a process flow of a preparatory refresh process provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of the structure of a device for refreshing an ink screen provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0036] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" indicates that it is implemented as "A", or is implemented as "A", or is implemented as "A and B".
[0037] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0038] The embodiments of the present application provide a method, device, equipment, medium and program product for refreshing an ink screen. Among them, the method can be applied to a terminal device. As an example, the terminal device is configured with an ink screen, and the operating system running on the terminal device is also configured with Qt. Based on the various modules provided by Qt, the technical solution of the embodiments of the present application is implemented. Among them, the substantial improvements over the prior art in the technical solution of the embodiments of the present application include improvements to some modules in Qt.
[0039] Qt: A cross-platform C++ graphical user interface application framework that provides application developers with almost all the functions needed to build state-of-the-art graphical user interfaces. Qt is easy to expand and allows true component programming. As a development framework, Qt has the following advantages: excellent cross-platform features, specifically reflected in the support of the following operating systems: Microsoft Windows, Linux, Solaris, SunOS, HP-UX, Digital UNIX (OSF / 1, Tru64), Irix, FreeBSD, BSD / OS, SCO, AIX, OS390, QNX, etc.; object-oriented: Qt's good encapsulation mechanism makes Qt very modular and reusable, which is very convenient for user development; support for 2D / 3D image rendering: support for OpenGL, and the Qt module also provides specific interfaces and properties that support OpenGL. Qt also has other advantages, which will not be repeated here for the sake of simplicity.
[0040] The Qt framework includes a variety of modules, which can be divided into: Qt basic modules and Qt extension modules according to the type of modules. Among them, the Qt basic module specifically includes the following modules: Qt Quick module, which provides functional classes for user interface layout, including QQuickWindow, QQuickView, etc.; Qt Gui module, which provides functions including integration with the window system, event processing, OpenGL and OpenGL ES integration, 2D image and font drag and drop, etc., and can be used to access the underlying OpenGL ES image API. The Qt Gui module provides common functions required by all graphical user interface programs. The Qt basic module also includes other modules, which will not be repeated here for the sake of simplicity.
[0041] Electronic ink screen: Ink screen for short, also known as electronic paper display technology. The display screen made of electronic ink, a new material, can display black and white patterns and texts like printed ones, so the display screen is also vividly called electronic paper. The electronic paper does not reflect light like traditional liquid crystal displays in the sun, and only consumes power when the pixel color changes (for example, from black to white). The screen image can still be retained after the power is turned off, so it is very energy-saving.
[0042] Shared memory: It is a communication method between multiple processes in an operating system. Multiple processes can pass messages through shared memory. This method has the advantages of being fast and efficient. In addition, the specific use of shared memory in the embodiments of the present application can refer to the prior art.
[0043] Polling: Polling is an event handling mechanism set for a process or thread. A relatively intuitive but less rigorous description is that a loop is started at a set time interval, and the specified process or thread is asked one by one to know whether the task on the process or thread is completed, whether the state of the process or thread has changed, etc. In Qt, QSGThreadRenderLoop is a class with polling function.
[0044] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0045] See also Figure 1 , the present application embodiment provides a flow chart of a method for refreshing an ink screen, the method comprising:
[0046] S110, when the application process writes the refresh parameter into the shared memory, the synthesis service process obtains the refresh parameter from the shared memory.
[0047] Among them, at least one application process and a synthesis service process are running on the operating system of the terminal device. The application process has a corresponding application interface, and the application interface is displayed on the ink screen of the terminal device.
[0048] In a possible implementation, the application process includes at least one page, each page includes a predefined interface, and the application process writes refresh parameters to the shared memory, specifically including: writing the refresh parameters to the shared memory according to the parameters defined in the predefined interface.
[0049] Specifically, the application process includes at least one Qt-based page, and each Qt-based page includes a predefined interface, and writes refresh parameters to the shared memory according to the parameters defined in the predefined interface. The refresh parameters may be a set including at least 2 parameters, and the refresh parameters may be specifically multiple key-value data.
[0050] Exemplarily, the Qt-based page can be a QQuickView page, and QQuickView inherits from QQuickWindow. Define an interface function refresh in QQuickWindow. Exemplarily, the interface function refresh can include 6 parameters. According to the form of key-value, the determined key value can be: length, width, height, data_type, refresh_mode, is_customized. Among them, if is_customized is true, it means that the custom refresh mode of the application process is used for refresh; if is_customized is false, it means that the system default refresh mode is used for refresh. Among them, the custom refresh mode represents a refresh mode selected from multiple refresh modes of the ink screen. Of course, in practice, according to the specific circumstances of the ink screen, operating system, etc., the parameters in the interface function can be flexibly set, such as adding, deleting, merging, replacing, etc. based on the above 6 parameters.
[0051] In addition, the refresh modes of the ink screen may include: INIT, GC16, DU, A2, etc. Each refresh mode has a different display effect. As shown in Table 1 below, different refresh modes correspond to different display methods and application scenarios.
[0052] Refresh Mode describe INIT Flashes black and white twice to initialize the screen. GC16 It can display 16 gray levels and will flicker. It is used for normal page refresh and clearing residual images. DU It can only display black or white, with a fast speed (220ms) and moderate image retention. A2 Can only display black or white, fast speed (120ms), moderate afterimage. … …
[0053] Table 1 Refresh mode of ink screen
[0054] For example, to display a colorful image, use GC16 (globalclear mode), which has the advantages of rich colors and less residual images, but has the disadvantages of slow refresh and flickering. To display an image that is only black and white, use DU (directupdate mode) or A2 mode, which has the advantages of fast speed and no flickering, but has the disadvantages of only being able to display black and white and having heavy residual images.
[0055] It can be seen from this that the corresponding refresh mode needs to be set according to the different images displayed on the application interface, otherwise an unfriendly afterimage phenomenon will occur when refreshing the ink screen.
[0056] S120: The synthesis service process performs a synthesis operation according to the rendering result transmitted by the application process.
[0057] Specifically, before the synthesis service process performs the synthesis operation, it can also perform basic rendering operations based on other content to be displayed on the page to obtain a rendering result. The synthesis operation is performed according to the received multiple rendering results to obtain the synthesis result. Usually, the current page of the terminal device mainly displays the interface corresponding to the application process of a certain application, but also displays other content that is not the application interface, such as: time icon, battery icon, etc.
[0058] Among them, after the application process writes the shared parameters into the shared memory, the synthesis service process obtains the shared parameters based on the polling mechanism, performs the rendering operation, and obtains the rendering result.
[0059] S130, the synthesis service process refreshes the ink screen according to the refresh parameters and the synthesis result.
[0060] Specifically, refreshing according to the system default refresh mode is an active refresh mode, and refreshing according to the application process customized refresh mode is a passive refresh mode. The refresh parameters include a judgment parameter for whether to refresh according to the customized refresh mode.
[0061] Exemplarily, is_customized in the interface function refresh may represent the judgment parameter.
[0062] In a possible implementation, when the refresh mode is a passive refresh mode, a custom refresh mode is determined from the refresh parameters, wherein the ink screen includes at least one custom refresh mode; the synthesis service process sends the synthesis result to the ink screen, and refreshes the ink screen according to the determined custom refresh mode;
[0063] In a possible implementation, when the refresh mode is an active refresh mode, the synthesis service process sends the synthesis result to the ink screen and refreshes the ink screen according to the default refresh mode of the terminal.
[0064] Among them, the system default refresh mode can be any refresh mode of the ink screen in Table 1, or other refresh modes.
[0065] The embodiment of the present application provides a method for refreshing an ink screen. The method uses shared memory as a communication mechanism between an application process and a synthetic service process. The application process transmits refresh parameters through the shared memory. After the synthetic service process obtains the refresh parameters, it can refresh the ink screen according to the refresh parameters. On the basis of the active refresh method of the operating system, a passive refresh method can also be provided for refreshing according to the instructions of the application process. The rich refresh methods enable the operating system to support ink screens that adapt to the passive refresh method, and the display effect of the terminal equipped with the ink screen is better.
[0066] The embodiment of the present application provides a possible implementation method, which includes: before the application process writes the refresh parameter to the shared memory,
[0067] Polling is configured for the composition service process; the composition service process detects write operations to the shared memory based on the polling.
[0068] Specifically, the synthesis service process detects whether there is a write refresh parameter in the shared memory according to polling.
[0069] Exemplarily, a QSGThreadRenderLoop instance object loop is configured for the composition service process, and in each cycle of the loop, it is detected whether there is new content in the shared memory, especially whether there is content defined by the refresh interface function.
[0070] In a possible implementation, when the application process writes the refresh parameter to the shared memory, the synthesis service process obtains the refresh parameter from the shared memory, including:
[0071] When it is detected that the refresh parameters are written to the shared memory, the synthesis service process obtains the refresh parameters from the shared memory.
[0072] Exemplarily, when there is a message for writing a refresh interface function in the shared memory, the synthesis service process obtains five parameters of the refresh interface function from the shared memory.
[0073] See also Figure 2 In order to more clearly describe the embodiment of the present application, the embodiment of the present application also provides a flowchart of a preliminary refresh process. Figure 2In the , the reading application process is the reading application process, and the compositor is the synthesis service process.
[0074] First, the reading application writes refresh parameters to the shared memory through the interface function refresh defined in QQuickWindow, the parent class of QQuickView, and obtains the rendering result of the display image of the application interface of the reading application based on the set business logic; the compositor detects the write operation in a new cycle of the configured polling loop and obtains the parameters, where loop is an instance object of the QSGThreadRenderLoop class; the compositor performs basic rendering operations after obtaining the parameters.
[0075] Secondly, after the reading application process performs rendering operations, the rendering results of the reading application process are obtained, and the compositor side also obtains the corresponding rendering results. The compositor side performs synthesis operations based on the obtained rendering results to obtain the synthesis results. Finally, it is determined whether the value of is_customized in the refresh parameter is true. If it is true, the custom refresh mode is used. If it is false, the system default refresh mode is used.
[0076] For example, the application process is a reading application process, and the application interface of the reading application process displays the 50th page of a book. When the device receives the page turning operation instruction input by the user, it forwards it to the reading application process for processing. Since the page turning operation involves a full refresh of the page, if the system default refresh mode is used, and if the default refresh mode is not GC16, it will cause a residual image phenomenon when refreshing the page. Therefore, it is necessary to set the refresh mode to GC16 and refresh the ink screen according to this refresh mode.
[0077] See also Figure 3 The present application embodiment also provides a schematic diagram of a structure of a device for refreshing an ink screen. The device 300 includes:
[0078] An application module 310 is used to call an application process to write refresh parameters into a shared memory;
[0079] The synthesis service module 320 is used to call the synthesis service process to obtain the refresh parameters from the shared memory when the application process writes the refresh parameters to the shared memory, and to call the synthesis service process to perform synthesis operations according to the rendering results transmitted by the application process, and refresh the ink screen according to the refresh parameters and the synthesis results.
[0080] In a possible implementation, the application process includes at least one page, each page includes a predefined interface, and the application module 310, when calling the application process to write the refresh parameter into the shared memory, is specifically used to:
[0081] Writes refresh parameters to the shared memory according to the parameters defined in the predefined interface.
[0082] In a possible implementation, the refresh parameter includes a refresh mode, and the synthesis service module 320 refreshes the ink screen according to the refresh parameter and the synthesis result in the synthesis service process, specifically for:
[0083] When the refresh mode is a passive refresh mode, a custom refresh mode is determined from the refresh parameters, wherein the ink screen includes at least one custom refresh mode; calling the synthesis service process to send the synthesis result to the ink screen, and refreshing the ink screen according to the determined custom refresh mode;
[0084] or,
[0085] When the refresh mode is active refresh mode, the synthesis service process is called to send the synthesis result to the ink screen, and the ink screen is refreshed according to the default refresh mode of the terminal.
[0086] In a possible implementation, before the application process writes the refresh parameter into the shared memory, the synthesis service module 320 is further configured to:
[0087] Configure polling for the composite service process;
[0088] The composite service process is called to detect the write operation of the shared memory based on polling.
[0089] In a possible implementation, when the application process writes the refresh parameter to the shared memory, the synthesis service process obtains the refresh parameter from the shared memory, including:
[0090] When it is detected that the refresh parameters are written to the shared memory, the synthesis service process obtains the refresh parameters from the shared memory.
[0091] The device for refreshing the ink screen provided in this embodiment can execute the steps of the method for refreshing the ink screen shown in the previous embodiments of the present application. The implementation principle is similar and will not be repeated here.
[0092] An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, and the processor executes the above-mentioned computer program to implement the steps of the method for refreshing the ink screen.
[0093] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0094] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.
[0095] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0096] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A method for refreshing an ink screen, characterized in that: include: The application process writes the refresh parameters into the shared memory according to the parameters defined in the predefined interface, the application process comprising at least one page, each page comprising the predefined interface; The synthesis service process obtains the refresh parameter from the shared memory; The synthesis service process performs a synthesis operation according to the rendering result transmitted by the application process to obtain a synthesis result; When the refresh mode is a passive refresh mode, a custom refresh mode is determined from the refresh parameters, wherein the ink screen includes at least one custom refresh mode; The synthesis service process sends the synthesis result to the ink screen, and refreshes the ink screen according to the determined custom refresh mode; or, When the refresh mode is an active refresh mode, the synthesis service process sends the synthesis result to the ink screen and refreshes the ink screen according to the default refresh mode of the terminal.
2. The method according to claim 1, characterized in that: Before the application process writes the refresh parameters into the shared memory, it includes: configuring polling for the synthetic service process; The synthesis service process detects the write operation of the shared memory according to the polling.
3. The method according to claim 2, characterized in that The synthesis service process obtains the refresh parameter from the shared memory, including: When it is detected that the refresh parameter is written into the shared memory, the synthesis service process obtains the refresh parameter from the shared memory.
4. A device for refreshing an ink screen, characterized in that: The device comprises: An application module, used for calling an application process to write refresh parameters into the shared memory according to parameters defined in a predefined interface, wherein the application process includes at least one page, and each page includes the predefined interface; A synthesis service module, used for calling a synthesis service process to obtain the refresh parameter from the shared memory, and calling the synthesis service process to perform a synthesis operation according to the rendering result transmitted by the application process to obtain a synthesis result; The synthesis service module is also used to determine a custom refresh mode from the refresh parameters when the refresh mode is a passive refresh mode, wherein the ink screen includes at least one custom refresh mode; call the synthesis service process to send the synthesis result to the ink screen, and refresh the ink screen according to the determined custom refresh mode; or, when the refresh mode is an active refresh mode, call the synthesis service process to send the synthesis result to the ink screen, and refresh the ink screen according to the terminal default refresh mode.
5. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of a method for refreshing an ink screen as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for refreshing an ink screen as described in any one of claims 1 to 3 are implemented.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of a method for refreshing an ink screen as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Android system-based electronic ink screen refresh control system and method
CN101980072A
Refreshing control method and system of electronic paper screen
CN102013247A