Writing trajectory display method, device and storage medium
By receiving writing operations and rendering color information in the smart tablet device, generating and rendering writing thrusts, the problems of insufficient display delay and bandwidth of the writing trajectory are solved, and the user experience and the efficiency of the hardware display layer are improved.
Patent Information
- Application Number
- CN202210130266.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-11
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-02-11
AI Technical Summary
Smart tablet devices have delays when displaying writing tracks, resulting in poor user experience. At the same time, increasing the amount of data used for color expression in the hardware display layer will lead to insufficient bandwidth.
By receiving the user's writing operations and rendering color information, a writing track is generated, and based on the correspondence between the preset color index and the color information, the color index corresponding to the writing track is determined, and each pixel point is determined from the preconfigured palette. The corresponding color information is finally rendered in the hardware display layer.
It realizes the visual effect to give users a sense of handwriting and hand, improves the user experience, and reduces the amount of data used for color expression in the hardware display layer, solving the problem of insufficient bandwidth.
Smart Images

Figure CN114610186B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of interactive smart tablets, and in particular to a writing trajectory display method, device and storage medium. Background Art
[0002] When each operating system (such as Windows system, Android system or Linux system) displays a window, its window management service comes from different components and system windows. Taking the Android system as an example, each window corresponds to a Surface object (Surface is essentially a memory area), and each Surface object corresponds to a Layer value (level). If the Layer value is larger, the corresponding window will be displayed on the top, blocking other windows.
[0003] Each time the rendering program in each operating system updates the display screen, it needs to superimpose all the Surface objects corresponding to all the display windows on the display screen according to the size of their own Layer to form a bitmap file of the same size as the display screen, and render this bitmap file into an idle Framebuffer (Framebuffer is a video output device that drives a video display device from a memory buffer containing complete frame data, which is specifically a driver interface), and wait for the vsync signal (vertical synchronization signal) to enable the rendering program to use the idle Framebuffer as the currently displayed Framebuffer according to the vsync signal, so that the picture is displayed on the monitor, and the rendering update of the display screen is completed.
[0004] For electronic devices with touch-sensitive display screens, such as smart tablets, when a user writes by touch on the display screen, in the process of refreshing the display screen to display the user's writing trajectory using the above method, the superposition and synthesis of the writing trajectory of the Surface object and waiting for the vsync signal require a certain amount of time, so the writing trajectory display on the display screen will be delayed. As a result, the writing trajectory on the screen will not follow the user's writing and will not be displayed synchronously, resulting in a poor user experience.
[0005] In view of this, the related technology is to draw the writing track directly on the Framebuffer corresponding to an idle hardware display layer. However, in order to improve user experience, it is necessary not only to consider the problem of writing track display delay, but also to ensure that the writing track is clear enough in terms of color expression, that is, to set the amount of data used for color expression in the hardware display layer to be higher. Once the amount of data used for color expression in the hardware display layer is set to be higher, the problem of insufficient bandwidth will arise, resulting in abnormal or lost images displayed on the screen. Summary of the invention
[0006] Multiple aspects of the present application provide a writing trajectory display method, device and storage medium, which speed up the display of writing trajectories on the writing interface, give users a sense of handwriting following their hands in visual effects, improve the user's experience, and at the same time reduce the amount of data used for color expression in the hardware display layer, solving the problem of insufficient bandwidth caused by setting the amount of data used for color expression in the hardware display layer to a higher level.
[0007] The present application provides a writing track display method, including:
[0008] Receive user's writing operation and rendering color information;
[0009] Generate a writing track according to the writing operation, and determine a color index corresponding to the writing track according to the rendering color information based on a preset correspondence between the color index and the color information;
[0010] Determining color information corresponding to a plurality of pixel points forming the writing track from a pre-configured color palette according to the color index, wherein the color palette contains a correspondence between the color index and the color information;
[0011] The writing track is rendered in a hardware display layer based on color information corresponding to the multiple pixel points.
[0012] The present application also provides a writing track display device, including:
[0013] A receiving module, used to receive the user's writing operation and rendering color information;
[0014] A generating module, configured to generate a writing track according to the writing operation, and determine a color index corresponding to the writing track according to the rendering color information based on a preset correspondence between the color index and the color information;
[0015] A determination module, configured to determine color information corresponding to a plurality of pixel points forming the writing track from a pre-configured color palette according to the color index, wherein the color palette contains a correspondence between the color index and the color information;
[0016] The display module is used to render the writing track on a hardware display layer based on the color information corresponding to the multiple pixels.
[0017] The present application also provides an electronic device, including:
[0018] processor;
[0019] a memory for storing instructions executable by the processor;
[0020] Wherein, the processor is configured to execute the instructions to implement the above-mentioned writing trajectory display method.
[0021] An embodiment of the present application also provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the above-mentioned writing trajectory display method.
[0022] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned writing trajectory display method when executed by a processor.
[0023] In the embodiment of the present application, by receiving the writing operation and rendering color information of the user, a writing track is generated according to the writing operation, and based on the correspondence between the preset color index and the color information, the color index corresponding to each pixel forming the writing track is determined according to the rendering color information, and then the color information corresponding to each pixel is determined from the pre-configured color palette according to the color index, and then based on the color information corresponding to each pixel, the writing track can be rendered in the hardware display layer, that is, the present application pre-configures the color palette, and determines the color information corresponding to each pixel from the color palette according to the color index, and then renders the writing track in the hardware display layer, thereby reducing the amount of data used for color expression in the hardware display layer. It should be noted that in the related art, the writing track is composed of multiple pixels, and each pixel has a lot of RGBA (red, green, blue, transparent color) data, which will occupy a lot of memory, while the present application only requires one color index in each pixel, and the amount of data and the memory occupied are relatively small. Therefore, the present application reduces the amount of data used for color expression in the hardware display layer, and solves the problem of insufficient bandwidth when the amount of data used for color expression in the hardware display layer is set high. In addition, since the hardware display layer has a smaller display delay than the software layer, rendering the writing trajectory in the hardware display layer and synthesizing it through the hardware display layer channel can speed up the display speed of the writing trajectory on the writing interface, giving the user a feeling of handwriting following the hand in terms of visual effects, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0025] Figure 1 A schematic diagram of a flow chart of a writing track display method provided in an embodiment of the present application;
[0026] Figure 2A further flow chart of the writing track display method provided in the embodiment of the present application;
[0027] Figure 3 A schematic diagram of the structure of a writing track display device provided in an embodiment of the present application;
[0028] Figure 4 Another structural schematic diagram of the writing trajectory display device provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0031] In view of the problem that the writing track on the screen does not follow the user's writing and is displayed synchronously, and the problem of insufficient bandwidth when the amount of data used for color expression in the hardware display layer is set to a high level, in some embodiments of the present application, by receiving the user's writing operation and rendering color information, a writing track is generated according to the writing operation, and the color index corresponding to each pixel point forming the writing track is determined according to the rendering color information, and then the color information corresponding to each pixel point is determined from a pre-configured color palette according to the color index, and then based on the color information corresponding to each pixel point, the writing track can be rendered in the hardware display layer. That is, the present application pre-configures a color palette, and determines the color information corresponding to each pixel point from the color palette according to the color index, and then renders the writing track in the hardware display layer, thereby reducing the amount of data used for color expression in the hardware display layer. It should be noted that in the related art, the writing track is composed of multiple pixels, and each pixel has a lot of RGBA (red, green, blue, transparent) data, which will take up a lot of memory. However, the present application only requires one color index to be present in each pixel, and the amount of data and the memory occupied are relatively small. Therefore, the present application reduces the amount of data used for color expression in the hardware display layer, and solves the problem of insufficient bandwidth when the amount of data used for color expression in the hardware display layer is set high. In addition, since the hardware display layer has a smaller display delay than the software layer, rendering the writing track in the hardware display layer and synthesizing it through the hardware display layer channel can speed up the display speed of the writing track on the writing interface, giving the user a sense of handwriting following the hand in terms of visual effect, and improving the user experience.
[0032] The writing trajectory display method provided in the embodiment of the present application can be executed by a terminal device, which can be implemented by software and / or hardware. The terminal device can be composed of two or more physical entities, or it can be composed of one physical entity. The terminal device can be a computer, a mobile phone, a tablet, a projector or an interactive smart tablet, etc. In the embodiment, an interactive smart tablet is used as an example for description, wherein the interactive smart tablet can be an integrated device that controls the content displayed on the display tablet and realizes human-computer interaction through touch technology, which integrates one or more functions such as a projector, an electronic whiteboard, a screen, a stereo, a television, and a video conferencing terminal.
[0033] In an embodiment, the interactive smart tablet display screen is a touch screen, which includes a capacitive screen, an electromagnetic screen, or an infrared screen. The touch screen can receive touch operations input by a user through a finger or an input device. Among them, the input device includes but is not limited to: a capacitive pen, an electromagnetic pen and / or an infrared pen. In addition, the smart interactive tablet can establish a data connection with at least one external device. Among them, the external device includes but is not limited to: a stylus, a mouse. The communication method of the data connection between the external device and the smart interactive tablet is not limited in the embodiment, and can be connected through USB, the Internet, a local area network, Bluetooth, Wi-Fi or ZigBee protocol and other communication methods.
[0034] In an embodiment, the main controller of the interactive smart tablet runs the Android system. In addition, the computing module connected to the main controller can also run a PC system, such as a Windows system, that is, the user interface displayed by the interactive smart tablet can be either an Android system user interface or a Windows system user interface. The user can switch the interface display as needed.
[0035] Optionally, the interactive smart tablet is installed with writing application software such as electronic whiteboard software and annotation software. The writing application software can be pre-installed in the above-mentioned interactive smart tablet, or it can be downloaded and installed from a third-party device or server after the interactive smart tablet is started. Among them, the third-party device is not limited in the embodiment. The user can perform writing operations through the writing software installed on the smart interactive tablet. The following is an example of the writing track display process of the Android system. Of course, the operation process of the writing track display method on other operating systems such as window system, Linux system, etc. is similar to the operation process on the Android system, which will not be repeated here.
[0036] Figure 1 A flowchart of a writing track display method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:
[0037] Step 101, receive the user's writing operation and rendering color information.
[0038] In this embodiment, when it is detected that the user performs a writing operation on the writing interface of the writing software of the intelligent interaction tablet, the intelligent interaction tablet can obtain the writing operation on the current writing interface, and the writing operation is a screen touch event within the range of the current writing interface. For this screen touch event, for example, it can be: a paragraph of text written by the user, or a graphic drawn by the user, etc. And the rendering color information is the color corresponding to the writing operation, such as yellow, green, etc. For the user's writing operation and rendering color information, for example, the user wants to draw a yellow (corresponding to the rendering color information) circle (corresponding to the writing operation), or a black horizontal line, etc.
[0039] Step 102, generate a writing trajectory according to the writing operation, and based on the preset correspondence between the color index and the color information, determine the color index corresponding to each pixel point forming the writing trajectory according to the rendering color information.
[0040] It should be understood that the writing trajectory is formed by multiple pixel points. After receiving the user's current writing operation, the writing trajectory can be generated according to the writing operation, and the color index corresponding to the writing trajectory can be determined according to the rendering color information. For example, when the writing trajectory generated according to the user's writing operation is "Zhang", taking the specific manifestation form of the color index as a digital form as an example, assuming that the rendering color information of "bow" given by the user at this time is yellow, and the rendering color information of "long" is green, then according to the above rendering color information, the color information corresponding to each pixel point forming "bow" is determined to be yellow, and its corresponding color index is determined to be 1; the color information corresponding to each pixel point forming "long" is determined to be green, and its corresponding color index is determined to be 2. It should be understood that since there is a preset correspondence between the color information and the color index. Therefore, the color information corresponding to each pixel point forming the writing trajectory can be determined according to the rendering color information, and then the color index can be determined according to the preset correspondence between the color information and the color index.
[0041] Step 103, determine the color information corresponding to each pixel point from the pre-configured color palette according to the color index, where the color palette contains the correspondence between the color index and the color information.
[0042] In this embodiment, the color palette is pre-configured, which contains the correspondence between the color index and the color information, and this correspondence is the same as the "preset correspondence between the color index and the color information" in step 102. Specifically, such as Figure 2As shown, before receiving the writing operation of the user, the writing track display method further includes:
[0043] Step 201: Determine the color information in the color palette according to the multiple colors supported by the writing software.
[0044] Step 202: Create a correspondence between the color information in the color palette and the color index.
[0045] It should be understood that in order to further reduce the amount of data used for color expression in the hardware display layer, it is sufficient to configure the multiple colors supported by the current writing software in the color palette. For example, if the current writing software supports four colors: red, yellow, blue, and green, then only these four colors need to be configured in the color palette. Of course, this is not limited to this. Any color can be configured in the color palette as long as it is a color supported by the writing software. This application can be applied to multiple color formats such as RGB565, YUV422, and YUV420.
[0046] For the correspondence between color information and color index, for example, the correspondence can form a correspondence table, that is, 1 corresponds to yellow, 2 corresponds to green, 3 corresponds to white, etc., so that the color information corresponding to each pixel point can be directly determined from the pre-configured palette according to the color index.
[0047] In order to ensure the smooth application of the color palette on the hardware display layer, before determining the color information corresponding to each pixel from the pre-configured color palette according to the color index, the method further includes:
[0048] The pre-configured color palette is allocated to the hardware display layer, that is, the pre-configured color palette is configured on the hardware display layer so that it has the color palette function.
[0049] Step 104: Render the writing track in the hardware display layer based on the color information corresponding to each pixel.
[0050] After the color information corresponding to the writing track is determined, the writing track with the color information can be displayed in the hardware layer.
[0051] In the embodiment of the present application, in order to allocate appropriate memory space for the writing track, before the hardware display layer displays the writing track, the method further includes:
[0052] According to the display delay characteristics corresponding to the writing software, the size of the acceleration area is determined in the hardware display layer, and a memory space matching the size of the acceleration area is allocated. The writing operation is triggered during the use of the writing software.
[0053] Specifically, for example, when writing is performed in the first writing software, the writing whiteboard in the first writing software has a high latency, so more parts need to be accelerated, and the acceleration area should be set larger. On the contrary, when writing is performed in the second writing software, the writing whiteboard in the second writing software is very sensitive and has a low latency, so less parts need to be accelerated, and the acceleration area can be set relatively small. Assuming that the starting position of the writing operation is located at the center of the writing screen, the position of the acceleration area in the hardware display layer is determined to be the center of the writing screen.
[0054] It should be noted that after the user draws the writing track on the hardware display layer, the hardware display layer can be synthesized with other hardware display layers (such as the hardware mouse layer, etc.), and then wait for the vertical synchronization signal. After the vertical synchronization signal arrives, the writing track is sent to the hardware display screen for display. Based on this, in order to smoothly display the writing track on the hardware display layer, in the embodiment of the present application, the writing track is rendered on the hardware display layer, including:
[0055] The writing track drawn in the memory space matching the hardware display layer is read to render the writing track in the hardware display layer.
[0056] In order to improve the user experience and facilitate the user to write on the writing software, the hardware display layer can be initialized as a display layer with a preset background color, and the preset background color is one of the multiple colors supported by the writing software. For example, the colors supported by the writing software may be red, green, black, etc., and the preset background color may be red, and the specific color may be customized by the user.
[0057] In addition, it should be noted that if the user reopens another writing software, or the current writing software has multiple pages and the user changes pages, then the hardware display layer background color is reconfigured and the above steps are performed.
[0058] A specific embodiment is provided below to illustrate the technical solution of the present application:
[0059] S1. According to the multiple colors supported by the writing software, the color information in the color palette is determined, and a corresponding relationship between the color information in the color palette and the color index is created.
[0060] S2. Allocate memory space that matches the size of the hardware display layer acceleration area.
[0061] S3. Initialize the memory space to a preset background color.
[0062] S4. Configure the color palette at the hardware display layer.
[0063] S5. Generate a writing track according to the current writing operation, and determine the color index corresponding to each pixel point forming the writing track according to the rendering color information input by the user.
[0064] S6. Determine the color information corresponding to each pixel from a pre-configured color palette according to the color index.
[0065] S7. Based on the color information corresponding to each pixel in the writing trajectory, the writing trajectory is rendered in the hardware display layer, and the hardware display layer is synthesized with other hardware display layers. After the vertical synchronization signal arrives, the writing trajectory is rendered in the hardware display layer.
[0066] Based on the same inventive concept, a writing trajectory display device is also provided in the embodiments of the present application, such as the following embodiments. Since the principle of solving the problem by the writing trajectory display device is similar to that of the writing trajectory display method, the implementation of the writing trajectory display device can refer to the implementation of the writing trajectory display method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements the predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0067] Figure 3 This is a schematic diagram of the structure of a writing track display device provided in an embodiment of the present application. Figure 3 As shown, the device comprises:
[0068] A receiving module 301 is used to receive a user's writing operation and rendering color information;
[0069] A generating module 302, configured to generate a writing track according to the writing operation, and determine the color index corresponding to each pixel point forming the writing track according to the rendering color information based on the correspondence between the preset color index and the color information;
[0070] A determination module 303 is used to determine the color information corresponding to each pixel from a pre-configured color palette according to the color index, wherein the color palette contains the correspondence between the color index and the color information;
[0071] The display module 304 is used to render the writing track on the hardware display layer based on the color information corresponding to each pixel.
[0072] In the embodiments of the present application, Figure 4 As shown, the device also includes:
[0073] The first module 401 is used to determine the color information in the color palette according to the multiple colors supported by the writing software;
[0074] The second module 402 is used to create a corresponding relationship between the color information in the color palette and the color index.
[0075] In an embodiment of the present application, the hardware display layer is initialized as a display layer having a preset background color, and the preset background color is one of the multiple colors supported by the writing software.
[0076] In the embodiment of the present application, the device further includes:
[0077] An allocation module is used to determine the size of the acceleration area in the hardware display layer according to the display delay characteristics corresponding to the writing software, and allocate memory space matching the size of the acceleration area, wherein the writing operation is triggered during the use of the writing software.
[0078] Allocate memory space that matches the size of the hardware display layer.
[0079] In the embodiment of the present application, the display module 304 is further used for:
[0080] The writing track drawn in the memory space matching the hardware display layer is read to render the writing track in the hardware display layer.
[0081] In the embodiment of the present application, the device further includes:
[0082] The third module is used to allocate the pre-configured palette to the hardware display layer.
[0083] Figure 5 1 is a block diagram of an electronic device according to an exemplary embodiment. The electronic device 500 may be an electronic device used by a user. The electronic device 500 may be a smart phone, a smart watch, a desktop computer, a laptop computer, a laptop electronic device, a desktop electronic device, or other names.
[0084] Typically, the electronic device 500 includes a processor 501 and a memory 502 .
[0085] Among them, the processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 501 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 501 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 501 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 501 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0086] The memory 502 may include one or more storage media, which may be non-transitory. The memory 502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices.
[0087] In some embodiments, the electronic device 500 may further optionally include: a peripheral device interface 503 and at least one peripheral device. The processor 501, the memory 502 and the peripheral device interface 503 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 503 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 504, a display screen 505, a camera assembly 506, an audio circuit 507, a positioning assembly 508 and a power supply 509.
[0088] The peripheral device interface 503 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 501 and the memory 502. In some embodiments, the processor 501, the memory 502, and the peripheral device interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 501, the memory 502, and the peripheral device interface 503 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0089] The radio frequency circuit 504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 504 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 504 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 504 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 504 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0090] The display screen 505 is used to display a UI (User Interface). The UI may include images, texts, icons, videos, and any combination thereof. When the display screen 505 is a touch display screen, the display screen 505 also has the ability to collect touch signals on the surface or above the surface of the display screen 505. The touch signal can be input to the processor 501 as a control signal for processing. At this time, the display screen 505 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 505 can be one, and the front panel of the electronic device 500 is set; in other embodiments, the display screen 505 can be at least two, which are respectively set on different surfaces of the electronic device 500 or are folded; in some other embodiments, the display screen 505 can be a flexible display screen, which is set on the curved surface or folded surface of the electronic device 500. Even, the display screen 505 can also be set to a non-rectangular irregular image, that is, a special-shaped screen. The display screen 505 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0091] The camera assembly 506 is used to capture images or videos. Optionally, the camera assembly 506 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 506 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0092] The audio circuit 507 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 501 for processing, or input them into the radio frequency circuit 504 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the electronic device 500. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 501 or the radio frequency circuit 504 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 507 may also include a headphone jack.
[0093] Positioning component 508 is used to locate the current geographic location of electronic device 500 to implement navigation or LBS (Location Based Service). Positioning component 508 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.
[0094] The power supply 509 is used to power various components in the electronic device 500. The power supply 509 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 509 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0095] In some embodiments, the electronic device 500 further includes one or more sensors 510 , including but not limited to: an acceleration sensor 511 , a gyroscope sensor 512 , a pressure sensor 513 , a fingerprint sensor 514 , an optical sensor 515 , and a proximity sensor 516 .
[0096] The acceleration sensor 511 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the electronic device 500. For example, the acceleration sensor 511 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 501 can control the display screen 505 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 511. The acceleration sensor 511 can also be used for collecting game or user motion data.
[0097] The gyro sensor 512 can detect the body direction and rotation angle of the electronic device 500, and the gyro sensor 512 can cooperate with the acceleration sensor 511 to collect the user's 3D actions on the electronic device 500. The processor 501 can implement the following functions based on the data collected by the gyro sensor 512: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0098] The pressure sensor 513 can be set on the side frame of the electronic device 500 and / or the lower layer of the display screen 505. When the pressure sensor 513 is set on the side frame of the electronic device 500, it can detect the user's holding signal of the electronic device 500, and the processor 501 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 513. When the pressure sensor 513 is set on the lower layer of the display screen 505, the processor 501 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 505. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0099] The fingerprint sensor 514 is used to collect the user's fingerprint, and the processor 501 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the user's identity based on the collected fingerprint. When the user's identity is recognized as a trusted identity, the processor 501 authorizes the user to perform relevant sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 514 can be set on the front, back, or side of the electronic device 500. When a physical button or a manufacturer logo is set on the electronic device 500, the fingerprint sensor 514 can be integrated with the physical button or the manufacturer logo.
[0100] The optical sensor 515 is used to collect the ambient light intensity. In one embodiment, the processor 501 can control the display brightness of the display screen 505 according to the ambient light intensity collected by the optical sensor 515. Specifically, when the ambient light intensity is high, the display brightness of the display screen 505 is increased; when the ambient light intensity is low, the display brightness of the display screen 505 is reduced. In another embodiment, the processor 501 can also dynamically adjust the shooting parameters of the camera component 506 according to the ambient light intensity collected by the optical sensor 515.
[0101] The proximity sensor 516, also called a distance sensor, is usually disposed on the front panel of the electronic device 500. The proximity sensor 516 is used to collect the distance between the user and the front of the electronic device 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front of the electronic device 500 is gradually decreasing, the processor 501 controls the display screen 505 to switch from the screen-on state to the screen-off state; when the proximity sensor 516 detects that the distance between the user and the front of the electronic device 500 is gradually increasing, the processor 501 controls the display screen 505 to switch from the screen-off state to the screen-on state.
[0102] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the electronic device 500, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0103] In an exemplary embodiment, the present application further provides a computer-readable storage medium including instructions, such as a memory including instructions, and the above instructions can be executed by the processor 501 of the electronic device 500 to complete the above writing trajectory display method. Optionally, the storage medium can be a non-temporary storage medium, for example, the non-temporary storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0104] In an exemplary embodiment, the present application also provides a computer program product, including a computer program, which can be executed by a processor of an electronic device to implement the above-mentioned writing trajectory display method.
[0105] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0106] The above is only the embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A writing trajectory display method, characterized in that: include: Receive user's writing operation and rendering color information; Generate a writing track according to the writing operation, and determine the color index corresponding to each pixel point forming the writing track according to the rendering color information based on the correspondence between the preset color index and the color information; Determining color information corresponding to each pixel from a preconfigured color palette according to the color index, wherein the color palette contains a correspondence between the color index and the color information; Rendering the writing track on a hardware display layer based on the color information corresponding to each pixel point; Before rendering the writing trajectory in the hardware display layer, the method also includes: determining the size of the acceleration area in the hardware display layer according to the display delay characteristics corresponding to the writing software, and allocating memory space matching the size of the acceleration area, wherein the writing operation is triggered during the use of the writing software.
2. The method according to claim 1, characterized in that Before receiving the writing operation of the user, the method further includes: Determining color information in the color palette according to a plurality of colors supported by the writing software; A correspondence between the color information in the color palette and the color index is created.
3. The method according to claim 2, characterized in that The hardware display layer is initialized as a display layer with a preset background color, and the preset background color is one of a plurality of colors supported by the writing software.
4. The method according to claim 1, characterized in that The rendering of the writing track in the hardware display layer includes: The writing track drawn in the memory space matching the hardware display layer is read to render the writing track in the hardware display layer.
5. The method according to claim 1, characterized in that Before determining the color information corresponding to each pixel from a preconfigured color palette according to the color index, the method further includes: Assign a preconfigured color palette to the hardware display layer.
6. A writing track display device, characterized in that: include: A receiving module, used to receive the user's writing operation and rendering color information; A generating module, configured to generate a writing track according to the writing operation, and determine a color index corresponding to each pixel point forming the writing track according to the rendering color information based on a preset correspondence between the color index and the color information; A determination module, configured to determine the color information corresponding to each pixel from a pre-configured color palette according to the color index, wherein the color palette contains a correspondence between the color index and the color information; A display module, used for rendering the writing track on a hardware display layer based on the color information corresponding to each pixel point; An allocation module is used to determine the size of the acceleration area in the hardware display layer according to the display delay characteristics corresponding to the writing software, and allocate memory space matching the size of the acceleration area, wherein the writing operation is triggered during the use of the writing software.
7. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the writing trajectory display method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the writing trajectory display method as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the writing trajectory display method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Bidirectional display and reduction method for instant messaging handwriting as well as related system and method
CN103744555A
Text display method and display equipment
CN112286475A