WO2025246293A1 - 交互方法、电子设备和计算机存储介质 - Google Patents
交互方法、电子设备和计算机存储介质Info
- Publication number
- WO2025246293A1 WO2025246293A1 PCT/CN2024/139889 CN2024139889W WO2025246293A1 WO 2025246293 A1 WO2025246293 A1 WO 2025246293A1 CN 2024139889 W CN2024139889 W CN 2024139889W WO 2025246293 A1 WO2025246293 A1 WO 2025246293A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- handwriting
- screen
- displayed
- wallpaper
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
Definitions
- AOD Always On Display
- AOD technology meets the user's need to quickly obtain information such as time in screen-off scenarios, but it does not support interaction with the user and cannot meet the user's possible interaction needs in screen-off scenarios.
- This application discloses an interaction method, an electronic device, and a computer storage medium, which can display corresponding content based on the user's actions when the electronic device is in a screen-off state, interact with the user, and improve the user experience.
- this application provides an interaction method applied to an electronic device, the method comprising: determining that the screen of the electronic device is in a screen-off state; detecting a first action of a user; and, in response to the first action, displaying first content in the screen-off state; wherein the first content corresponds to the first action.
- the screen-off state refers to the state of an electronic device from when the screen is turned off until the user wakes the screen.
- This state can include screen-off, partial display, or full-screen dimming.
- Screen-off means the screen is completely off, and all pixels on the display do not emit light; this includes both active and passive light emission.
- Partial display means some pixels on the screen emit light, while the rest do not.
- Full-screen dimming means all pixels on the screen emit light, but after dimming or brightness reduction, the brightness of all pixels is below a preset threshold.
- the above method displays content corresponding to the user's action after the user performs an action, supports interaction with the user, meets the user's interaction needs in screen-off scenarios, and enriches the user experience.
- displaying the first content includes: displaying the first handwriting; the first handwriting corresponds to the first action.
- the above method displays handwriting corresponding to the user's action when the screen is off. For example, if the user's finger makes a writing or drawing motion on the screen, the screen displays handwriting corresponding to the action, allowing the user to experience the interactive fun of "writing" on the screen when the electronic device is off, increasing the fun.
- the background can include wallpaper, which can be static or dynamic, or a full-screen wallpaper or a partial wallpaper.
- Specified information can include one or more of the following: time, date (including Gregorian and/or Lunar calendar dates), weather, battery level, notification messages, etc.
- the background and the first handwriting are displayed.
- the first handwriting and the background can be displayed independently on the screen, or the first handwriting can be displayed over the background.
- the background can be a full-screen wallpaper, and the handwriting can be displayed over the full-screen wallpaper; alternatively, the background can be a partial wallpaper (referred to as layout wallpaper) and information such as time, and the handwriting can be displayed separately from the partial wallpaper, or partially or completely over the partial wallpaper.
- the background includes a first wallpaper, and the first handwriting is displayed on the first wallpaper; wherein the first handwriting is transparent; and the area on the first wallpaper covered by the first handwriting is displayed through the first handwriting.
- the second transparency is less than the first transparency.
- the first wallpaper displayed with a first transparency
- each pixel in the first overlay has a first transparency.
- the first handwriting, displayed with a second transparency is obtained by overlaying a second overlay on the first wallpaper; the second overlay is obtained by mixing the first overlay with the first handwriting; the pixels corresponding to the first handwriting in the second overlay have a second transparency.
- the second transparency is less than the first transparency.
- the displayed handwriting becomes transparent and its transparency (second transparency) is less than the transparency (first transparency) of the wallpaper that was originally darkened. This allows the handwriting to show through the darkened wallpaper in the area covered by the handwriting, creating an effect where the area where the handwriting passed is brightened, giving the user an interactive experience similar to "wiping glass".
- the background includes a first wallpaper; displaying the background can be done by displaying the first wallpaper at a first brightness. Displaying the background and the first handwriting can be done by displaying the first handwriting on the first wallpaper; wherein the first handwriting is displayed at a second brightness; the second brightness is different from the first brightness.
- displaying the first handwriting includes: displaying the first handwriting with a specified style.
- displaying a first handwriting with a specified style includes: displaying a first handwriting comprising multiple stroke elements; the multiple stroke elements being brush elements conforming to the specified style.
- displaying the first handwriting includes: displaying a first handwriting with varying line thickness; wherein the line thickness is determined based on the speed and/or pressure corresponding to the first action.
- One possible implementation involves displaying the first handwriting, including displaying a first handwriting with a constant line thickness.
- displaying the first handwriting includes: displaying the first handwriting including the first stroke; wherein the starting point and/or ending point of the first stroke is displayed in a first manner; the middle part of the first stroke is displayed in a second manner, the first manner being different from the second manner; wherein the middle part is the stroke between the starting point and the ending point of the first stroke.
- a first handwriting including a first stroke is displayed; wherein the first stroke includes multiple first stroke elements, the distribution direction of the multiple first stroke elements is determined according to the direction in which the user makes the first stroke action on the screen; the first action includes a first stroke action.
- the style is specified as sand art or crayon; displaying a first handwriting comprising multiple stroke elements includes: displaying a first stroke element and/or a second stroke element; wherein the multiple stroke elements include a first stroke element and/or a second stroke element; the first handwriting comprises multiple sampling points; the first stroke element is obtained by rotating an original stroke element; the second stroke element is obtained by jittering the position of the original stroke element relative to a sampling point.
- this application provides an electronic device, including a memory for storing a computer program; and a processor for executing the computer program in the memory to perform the interactive method provided by the first aspect of this application and any implementation thereof.
- this application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the interaction method provided by the first aspect of this application and any implementation thereof.
- this application provides an electronic device that includes the methods or apparatus described in any aspect or embodiment of this application.
- the aforementioned electronic device is, for example, a chip.
- Figure 4 is a schematic diagram of the software layered architecture on the AP side of an electronic device provided in this application;
- Figure 5 is an example diagram of an interaction method provided in this application in a practical application scenario
- Figures 7a to 7h are multiple example diagrams showing the handwriting displayed by the interactive method provided in this application in a real-world application scenario
- Figure 9 is a flowchart illustrating an embodiment of an interaction method provided in this application.
- Figure 10 is a schematic diagram of generating handwriting based on action data in one embodiment of an interaction method provided in this application;
- Figure 11 is a schematic diagram of brush elements with different styles in one embodiment of an interaction method provided in this application.
- Figure 12 is a schematic diagram of generating a corresponding Bézier curve based on the user's action trajectory in one embodiment of an interaction method provided in this application;
- Figure 13 is a schematic diagram of the process framework for generating handwriting using a stylus, sand painting, and crayon styles in one embodiment of an interactive method provided in this application.
- Figure 14 is a schematic diagram of the process framework for random rotation and position jitter processing when sand painting and crayon generate handwriting in an embodiment of an interactive method provided in this application.
- Figure 15 is a schematic diagram of random rotation during handwriting generation in one embodiment of an interactive method provided in this application.
- Figure 16 is a schematic diagram of position jitter when generating handwriting in one embodiment of an interactive method provided in this application;
- Figure 17 is a schematic diagram of the process framework for generating handwriting in the ink wash style in one embodiment of an interactive method provided in this application;
- Figure 18 is a schematic diagram showing how the direction of the brush element changes with the direction of the pen stroke in one embodiment of an interaction method provided in this application;
- Figure 19 is a flowchart illustrating layer blending processing in one embodiment of an interactive method provided in this application.
- Figure 20 is an example interface diagram showing the display effect of handwriting gradually disappearing over time in one embodiment of an interactive method provided in this application;
- A/B can mean A or B.
- the word "and/or” in the text is merely a description of the relationship between related objects, indicating that three relationships can exist.
- a and/or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.
- “multiple" refers to two or more.
- first and second are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated.
- a feature defined as “first” or “second” may explicitly or implicitly include one or more of that feature.
- AOD Always-on Display
- Some electronic devices support always-on Display (AOD), which means that even when the screen is off, information such as time, date, battery level, weather, or notification messages are still displayed, allowing users to know the time and other information without waking up the electronic device; some models can also support displaying static wallpapers or animated wallpapers, enriching the user's visual experience.
- This application proposes an interaction method that can be applied to electronic devices.
- the electronic device When the electronic device is in a screen-off state, it can detect whether the user has made an action and display content corresponding to the action on the screen.
- the user's action may be writing or drawing on the screen with their finger, and the displayed content may be handwriting, which may be a graphic or stroke, etc., so that the user can experience the interactive fun of writing or drawing on the screen when the electronic device is in a screen-off state.
- displaying content corresponding to the action can mimic the user's action trajectory and display content that is as consistent as possible with the user's action trajectory. For example, following the trajectory of the user's swiping action on the screen, displaying graphics or text that are consistent with the user's action trajectory.
- the display method of text or graphics can simulate a cutout effect, providing an interactive experience similar to writing or drawing on a flat surface such as foggy glass, satisfying the user's interactive needs in screen-off scenarios, and increasing fun.
- displaying content corresponding to an action can mean displaying content that is mapped to the user's action, and the displayed content may not be consistent with the user's action.
- a mapping relationship between actions and content can be pre-established.
- the screen is off, if the user draws different shapes or makes different touch actions on the screen, the content corresponding to each shape or touch action will be displayed. For example, if the user draws a triangle on the screen, a preset dynamic or static wallpaper that is mapped to the triangle action will be displayed.
- Another example is when the user performs a specified touch action such as swiping down, swiping left, swiping right, swiping up, or triple-tapping while the screen is off; the screen can automatically display a dynamic wallpaper, such as a fireworks animation wallpaper or a deer animation wallpaper.
- a specified touch action such as swiping down, swiping left, swiping right, swiping up, or triple-tapping while the screen is off; the screen can automatically display a dynamic wallpaper, such as a fireworks animation wallpaper or a deer animation wallpaper.
- the interaction method provided in this application can solve the technical problem of not supporting interaction with users in the screen-off state, meet the user's interaction needs in the screen-off scenario, add interactive fun, and improve user experience.
- the user can perform actions without making them on the screen, but rather within a specified distance around the electronic device (e.g., within the machine vision range of the electronic device), making the actions while suspended in the air.
- the electronic device recognizes the user's actions (which may include gestures) and displays corresponding content on the screen.
- image data collected by devices such as image acquisition devices of the electronic device can be processed using appropriate software algorithms to obtain the recognition result of the user's actions, and then display the content corresponding to the recognized actions.
- the image acquisition device could be a front-facing camera, an infrared sensor, etc.
- the currently displayed handwriting can be gradually removed from the screen. For example, a few seconds after the user's finger is removed, the strokes or graphics gradually disappear, restoring the original state before the handwriting was displayed.
- the electronic device can be a mobile phone, tablet computer, handheld computer, desktop computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), as well as smart home devices such as smart TVs and smart refrigerators with displays, wearable devices such as smart bracelets and smartwatches with displays, extended reality (XR) devices such as augmented reality (AR), virtual reality (VR), and mixed reality (MR) with displays, in-vehicle devices or smart city devices with displays.
- XR extended reality
- AR augmented reality
- VR virtual reality
- MR mixed reality
- the embodiments of this application do not impose special restrictions on the specific type of electronic device.
- Figure 1 illustrates a schematic diagram of the hardware structure of an electronic device 100.
- the electronic device 100 shown in Figure 1 is merely an example of an electronic device, and the electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations.
- the various components shown in Figure 1 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application-specific integrated circuits.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
- SIM subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
- Touch sensor 180K also known as a "touch device,” can be located on display screen 194.
- the touch sensor 180K and display screen 194 together form a touchscreen, also known as a “touchscreen.”
- Touch sensor 180K detects touch operations applied to or near it.
- the touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event.
- Visual output related to the touch operation can be provided through display screen 194.
- touch sensor 180K can also be located on the surface of electronic device 100, in a different position than display screen 194.
- Pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
- pressure sensor 180A can be disposed on display screen 194.
- pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
- a capacitive pressure sensor may include at least two parallel plates with conductive material.
- Electronic device 100 determines the pressure intensity based on the change in capacitance.
- electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A.
- Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In one embodiment, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands.
- Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural network processing unit (NPU).
- processing units such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural network processing unit (NPU).
- AP application processor
- GPU graphics processing unit
- ISP image signal processor
- DSP digital signal processor
- NPU neural network processing unit
- Different processing units may be independent devices or integrated into one or more processors.
- the controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
- the processor 110 may also include a memory for storing instructions and data.
- the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
- the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
- I2C inter-integrated circuit
- I2S inter-integrated circuit sound
- PCM pulse code modulation
- UART universal asynchronous receiver/transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the charging management module 140 receives charging input from the charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device 100 via the power management module 141.
- the power management module 141 connects the battery 142, the charging management module 140, and the processor 110.
- the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc.
- the wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization.
- antenna 1 can be multiplexed as a diversity antenna for a wireless local area network.
- the antenna can be used in conjunction with a tuning switch.
- the mobile communication module 150 can provide wireless communication solutions for applications on the electronic device 100, including second-generation (2G), third-generation (3G), fourth-generation (4G), fifth-generation (5G), and sixth-generation (6G) mobile communication technologies.
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc.
- the mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.
- at least some functional modules of the mobile communication module 150 may be housed in the processor 110.
- at least some functional modules of the mobile communication module 150 may be housed in the same device as at least some modules of the processor 110.
- the modem processor may include a modulator and a demodulator.
- the modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal.
- the demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal.
- the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
- the low-frequency baseband signal is transmitted to the application processor.
- the application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194.
- the modem processor may be a separate device.
- the modem processor may be independent of the processor 110 and housed within the same device as the mobile communication module 150 or other functional modules.
- the wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
- WLANs wireless local area networks
- BT Bluetooth
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication
- IR infrared
- the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110.
- the wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
- antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology.
- the wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc.
- the GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and/or satellite-based augmentation systems (SBAS).
- GPS Global Positioning System
- GLONASS Global Navigation Satellite System
- BDS BeiDou Navigation Satellite System
- QZSS Quasi-Zenith Satellite System
- SBAS satellite-based augmentation systems
- Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor.
- the GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations and for graphics rendering.
- Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
- Display screen 194 is used to display images, videos, etc.
- Display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc.
- electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
- Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
- the ISP Image Signal Processor
- the ISP is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye.
- the ISP can also perform algorithmic optimization on image noise, brightness, etc.
- the ISP can also optimize parameters such as exposure and color temperature of the shooting scene.
- the ISP can be set in the camera 193.
- Camera 193 is used to capture still images or videos.
- An object is projected onto a photosensitive element by generating an optical image through the lens.
- the photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the light signal into an electrical signal, which is then transmitted to an ISP for conversion into a digital image signal.
- the ISP outputs the digital image signal to a DSP for processing.
- the DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats.
- electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
- the external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
- the external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
- Internal memory 121 can be used to store computer executable program code, which includes instructions.
- Internal memory 121 may include a program storage area and a data storage area.
- the program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc.
- the data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.).
- internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
- Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and/or instructions stored in memory located in the processor.
- Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
- audio module 170 speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
- the audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals.
- the audio module 170 can also be used for encoding and decoding audio signals.
- the audio module 170 can be located in the processor 110, or some functional modules of the audio module 170 can be located in the processor 110.
- the speaker 170A also known as a "loudspeaker,” is used to convert audio electrical signals into sound signals.
- the electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
- the receiver 170B also known as the "earpiece,” is used to convert audio electrical signals into sound signals.
- the receiver 170B can be brought close to the ear to listen to the voice.
- Microphone 170C also known as a “microphone” or “voice transducer,” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C.
- Electronic device 100 may be equipped with at least one microphone 170C.
- the 170D headphone jack is used to connect wired headphones.
- Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
- Motor 191 can generate vibration alerts.
- Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
- the SIM card interface 195 is used to connect the SIM card.
- the interaction method proposed in this application can be executed independently by the smart sensor hub without waking up the AP. That is, the interaction method provided in this application can achieve interaction with the user through the sensor hub while the AP is in sleep mode. Specifically, the sensor hub is used to connect to and process the data collected by the sensors in the sensor module 180.
- a sensor hub is a sensor management component that enables hardware abstraction, management, and data processing of sensor devices such as touch sensors.
- the sensor hub combines a low-power microcontroller unit (MCU) with a lightweight real-time operating system (RTOS) to reduce the power consumption of electronic devices when connecting to and processing sensor data.
- MCU microcontroller unit
- RTOS real-time operating system
- the electronic device also includes an MCU, and the processor 110 may include an application processor (AP).
- the AP runs a general-purpose operating system, such as Android or HarmonyOS.
- the MCU runs a lightweight RTOS.
- the MCU is the hardware foundation for implementing the sensor hub; in other words, the hardware chip of the sensor hub can be an MCU.
- the sensor hub supports multiple hardware architectures, such as one of the following three architectures: MCU-integrated, MCU-external, and MCU-independent.
- Figure 2 shows an example of the MCU-independent hardware architecture.
- the MCU-independent architecture the MCU is set up as a separate chip, which can be understood as the sensor hub being a separate chip placed between the AP and the sensors.
- the MCU-integrated architecture the MCU can be integrated into the AP, which can be understood as the AP integrating the sensor hub.
- Various sensors first provide data to the sensor hub inside the AP, and the sensor hub then fuses the data before providing it to the AP.
- the MCU-external architecture the MCU can be designed as a peripheral device, integrated with the sensors, which can be understood as combining the sensor hub and sensors into one.
- the sensors shown in Figure 2 may include one or more of the sensors shown in sensor module 180 in Figure 1, or may include other sensors.
- One or more sensors may be micro-electro-mechanical system (MEMS) sensors.
- MEMS micro-electro-mechanical system
- a sensor hub can adopt a layered design, including a sensor hub logic implementation layer and a sensor driver layer.
- the sensor hub logic implementation layer provides a unified sensing interaction interface to the application (AP side), a unified adaptation interface for the sensors, and various common acquisition strategies to the application (AP side).
- the sensor driver layer includes drivers for each sensor and a registration interface for the AP-side application to mount onto the sensor hub.
- an interaction module can be deployed in the sensor logic implementation layer.
- This interaction module can simulate an application and read the data collected by the sensor by calling the sensor interaction interface.
- the sensor interaction interface of the sensor logic implementation layer can be used to read the data collected by the touch sensor 180K, identify the user's actions based on the collected data, and configure the current collection strategy based on the various collection strategies provided by the sensor logic implementation layer, such as setting the time interval of sampling points (sampling period).
- the Sensor hub's software architecture can adopt the LiteOS sensing framework.
- the LiteOS sensing framework includes a Sensor Manager layer, a BSP manager layer, and a Converged Algorithms layer.
- the BSP Board Support Package
- the Sensor Manager layer is used to implement unified sensor interaction management, such as sensor configuration, sampling, and reporting.
- the BSP Manager layer provides a unified driver interface and is responsible for sensor driver management and sensor interaction management, such as sensor opening, closing, reading, writing, and data updating.
- the Converged Algorithms layer deploys a fusion algorithm library for algorithm fusion on the MCU according to specific business requirements.
- an interaction module can be deployed in the Converged Algorithms layer.
- This interaction module performs operations such as enabling, reading, and writing to the sensor through the driver interface provided by the BSP Manager layer.
- the touch sensor may be in a turned-off state, meaning it does not detect any touch activity.
- the touch sensor 180K can be enabled based on the driver interface provided by the BSP layer to perform touch detection in the screen-off state.
- the sampling period of the touch sensor 180K can be configured using the interaction management interface provided by the Sensor Manager layer.
- Interactive modules deployed in the sensor hub logic implementation layer or Converged Algorithms layer can generate corresponding handwriting based on the data collected by the sensor, and then display the handwriting on the display screen 194.
- the interaction method provided in this application can be executed by the sensor hub in the AP sleep state, so as to reduce the power consumption required to implement the interaction method provided in this application in the screen-off state.
- the interaction method provided in this application can also be executed by the AP by waking it up.
- the graphics processing unit GPU
- the interaction module in the sensor hub can communicate with the GPU to transmit the generated image data containing handwriting (e.g., the image data after the full-screen overlay 03 and wallpaper 04 are mixed in Figure 19) to the GPU.
- the GPU performs mathematical and geometric calculations and performs graphics rendering.
- the GPU is connected to the display screen 194 and can transmit the rendered image data to the display screen 194 for display.
- the electronic device can realize the handwriting display function through the GPU, display screen 194, and application processor AP.
- the GPU is connected to the display screen 194 and the application processor AP.
- the application processor (AP) in the electronic device 100 runs a general-purpose operating system.
- the software architecture of the general-purpose operating system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.
- This application embodiment uses the layered architecture Android system as an example for illustration.
- Figure 4 illustrates an exemplary schematic diagram of the software architecture corresponding to the AP in the electronic device 100.
- a layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces.
- the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
- the application layer can include a series of application packages.
- the application package may include applications such as camera, calendar, music, gallery, SMS, call, navigation, settings, and browser.
- the interaction module in this embodiment can be a standalone application or a functional module integrated into other applications; this application does not limit this.
- the application in this application can also be replaced with other forms of software such as mini-programs or atomic services.
- the application framework layer provides application programming interfaces (APIs) and a programming framework for applications within the application layer.
- the application framework layer includes predefined functions. For example, in the interaction method proposed in this application, the operation of generating handwriting based on user action data can be implemented through an algorithm module, which can be added to the application framework layer as an API.
- the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
- the window manager manages window programs. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture the screen.
- the content provider stores and retrieves data, making this data accessible to the application. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, and a phone book.
- the view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build the application.
- the display interface can consist of one or more views.
- a display interface including a text notification icon may include a view for displaying text and a view for displaying images.
- the phone manager provides communication functions for the electronic device 100, such as managing call status (including connection, hang-up, etc.).
- the resource manager provides the application with various resources, such as localized strings, icons, images, layout files, video files, etc.
- the notification manager allows the application to display notification information in the status bar, which can be used to convey informational messages and can disappear automatically after a short pause without user interaction. For example, the notification manager is used to notify users of download completion, message alerts, etc.
- the notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating electronic devices, and flashing indicator lights.
- the Android Runtime consists of core libraries and a virtual machine.
- the Android Runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
- the application layer and application framework layer run in a virtual machine.
- the virtual machine executes the Java files of the application layer and application framework layer as binary files.
- the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
- System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
- surface manager e.g., media libraries
- 3D graphics processing libraries e.g., OpenGL ES
- 2D graphics engines e.g., SGL
- the Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
- a 2D graphics engine is a graphics engine for 2D drawing.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
- the following example illustrates the workflow of software and hardware that execute interaction methods based on the AP, using an interaction scenario in screen-off mode as an example.
- an always-on display (AOD) state such as a partial display based on AOD or a full-screen dimmed state.
- AOD always-on display
- the touch sensor 180K receives a user's touch operation
- the corresponding hardware interrupt is sent to the kernel layer.
- the kernel layer processes the touch operation into raw input events (including touch coordinates, touch operation timestamps, etc.).
- the raw input events are stored in the kernel layer.
- the application framework layer obtains the raw input events from the kernel layer and determines the events to be triggered based on them. For example, the event to be triggered is to generate and display content corresponding to the user's action (e.g., handwriting).
- the application framework layer generates corresponding image data or other format data based on the data collected by the touch sensor 180K, and controls the display driver by calling the kernel layer to display the content corresponding to the user's action on the display screen 194.
- Figure 5 illustrates a schematic diagram of a user interface for an interactive scenario.
- the phone's operating system detects that the screen is off and activates the touchscreen sensor 180K for touch detection, as shown in interface 10a.
- the touch sensor 180K When the user begins to perform actions on the screen, the touch sensor 180K generates a handwriting corresponding to the user's actions based on the data detected by the touch sensor 180K, and drives the display screen to display the handwriting.
- the generated handwriting can be part or all of a graphic, text, or symbol, as shown in interface 10b in Figure 5.
- the display screen displays the corresponding graphic in real time.
- the display screen displays the complete graphic.
- the heart-shaped graphic shown in Figure 5 is only an example.
- the interactive method provided in this application embodiment supports the display of various regular or irregular shapes, graphics, text, symbols, etc.
- the screen-off state or screen-off scenario can specifically be one or more combinations of states such as screen off, partial display, or full-screen dimming.
- the screen-off state also known as the screen-off state, can be a state in which all pixels of the screen do not emit light, or a state in which the screen's backlight is off.
- the screen-off state can be a state in which all pixels of the screen do not emit light (are turned off), that is, a visually completely black screen state; for liquid crystal displays (LCDs), the screen-off state refers to a state in which the backlight (backlight lamp) does not emit light (is off).
- OLED organic light-emitting diode
- Partial display mode refers to a state where some pixels on the screen are lit while others are off. For example, after the screen enters the Always-On Display (AOD) state, based on AOD technology, pixels used to display information such as time, date, and weather are lit, or some pixels used to display dynamic or static wallpapers are lit, while pixels in other locations are not illuminated (also referred to as off or turned off). For example, as shown in Figure 6b, the pixels used to display the time "10:49" and the pixels used to display the date "July 12th, Saturday, August 3rd" are lit, while the remaining pixels are off (also referred to as not illuminating or turned off).
- This state is an example of partial display.
- Full-screen dimming refers to a state where all pixels on the screen are illuminated, but their brightness is dimmed or reduced below a preset threshold.
- full-screen dimming could be a display state where the wallpaper or interface is dimmed, or a display state where the backlight brightness is reduced.
- AOD Always-On Display
- all pixels on the screen are dimmed before displaying, resulting in a full-screen dimming effect.
- the time, date, and wallpaper 111 are still displayed, and all pixels on the screen are illuminated.
- the screen is dimmed; this is an example of a full-screen dimming state.
- LCD screens it could be a state where the backlight brightness is reduced.
- the backlight brightness can be automatically reduced; this state can also be considered a full-screen dimming state.
- partial display mode can include partial dimming, where the areas of the screen where the luminous pixels are displayed are dimmed to further reduce power consumption.
- partial display mode could be a scenario where a wallpaper is partially displayed, and the displayed wallpaper is dimmed, resulting in a partially dimmed state.
- the full-screen dimming state can include either partially displaying the wallpaper or displaying the wallpaper in full screen.
- a semi-transparent black overlay can be applied to the wallpaper under Multiply mode.
- the example shown in Figure 5 can be a full-screen darkened state after darkening processing, that is, the screen displays a black semi-transparent overlay.
- the phone screen displays the heart-shaped strokes in real time and shows them on the screen. Specifically, the area corresponding to the strokes in the black semi-transparent overlay is erased to present a hollow effect, simulating the interactive effect of wiping glass.
- the interactive method provided in this application supports displaying handwriting in various styles.
- multiple styles are provided, such as ink painting style, sand painting style, crayon style, and stylus style.
- art styles may include abstract, realist, impressionist, and ink painting styles, automatically displaying images or graphics of the corresponding style based on the user's drawing.
- Calligraphy styles may include different fonts, automatically displaying text in the corresponding font or style based on the user's handwritten text on the screen. For example, automatically displaying regular script, Song typeface, and seal script fonts.
- FIG. 7a which shows an example of an interface displaying ink-wash style handwriting
- the screen is off, based on AOD technology, it enters a partial display state. Some pixels on the screen emit light, while the rest do not. The illuminated area is used to display wallpaper 12a2.
- Wallpaper 12a2 has a black semi-transparent overlay on its surface, presenting a darkened wallpaper effect.
- the electronic device determines that the current style is ink-wash style. Based on the user's action, it generates a corresponding handwriting layer according to the handwriting generation method corresponding to the ink-wash style.
- the handwriting layer carries the coordinate information of multiple pixels that make up the handwriting on the screen.
- the handwriting layer is subtractively mixed with the black semi-transparent overlay to obtain the black semi-transparent overlay after erasing the handwriting, and drives the display screen to display the ink-wash style handwriting 12a1, i.e., the Chinese character " ⁇ ".
- the written text can be displayed through a cutout, revealing the underlying wallpaper, enriching the visual experience and adding interactive fun.
- it can also be used to convey information, such as in quiet places like meeting rooms or libraries, where information can be conveyed by writing on the screen.
- Figure 7b shows an example of an interface displaying handwriting in a stylus style.
- Figure 7c shows an example of an interface displaying handwriting in a sand art style
- Figure 7d shows an example of an interface displaying handwriting in a crayon style.
- the handwriting layer is subtractively blended with the black semi-transparent overlay and driven to display on the screen, presenting a heart graphic 12b with a stylus style, simulating the effect of wiping away fog on glass, allowing users to experience the interactive fun of wiping glass on mobile phones and other electronic devices.
- the electronic device determines the current style, it generates corresponding handwriting layers according to the handwriting generation methods corresponding to sand painting style and crayon style, respectively, based on the user's actions.
- the handwriting layers are displayed, showing a heart shape 12c with sand painting style and a heart shape 12d with crayon style, respectively.
- Figures 7a to 7d are interactive examples in partial display scenarios.
- Figure 7e which shows an example in a full-screen wallpaper display scenario (full-screen dimmed state)
- wallpaper 121 is displayed in full screen.
- a heart graphic 12e is displayed.
- the screen of the electronic device is a foldable screen.
- the interactive method provided in this application embodiment can be applied to electronic devices with different screen forms such as candybar screens or foldable screens. Other examples are listed below.
- Figure 7f shows an example where, in a scenario where the wallpaper is displayed in full screen and darkened, the user draws a checkmark " ⁇ " shape on the screen, and the corresponding checkmark shape is displayed.
- the erasing effect similar to wiping away fog on glass, is no longer presented.
- the position of the handwriting does not reveal the underlying wallpaper; instead, it is filled with color, such as white or another color.
- Figure 7g shows that in a full-screen darkened scenario, after the user writes the character " ⁇ " (wang) on the screen, interface 13b displays the corresponding handwriting, which is filled with black.
- Figure 7h illustrates a scenario where the screen is off (i.e., in a screen-off state), meaning all pixels on the screen are not emitting light, and the user's action of drawing a triangle on the screen is detected.
- Interface 13c displays a triangle that matches the user's action.
- the electronic device may not support the Always-On Display (AOD) function, or the user may not have enabled the AOD function (i.e., the screen-off display is turned off), and the user may choose to enable the screen-off interaction function.
- AOD Always-On Display
- the interaction method proposed in this application allows users to configure screen-off interaction settings, such as selecting handwriting style and whether to enable screen-off interaction.
- the interface for implementing screen-off interaction settings can be implemented in various ways. For example, in some embodiments, controls for implementing screen-off interaction settings can be added to the screen-off display settings interface. In other embodiments, a separate screen-off interaction interface can be set up, with the screen-off display interface and the screen-off interaction interface listed side-by-side as a sub-control of "Desktop and Personalization".
- Figure 8 illustrates an example interface for implementing screen-off interaction settings.
- controls for controlling screen-off interaction can be added, such as a control named "Screen-off Interaction" 14a1.
- Clicking control 14a1 opens the interface 14b for setting screen-off interaction.
- interface 14b users can choose to enable or disable the screen-off interaction function and select a handwriting style.
- interface 14b displays four style options: ink wash, stylus, sand painting, and crayon. In practical applications, other styles can be added or existing styles can be removed as appropriate.
- the current style is determined based on the user's selection. If the user does not select a style after enabling the screen-off interaction function, the handwriting is generated and displayed according to the default style.
- the default style can be randomly selected from multiple styles or a style can be pre-specified.
- the interaction method proposed in this application will be further explained.
- This method can be applied to the electronic device 100 shown in Figure 1.
- the hardware architecture shown in Figure 2 can be deployed in the electronic device, and/or, the software architecture shown in Figure 3 or Figure 4 can be adopted.
- Figure 9 is a flowchart illustrating a specific embodiment of an interaction method provided in this application.
- the method may include, but is not limited to, the following steps:
- S101 The electronic device detects that the current screen state is off.
- an electronic device When an electronic device detects that the current screen state is one of the following: screen off, partial display, or full screen dimming, it determines that the current screen state is screen off.
- S102 The electronic device checks whether the screen-off interaction is enabled. If yes, proceed to S103; otherwise, end the process.
- Electronic devices can provide a corresponding interactive interface.
- This interface displays controls for enabling or disabling the screen-off interaction function and shows multiple style options. Users can choose whether to enable the screen-off interaction function through the interface. When the screen-off interaction is enabled, users can select a style from the multiple styles available on the interface. If the system detects that the user has enabled the screen-off interaction function, it continues to search for information on the currently selected style.
- Figure 8 shows an example of the interactive interface for setting up the screen-off interaction function.
- the electronic device displays this interface and receives the user's selection, recording the style selected by the user. If the user enables the screen-off interaction function but does not select from multiple style candidates, the electronic device can randomly select a style as the selected style, or set the default style during factory settings, such as setting the default style to a stylus pen, and using the default style as the currently selected style.
- S101 can be executed before S102.
- S102 can be executed before S101. That is, first check whether the screen-off interaction function is enabled. If it is not enabled, the process ends directly without executing S101.
- step numbers in the embodiments of this application are only used to distinguish different steps and are not intended to limit the order or timing of the execution of the steps.
- S103 Electronic device queries information about the currently selected style.
- S104 The electronic device senses whether the user is performing an action on the screen. If yes, proceed to S105; otherwise, continue waiting.
- Electronic devices detect user actions on the screen, which can be achieved through a touch sensor (e.g., 180K).
- a touch sensor e.g., 180K
- the touch sensor detects a user's touch on the touchscreen (the screen)
- This action data can include the coordinates and timestamps of multiple touch points collected at predetermined sampling periods. For example, when a user writes or draws on the screen, the coordinates of the user's finger or other body part touching the screen are collected every 8ms or 16ms, with each sampling point accompanied by a timestamp, thus obtaining the action data.
- S105 The electronic device generates handwriting that matches the currently selected style and corresponds to the user's action.
- Electronic devices generate handwriting to be displayed based on motion data collected by touch sensors and the currently selected style information.
- the handwriting to be displayed can be image data, containing the coordinate information of multiple pixels that make up the handwriting.
- each style corresponds to a specific handwriting generation algorithm to generate handwriting that matches the currently selected style. That is, the handwriting generation algorithm corresponding to the currently selected style is used to generate handwriting that matches the user's action.
- the handwriting generation algorithm corresponding to the currently selected style is used to generate handwriting that matches the user's action.
- APIs corresponding to the handwriting generation algorithms can be set, and by calling the APIs corresponding to various styles, handwriting corresponding to each style can be generated.
- generating handwriting corresponding to the user's action can be generating handwriting consistent with the user's action.
- the displayed handwriting has a shape consistent with the user's action.
- the content displayed based on the user's actions is not limited to handwriting, but can also be other content, such as displaying a dynamic wallpaper or static wallpaper corresponding to the user's actions.
- S106 The electronic device displays handwriting corresponding to the actions performed by the user.
- action data containing 5 sampling points P1, P2, P3, P4, and P5 is first collected.
- the coordinate information and timestamp information of these sampling points are recorded: P1(t1), P2(t2), P3(t3), P4(t4), and P5(t5).
- t1, t2, t3, t4, and t5 represent the timestamps corresponding to the 5 sampling points respectively.
- the difference between two adjacent timestamps is one sampling period, such as 8ms or 16ms.
- Bezier curve fitting and interpolation are performed to obtain a Bezier curve.
- Points on the Bezier curve are sampled to obtain multiple sampling points.
- B1 to B10 in the figure represent 10 sampling points obtained from sampling on the Bezier curve. Based on these 10 sampling points, brush elements of the corresponding style are added.
- the brush elements for the ink wash style can be brush strokes from a traditional Chinese calligraphy brush.
- the brush elements for the stylus style can be smooth lines.
- brush elements are evenly distributed across the curve. For example, a brush element is placed at sampling point B1, another at sampling point B2, and so on, resulting in a thick curve with added brush elements. Since different styles use different brush elements, the resulting thick curves exhibit different styles. Further processing of this thick curve, or leaving it unprocessed, yields the handwriting to be displayed.
- the sampling point can be added as the starting point of the stroke element, or as the center point of the stroke element.
- one or more brush elements can be added between two sampling points. This embodiment will not list them all.
- Figure 10 uses a stylus style as an example.
- the brush element of the stylus can be a smooth line with uniform thickness. Therefore, after adding the corresponding stylus style brush element, you can get the handwriting example shown in Figure 10, which is filled with black.
- a second-order Bezier curve is used, as shown in Figure 12.
- the user slides freely on the screen and draws a curve.
- the dashed line in Figure 12 represents the trajectory corresponding to the user's action.
- the touch sensor collects the user's action data. Every sampling period, it collects the coordinates and timestamp of the touch position. For example, it collects 5 sampling points P1-P5 as shown in Figure 10.
- a third-order Bezier curve i.e., a 3rd-order Bezier curve
- a start point and an end point are determined, and two points between the start point and the end point are taken as control points to generate a third-order Bezier curve.
- the Bezier curve is sampled. Based on the obtained multiple sampling points, brush elements of corresponding styles are added. For example, if the currently selected style is a stylus, then a stylus-style brush element is added to the Bezier curve; if the currently selected style is sand painting, then a stylus-style brush element is added to the Bezier curve; if the currently selected style is crayon, then a crayon-style brush element is added to the Bezier curve. For example, in this embodiment, these three styles of brush elements can be added evenly to obtain strokes with uniform line thickness.
- the brush elements when generating sand painting style or crayon style handwriting, can be randomly rotated and/or their positions jittered when adding sand painting style or crayon style brush elements.
- random rotation can be achieved by rotating the original brush element at a random angle to obtain the rotated brush element.
- the randomly rotated brush element can be placed at sampling point B2.
- position jitter can be a random offset of the center point of the brush element relative to the sampling point by a predetermined amount.
- the predetermined amount can be n pixels.
- the center point of the brush element is offset by n pixels relative to the sampling point B2, where n can be 0-50.
- Position jitter and random rotation can be combined or implemented separately. For example, position jitter and random rotation can be applied to the same brush element at the same time, or they can be applied to different brush elements. Different brush elements can be processed in a uniform way or in different ways. For example, brush elements on the same curve can be processed using random rotation instead of position jitter.
- the sand painting style is processed using a combination of random rotation and position jitter, while the crayon style is processed using position jitter.
- At least one of the processing methods such as random rotation and position jitter can be used to process brush elements of at least one of the above styles, without any specific limitation.
- the ink wash style can be processed as shown in Figure 17.
- the ink wash style can be designed to meet writing needs, presenting an effect similar to writing with a brush.
- the ink wash style is suitable for writing Chinese characters and other languages. Therefore, the generated handwriting may include one or more strokes.
- the thickness of the strokes in the handwriting varies with speed; the faster the speed, the thinner the strokes, and the slower the speed, the thicker the strokes.
- This processing method requires further acquisition of the speed information when the user makes a movement.
- Speed information can be determined based on the distance between adjacent sampling points and the sampling period in the action data. For example, the ratio of the distance between adjacent sampling points to the sampling period yields the speed.
- a higher speed value meaning a faster speed, allows the corresponding stroke element to be reduced or lengthened, making the stroke line appear thinner relative to the original brush element.
- a slower speed value meaning a smaller speed, allows the corresponding stroke element to be thickened or enlarged, making the stroke line appear thicker relative to the original brush element.
- the speed data obtained based on the distance between adjacent sampling points and the sampling time interval can be discrete data.
- the speed at a certain moment may undergo instantaneous changes, i.e., the speed change is drastic.
- the line thickness e.g., the thickness of a brush element
- the discrete speed data can be filtered to obtain a smoother speed curve.
- a low-pass filter can be used to filter the speed data, and the brush element at the corresponding position can be adjusted based on the filtered speed data.
- a one-euro filter is used as the low-pass filter.
- the low-pass filter can be one or more combinations of a Lorentz low-pass filter, a Butterworth low-pass filter, a Kalman filter, and an RC low-pass filter.
- pressure information when the user makes an action can be further obtained.
- the thickness of the strokes can be further adjusted so that the thickness of the strokes follows the pressure changes of the user's action. For example, the greater the pressure the user applies to the screen when making an action, the thicker the stroke at that location; the less pressure, the thinner the stroke at that location.
- the stroke thickness can be adjusted by scaling the stroke element in a predetermined direction.
- the predetermined direction can be along the length direction, along the width direction, or along a set angle direction. Scale-up along the length direction is stretching, scale-up along the width direction is thickening, and scale-up in both the length and width directions is proportional scaling; the same applies to shrinking.
- the placement direction of brush elements on the Bezier curve can be set to change according to the user's pen movement direction.
- the pen movement direction refers to the direction of movement when the user makes an action, such as the direction the user's finger slides on the screen.
- the placement direction of brush elements on the Bezier curve includes the placement direction of a single brush element or the splicing direction between adjacent brush elements. For example, as one implementation, when writing horizontally, a single brush element can be placed horizontally on the curve, and when writing vertically, a single brush element can be placed vertically on the curve. Another implementation is that the splicing direction between adjacent brush elements can be determined according to the pen movement direction.
- brushstroke processing can also be used for ink painting style.
- Brushstroke processing refers to pre-processing at the beginning or end of a stroke.
- pre-processing can be to thicken the stroke elements by multiples at the beginning and/or end of the stroke.
- the stroke elements at the beginning of the stroke are thickened by different multiples at different positions to obtain strokes that mimic the beginning of the stroke.
- the processing method at the end of the stroke is similar.
- brush elements specifically for the beginning and end of the stroke can be added to the brush elements. When generating handwriting, the corresponding beginning or end brush elements are added at the beginning or end of the stroke.
- the handwriting can also be generated by recognizing the text corresponding to the user's action trajectory based on the user's actions and automatically generating characters in different fonts (such as Chinese characters). That is, the above-mentioned brush element splicing method is only one example. In some other embodiments, the brush element splicing method may not be used. Instead, after recognizing the text and other characters written by the user on the screen, a character in a certain font may be automatically displayed. The font can be selected by the user.
- the handwriting corresponding to the user's action can be obtained.
- a handwriting overlay 01 corresponding to the handwriting is then generated.
- the full-screen darkening state can be achieved by overlaying an overlay on the wallpaper, for example, overlaying a black semi-transparent overlay.
- the overlay is a layer in which the pixel values of the RGB three channels of each pixel are the same, and the value of the Alpha channel is also the same.
- the value of the Alpha channel (abbreviated as ⁇ ) represents the transparency.
- the transparency can be from 0 to 1, or from 0 to 100. A transparency of 1 or 100 indicates complete opacity, and a transparency of 0 indicates complete transparency.
- the full-screen overlay 02 is a semi-transparent overlay covering the wallpaper.
- the RGB pixel values of the handwriting overlay 01 generated based on the handwriting 00 are consistent with the RGB pixel values of the full-screen overlay 02.
- the ⁇ value of each pixel in the handwriting overlay 01 is consistent with the ⁇ value of each pixel in the full-screen overlay 02, meaning their transparency is the same.
- a subtractive blending operation is performed on the two layers, Handwriting Mask 01 and Full-Screen Mask 02.
- the specific blending method could be an XOR operation, where pixels at the same position in both layers are XORed to obtain Full-Screen Mask 03.
- the ⁇ value of each pixel in the area corresponding to the handwriting is 0.
- the full-screen overlay 03 is blended with the wallpaper 04 (e.g., a full-screen wallpaper).
- the blending mode can be multiply.
- the blended image data is then displayed on the screen as the data to be displayed.
- the visual effect is a darkened full-screen wallpaper, where the area where the user makes an action, i.e., the area corresponding to the handwriting, is transparent.
- the wallpaper pattern can be seen through the handwriting, presenting a visual effect simulating the erasing of fog from glass.
- the currently displayed handwriting can gradually fade away from the screen.
- the fading effect can be set from a spatial dimension, for example, fading from the edge to the center, from left to right, or from top to bottom; or, as another possible implementation, the fading effect can be set from a temporal dimension, for example, the transparency of each pixel on the handwriting gradually increases over time until it reaches the initial transparency (that is, the transparency is consistent with the full-screen overlay 02), then returns to a darkened full-screen state, and the handwriting is no longer visible.
- a combination of temporal and spatial dimensions can be used to present the fading effect.
- Figure 20 shows an example of a gradually disappearing display effect from the perspective of time.
- interface 16a is an example of the interface currently displaying handwriting.
- the displayed interface is 16b.
- the transparency of the area corresponding to the handwriting gradually increases over time, and the distinction between the handwriting and the overlay gradually weakens.
- the transparency of the pixels in the area corresponding to the handwriting is consistent with the transparency of the full-screen overlay 02, and the handwriting is completely invisible, returning to the original full-screen darkened state.
- the interaction method provided in the embodiments of this application may include, but is not limited to, the following steps:
- S201 The electronic device determines that the screen is in a screen-off state.
- the screen-off state can be understood as the state of an electronic device between when the screen is turned off and when it is turned back on. In other words, any state between when the screen is turned off and when it is turned back on can be considered a screen-off state. To avoid confusion, it should be noted that a screen-off state can be one of these states.
- a screen-off state can also be a state of full-screen dimming, partial display, or any other state between when the screen is off and when it is turned back on.
- wake up the screen refers to the user operating the electronic device to wake up the screen.
- the automatic display of AOD after the screen is turned off is different from “wake up the screen”.
- S202 Electronic devices detect the user's first action.
- the electronic device detects the user's first action by having the user perform an action on the screen, and the electronic device detects the user's action data through devices such as touch sensors and pressure sensors.
- the user performs an action within the machine vision range of the electronic device, and the electronic device identifies the user's action by acquiring image data of the user's action.
- S203 The electronic device responds to the first action and displays the first content; the first content corresponds to the first action.
- the first content can be handwriting or other content.
- displaying the first content may be displaying the first handwriting corresponding to the first action.
- the first content may be a dynamic wallpaper, a static wallpaper, or other specified information (such as weather, time, date, battery level, etc.).
- the first content corresponds to the first action, which can be obtained by imitating the first action.
- displaying the first handwriting can mean displaying handwriting that imitates the first action.
- the correspondence between the first content and the first action can also mean that there is a defined mapping relationship between the first content and the first action.
- a specified touch action can be used as the first action
- a specified static wallpaper or live wallpaper can be used as the first content, establishing a defined mapping relationship between the first action and the first content. This mapping relationship can be customized by the user. In this way, when the user performs a specified touch action in the screen-off state, the desired live wallpaper or other content can be displayed, improving the user experience.
- a background can be displayed before the first handwriting is displayed, and when the screen is off, the first handwriting can be displayed by displaying both the background and the first handwriting.
- the background may include wallpaper and/or specified information.
- the wallpaper may be a full-screen wallpaper, a partial-screen live wallpaper, or a static wallpaper, etc.
- the specified information may include at least one of various messages such as time, weather, date, battery level, and notification messages.
- the background includes the displayed time “10:49” and the date "July 12th, Saturday, August 3rd”.
- the background includes a partial view of wallpaper 111 and the displayed time “10:49” and the date "July 12th, Saturday, August 3rd”.
- the background includes a partial view of wallpaper 120.
- the background includes a partial view of wallpaper 121 and the displayed time "10:49” and the date "July 12th, Saturday, August 3rd”.
- the background includes the full-screen wallpaper 121 and the displayed time information.
- the background and handwriting may be displayed together.
- a background and heart-shaped handwriting are displayed in FIG5a; in FIG7a to FIG7e, a background containing wallpaper and heart-shaped handwriting are displayed.
- FIG7f and FIG7g show a full-screen display of wallpaper and handwriting.
- only the first stroke may be displayed without the background.
- only the triangular stroke is displayed, and the background is not displayed; all other pixels on the display screen are off.
- the first stroke displayed can be transparent or opaque.
- the heart-shaped strokes are all transparent, and the area of the wallpaper covered by the heart-shaped strokes in the background can be seen through the strokes.
- the strokes are all opaque, and the underlying wallpaper cannot be seen through the strokes.
- the background includes a first wallpaper; when displayed, the first handwriting is shown on the first wallpaper.
- the first handwriting is transparent; the area on the first wallpaper covered by the first handwriting is visible through the handwriting.
- FIG7a the area of wallpaper 120 covered by the handwriting "Li" can be seen through the handwriting; in the examples shown in FIG7b to 7e, the pattern of the area of wallpaper covered by the handwriting can also be seen through the heart-shaped handwriting.
- a typical scenario is that a first wallpaper is displayed with a first transparency, for example, a full-screen wallpaper is darkened and covered with a mask; when the first handwriting is displayed on the first wallpaper, the first handwriting is displayed with a second transparency.
- the second transparency is different from the first transparency, for example, the second transparency is less than the first transparency.
- the transparency used to display the handwriting (second transparency) is less than the transparency used to display the wallpaper background (first transparency), which can present a visual effect that the area traversed by the handwriting is brightened.
- the transparency here refers to the value of the alpha channel ( ⁇ Channel or Alpha Channel). For example, in the examples shown in Figures 7a to 7e, the area traversed by the handwriting is brighter than other darkened areas on the screen, presenting an effect of the part where the user's finger is swiped being brightened.
- the first wallpaper can be displayed at a first brightness; after the user performs an action (first action), a first handwriting corresponding to the user's action can be displayed on the first wallpaper, with the first handwriting displayed at a second brightness, different from the first brightness.
- first action a first handwriting corresponding to the user's action
- the first handwriting displayed at a second brightness, different from the first brightness.
- the brightness of the displayed heart-shaped handwriting can be different from the brightness of other areas on the screen.
- the brightness of the handwriting can be a first brightness
- the brightness of the wallpaper can be a second brightness, with the first brightness and the second brightness being different.
- the first brightness and the second brightness can be achieved by directly controlling the brightness of the pixels.
- the brightness value of the pixel corresponding to the handwriting is specified as the first brightness value
- the brightness value of the pixels in other areas of the screen is set to the second brightness value.
- transparency or brightness can be controlled by overlaying or blending transparent overlays.
- a first wallpaper displayed with a first transparency is obtained by overlaying a first overlay (e.g., full-screen overlay 02) on a first wallpaper (e.g., wallpaper 04), and each pixel in the first overlay has a first transparency ⁇ 1; for example, the transparency of each pixel in the full-screen overlay 02 is ⁇ 1.
- the first handwriting (e.g., handwriting 06) displayed with a second transparency is obtained by overlaying a second overlay (e.g., full-screen overlay 03) onto the first wallpaper.
- the second overlay is a mixture of the first overlay and the first handwriting (which could refer to handwriting overlay 01 corresponding to handwriting 00).
- the pixels corresponding to the first handwriting (handwriting 00) have a second transparency.
- the transparency of pixels in handwriting overlay 01 is also ⁇ 1
- when handwriting overlay 01 and full-screen overlay 02 are XORed pixels with the same transparency have a transparency of 0, while pixels with different transparency remain at the first transparency.
- the transparency of pixels corresponding to handwriting 00 becomes 0.
- a transparent or cutout effect is achieved in the area corresponding to the handwriting.
- the process shown in FIG19 may not be performed. Instead, after determining the coordinates of the boundary pixels in the handwriting 00, the value of the ⁇ channel (i.e., the transparency) of each pixel at the position corresponding to the handwriting in the full-screen overlay 02 is modified to the second transparency ⁇ 2, where ⁇ 2 ⁇ ⁇ 1.
- the second transparency corresponding to the handwriting in the mask is different from the first transparency corresponding to other areas in the wallpaper, so that the handwriting can be displayed and the displayed handwriting has a hollow effect.
- the interactive method proposed in this application supports displaying handwriting of a specified style.
- Figure 7a shows handwriting in the style of ink painting
- Figure 7b shows handwriting in the style of a stylus
- Figure 7c shows handwriting in the style of sand painting
- Figure 7d shows handwriting in the style of crayon.
- displaying the first handwriting may be a first handwriting displaying variations in line thickness.
- the line thickness can be determined based on the speed and/or pressure corresponding to the first action. As shown in Figure 7a, in the ink wash style, the line thickness varies with at least one of the speed and pressure when the user performs the action.
- the first handwriting may be displayed with a constant line thickness.
- the line thickness of the displayed heart-shaped handwriting, the displayed checkmark-shaped handwriting, the displayed " ⁇ " (king) shaped handwriting, or the displayed triangle handwriting is constant.
- displaying the first handwriting may be displaying a first handwriting including a first stroke, wherein the starting point and/or ending point of the first stroke is displayed in a first manner; the middle part of the first stroke is displayed in a second manner, the first manner being different from the second manner; wherein the middle part is the stroke between the starting point and the ending point of the first stroke.
- the starting and ending points of each stroke in the displayed " ⁇ " character are shown in different ways compared to the middle part of each stroke.
- the first stroke can be the character " ⁇ ".
- the display method of its starting and ending points differs from that of the middle part.
- the starting and ending points are specially treated; the starting point shows a clear pause at the beginning of the stroke, and the ending point shows a clear pause at the end of the stroke.
- the middle part is not treated with any stroke detail and is not displayed using any stroke detail method. Therefore, the starting and ending points are displayed differently from the middle part.
- characters in a specified font can be automatically displayed after recognizing the text or symbols written by the user on the screen.
- the font selection can be set by the user. For example, if the user handwrites a Chinese character on the screen, the screen can not display a Chinese character that imitates the user's handwriting, but instead display a Chinese character in a standard font such as KaiTi, SongTi, or other fonts.
- the interactive method proposed in this application embodiment can continuously draw brush resources (brush elements) following the user's finger strokes to obtain handwriting.
- the handwriting can be strokes or graphics, etc.
- the handwriting is mixed with a mask by subtraction, and then superimposed on the wallpaper or other objects displayed in the screen-off state.
- the resulting image data is displayed to form a hollowed-out effect at the handwriting position.
- the displayed handwriting can be generated in real time following the user's finger swipe, allowing the user to experience the interactive fun of "wiping glass".
- this application embodiment can also select multiple styles and multiple brush effects, allowing users to experience the fun of "writing" in a variety of styles.
- the interaction method proposed in this application can increase the interactive fun in the screen-off state and improve the user experience. Furthermore, after a few seconds of finger removal, the strokes or graphic effects gradually disappear, returning to their original dimmed state, enriching the visual feedback.
- the methods provided in the embodiments of this application can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented entirely or partially in the form of a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device.
- the computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another.
- the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media.
- the available medium can be This can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DWD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请提供一种交互方法、电子设备和计算机存储介质,属于终端设备技术领域,该方法可以在息屏状态下显示与用户动作对应的内容,增加息屏场景下的互动乐趣。该方法可以应用于电子设备,具体包括:确定电子设备的屏幕处于息屏状态;检测用户的第一动作;响应于第一动作,在息屏状态下,显示第一内容;第一内容与第一动作对应。
Description
本申请要求于2024年05月31日提交中国国家知识产权局、申请号为202410705862.8、申请名称为“交互方法、电子设备和计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端设备技术领域,尤其涉及一种交互方法、电子设备和计算机存储介质。
支持息屏显示(Always On Display,AOD)的电子设备,在息屏状态下,仍然可以显示时间、日期、天气或壁纸等内容。
AOD技术满足了息屏场景下用户快速获知时间等信息的需求,但不支持与用户进行交互,无法满足用户在息屏场景下可能存在的交互需求。
本申请公开了一种交互方法、电子设备和计算机存储介质,能够在电子设备处于息屏状态下根据用户的动作显示相应的内容,与用户进行互动,提升用户体验。
第一方面,本申请提供了一种交互方法,应用于电子设备,该方法包括:确定电子设备的屏幕处于息屏状态;检测用户的第一动作;响应于第一动作,在息屏状态下,显示第一内容;第一内容与第一动作对应。
息屏状态,为电子设备熄灭屏幕之后,到电子设备的屏幕被用户唤醒之间的状态,例如息屏状态可以包括熄屏、局部显示或全屏压暗中的一种。熄屏,即熄灭屏幕,显示屏上的全部像素点不发光,其中,不发光包括不主动发光和不被动发光。局部显示,即屏幕中的部分像素点发光,其余像素点不发光。全屏压暗,即屏幕中的全部像素点发光,但经过压暗处理或者经过亮度调低处理,屏幕的全部像素点的亮度低于预设阈值。
上述方法在息屏场景下,用户做出动作后,显示与用户动作对应的内容,支持与用户进行互动,能够满足用户在息屏场景下的交互需求,丰富用户的使用体验。
在一种可能的实现方式中,显示第一内容,包括:显示第一笔迹;第一笔迹与第一动作对应。
上述方法,在息屏状态下,用户做出动作后,显示与动作对应的笔迹,例如,用户的手指做出在屏幕上做出写字或画画等动作,屏幕显示与动作相应的笔迹,使用户可以体验到电子设备息屏状态下在屏幕上“书写”的互动乐趣,增加趣味性。
在一种可能的实现方式中,显示第一笔迹之前,该方法还包括:在息屏状态下,显示背景;背景包括壁纸和/或指定信息;在息屏状态下,显示第一笔迹,包括:在息屏状态下,显示背景和第一笔迹。
背景可以包括壁纸,壁纸可以是静态壁纸或动态壁纸,或者可以是全屏显示的壁纸或局部显示的壁纸;指定信息,可以包括时间、日期(包括公历日期和/或农历日期)、天气、电量、通知消息等信息中的一种或多种。显示背景和第一笔迹,可以是第一笔迹和背景在屏幕中分别独立显示,也可以是第一笔迹覆盖在背景之上进行显示,例如背景可以是全屏显示的壁纸,笔迹可以覆盖在全屏壁纸上显示;或者,背景可以是局部显示的壁纸(简称布局壁纸)和时间等信息,笔迹可以与局部壁纸分开显示,或者笔迹的部分或全部覆盖在局部壁纸上显示。
上述方法可以在息屏显示的背景下,显示笔迹,与现有的AOD技术兼容。
在一种可能的实现方式中,背景包括第一壁纸,显示所述背景和第一笔迹,可以是在第一壁纸上,显示第一笔迹;其中,第一笔迹是透明的;第一壁纸上被第一笔迹覆盖的区域,透过第一笔迹显示。
第一笔迹是透明的,可以理解为第一笔迹以预定的透明度进行显示,例如第一笔迹以第二透明度进行显示。
上述方法中,可以是在全屏压暗状态且显示有壁纸的场景中,用户在屏幕上做出写字、画画或者滑动等动作,随之显示的笔迹为透明,底部的壁纸被笔迹覆盖的区域可以透过笔迹显示出来,呈现镂空的显示效果。
在一种可能的实现方式中,背景包括第一壁纸;显示背景可以是以第一透明度,显示第一壁纸;显示背景和第一笔迹,可以是在第一壁纸上,显示第一笔迹。其中,第一笔迹以第二透明度显示;第二透明度与第一透明度不同。
在一种可能的实现方式中,第二透明度小于第一透明度。
其中,以第一透明度显示的第一壁纸,是在第一壁纸上叠加第一蒙层得到;第一蒙层中的各个像素点具有第一透明度。以第二透明度显示的第一笔迹,是在第一壁纸上叠加第二蒙层得到;其中,第二蒙层为第一蒙层与第一笔迹混合得到;第二蒙层中,第一笔迹对应的像素点具有第二透明度。
上述方法中,第二透明度小于第一透明度,可以是在全屏压暗状态且显示有壁纸的场景中,用户做出动作,随之显示的笔迹为透明且透明度(第二透明度)小于原本压暗显示的壁纸对应的透明度(第一透明度),使得笔迹覆盖的区域原本被压暗的壁纸可以透出笔迹显示出来,呈现出笔迹经过的位置被擦亮的效果,使用户体验到类似“擦玻璃”的互动乐趣。
在一种可能的实现方式中,背景包括第一壁纸;显示背景可以是以第一亮度,显示第一壁纸。显示背景和第一笔迹,可以是在第一壁纸上,显示第一笔迹;其中,第一笔迹以第二亮度显示;第二亮度与第一亮度不同。
上述方法中,第一壁纸可以是全屏显示的壁纸,第一笔迹在第一壁纸之上显示,且第一笔迹与第一壁纸采用不同的亮度显示,使得笔迹在壁纸的背景下可以显示出来。第一亮度和第二亮度的调节,可以叠加透明蒙层,通过控制蒙层上相应位置的像素点的透明度来实现不同的亮度;或者直接通过控制相应位置的像素点的亮度来实现不同的亮度,例如设置笔迹对应的区域的像素点的亮度的值,与壁纸上未被笔迹覆盖的区域的像素点的亮度的值不同。
在一种可能的实现方式中,显示第一笔迹,包括:显示具有指定风格的第一笔迹。
示例性地,笔迹的风格可以由用户指定,例如响应于用户的第一操作,确定第一风格;其中,第一操作包括从至少一种风格候选项中选择出第一风格。至少一种风格候选项可以包括水墨,手写笔,沙画,蜡笔等风格。
在一种可能的实现方式中,显示具有指定风格的第一笔迹,包括:显示包括多个笔划元素的第一笔迹;多个笔划元素为符合指定风格的笔刷元素。
在一种可能的实现方式中,显示第一笔迹,包括:显示线条粗细变化的第一笔迹;其中,线条粗细根据第一动作对应的速度和/或压力确定。
在一种可能的实现方式中,显示第一笔迹,包括:显示线条粗细不变的第一笔迹。
在一种可能的实现方式中,显示第一笔迹,包括:显示包括第一笔划的第一笔迹;其中,第一笔划的起笔处和/或落笔处采用第一方式显示;第一笔划的中间部分采用第二方式显示,第一方式与第二方式不同;其中,中间部分为第一笔划中起笔处和落笔处之间的笔划。
在一种可能的实现方式中,显示包括第一笔划的第一笔迹;其中,第一笔划包括多个第一笔划元素,多个第一笔划元素的分布方向,根据用户在屏幕上做出第一笔划动作的方向确定;第一动作包括第一笔划动作。
在一种可能的实现方式中,指定风格为手写笔,沙画或蜡笔中的一种;显示具有指定风格的第一笔迹,包括:显示具有指定风格的第一笔迹;所述第一笔迹包括粗细不变的第一笔划。
在一种可能的实现方式中,指定风格为沙画或蜡笔;显示包括多个笔划元素的第一笔迹,包括:显示第一笔划元素和/或第二笔划元素;其中,所述多个笔划元素包括第一笔划元素和/或第二笔划元素;所述第一笔迹包括多个采样点;所述第一笔划元素是原始的笔划元素旋转得到;所述第二笔划元素是原始的笔划元素相对于一个采样点进行位置抖动得到。
第二方面,本申请提供了一种电子设备,包括存储器,用于存储计算机程序;处理器,用于执行存储器中的计算机程序以执行本申请第一方面以及第一方面的任意一种实现方式提供的交互方法。
第三方面,本申请提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,该被处理器执行时,实现本申请第一方面以及第一方面的任意一种实现方式提供的交互方法。
第四方面,本申请提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行本申请第一方面以及第一方面的任意一种实现方式提供的交互方法。
第五方面,本申请提供一种电子设备,该电子设备包括执行本申请任一方面或实施方式所介绍的方法或装置。上述电子设备例如为芯片。
应当理解的是,本申请中对技术特征、技术方案、有益效果或类似语言的描述并不是暗示在任意的单个实施方式中可以实现所有的特点和优点。相反,可以理解的是对于特征或有益效果的描述意味着在至少一个实施方式中包括特定的技术特征、技术方案或有益效果。因此,本申请中对于技术特征、技术方案或有益效果的描述并不一定是指相同的实施方式。进而,还可以任何适当的方式组合本申请中所描述的技术特征、技术方案和有益效果。本领域技术人员将会理解,无需特定实施方式的一个或多个特定的技术特征、技术方案或有益效果即可实现本申请。在其他实施方式中,还可在没有体现所有实施方式的特定实施方式中识别出额外的技术特征和有益效果。
以下对本申请用到的附图进行介绍。
图1是本申请提供的一种电子设备的硬件结构示意图;
图2是本申请提供的一种电子设备中部署的Sensor hub的硬件架构示意图;
图3是本申请提供的一种电子设备中部署的Sensor hub的软件架构示意图;
图4是本申请提供的一种电子设备的AP侧的软件分层架构示意图;
图5是本申请提供的一种交互方法在实际应用场景下的示例图;
图6a至图6c为本申请提供的交互方法中息屏状态包括的3种状态的示例图;
图7a至图7h为本申请提供的交互方法在实际应用场景下显示笔迹的多个示例图;
图8是本申请提供的一种交互方法中对熄屏交互进行设置的用户交互界面示例图;
图9是本申请提供的一种交互方法的一个实施例的流程示意图;
图10是本申请提供的一种交互方法的一个实施例中根据动作数据生成笔迹的示意图;
图11是本申请提供的一种交互方法的一个实施例中不同风格的笔刷元素的示意图;
图12是本申请提供的一种交互方法的一个实施例中根据用户动作轨迹生成相应的贝塞尔曲线的示意图;
图13是本申请提供的一种交互方法的一个实施例中手写笔、沙画和蜡笔风格生成笔迹的流程框架示意图;
图14是本申请提供的一种交互方法的一个实施例中沙画和蜡笔生成笔迹时进行随机旋转和位置抖动处理的流程框架示意图;
图15是本申请提供的一种交互方法的一个实施例中生成笔迹时进行随机旋转示意图;
图16是本申请提供的一种交互方法的一个实施例中生成笔迹时进行位置抖动的示意图;
图17是本申请提供的一种交互方法的一个实施例中水墨风格生成笔迹的流程框架示意图;
图18是本申请提供的一种交互方法的一个实施例中笔刷元素的方向随运笔方向变化的示意图;
图19是本申请提供的一种交互方法的一个实施例中进行图层混合处理的流程示例图;
图20是本申请提供的一种交互方法的一个实施例中笔迹随时间逐渐消失的显示效果的界面示例图;
图21是本申请提供的一种交互方法的流程示意图。
下面将结合附图对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B。文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。
多种电子设备支持息屏显示(AOD),即在息屏场景之下,仍然显示时间、日期、电量、天气或通知消息等信息,用户无需唤醒电子设备即可得知时间等信息;部分机型还可以支持显示静态壁纸或者动效壁纸等内容,丰富用户视觉体验。
目前,电子设备大多仅支持在息屏场景下进行息屏显示,不支持交互,使得用户仅能看到息屏状态下显示的信息和/或壁纸等内容,无法提供互动反馈,不能满足用户在息屏场景下的互动需求。
本申请提出一种交互方法,可以应用于电子设备,可以在电子设备处于息屏状态下,检测用户是否做出了动作,根据用户做出的动作,在屏幕上显示与动作对应的内容,例如用户做出的动作可以是在屏幕上用手指写写画画,显示的内容可以是笔迹,笔迹可以是图形或者笔划等,使用户体验到在电子设备息屏状态下在屏幕上写字或者画画的互动乐趣。
在一些实施例中,显示与动作相对应的内容,可以是模仿用户的动作轨迹而显示与用户的动作轨迹尽可能一致的的内容,例如,跟随用户在屏幕上做出的滑动动作的轨迹,显示与用户动作的轨迹一致的图形或者文字,文字或图形的显示方式可以模拟镂空效果,提供近似于在有雾气的玻璃等平面进行写画的交互体验,满足用户在息屏场景下的互动需求,增加趣味性。
在其他实施例中,显示与动作相对应的内容,可以是显示与用户做出的动作具有映射关系的内容,显示的内容可以与用户做出的动作不一致。例如,预先建立动作与内容之间的映射关系,在息屏状态下,用户在屏幕画出不同的形状或者做出不同的触控动作,则显示不同的形状或者触控动作分别对应的内容,例如,用户在屏幕上画出三角形,则显示预设的与三角形动作具有映射关系的动态壁纸或者静态壁纸;再例如,用户在屏幕息屏状态下,做出下滑、左滑、右滑、上滑或者三连击等指定触控动作,屏幕可以在息屏状态下自动显示动态壁纸,例如显示烟花动效壁纸,麋鹿动效壁纸等等。
本申请实施例提供的交互方法,可以解决息屏状态下不支持与用户互动的技术问题,满足息屏场景下用户的互动需求,增添互动乐趣,改善用户体验。
需要说明的是,在一些实施例中,用户可以不在屏幕上做出动作,而是在电子设备周围指定的距离范围内(例如在电子设备的机器视觉范围内),悬空做出动作,电子设备通过识别用户的动作(可以包括手势),在屏幕上显示相应的内容。示例性地,可以根据电子设备的图像采集设备等设备采集到的图像数据,采用相应的软件算法对图像数据进行处理,得到对于用户动作的识别结果,显示与识别到的动作对应的内容,例如图像采集设备可以是前置摄像头、红外传感器等。
需要说明的是,在一些实施例中,在显示与用户动作对应的内容之后,例如显示笔迹之后,在预定时长内,没有检测到用户做出新的动作的情况下,当前显示的笔迹可以采用逐渐消失的方式从屏幕上消除,例如,用户手指移开几秒后,笔划或者图形渐渐消失,恢复到显示笔迹之前的原始状态。
本申请中,电子设备可以是手机、平板电脑、手持计算机、桌面型计算机、膝上型计算机、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA),以及智能电视、带有显示屏的智能冰箱等智能家居设备,带有显示屏的智能手环、智能手表等可穿戴设备,带有显示屏的增强现实(augmented reality,AR)、虚拟现实(virtual reality,VR)、混合现实(mixed reality,MR)等扩展现实(extended reality,XR)设备,带有显示屏的车载设备或智慧城市设备,本申请实施例对电子设备的具体类型不作特殊限制。
图1示例性示出了一种电子设备100的硬件结构示意图。
应该理解的是,图1所示的电子设备100仅是电子设备的一个范例,并且电子设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图1中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
如图1所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一种实施方式中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一种实施方式中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一种实施方式中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一种实施方式中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一种实施方式中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
充电管理模块140用于从充电器接收充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备100供电。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另一种实施方式中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括第二代移动通信技术(second generation,2G)/第三代移动通信技术(third generation,3G)/第四代移动通信技术(fourth-generation,4G)/第五代移动通信技术(fifth generation,5G)/第六代移动通信技术(six generation,6G)等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一种实施方式中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一种实施方式中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一种实施方式中,调制解调处理器可以是独立的器件。在另一种实施方式中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一种实施方式中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一种实施方式中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度等进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一种实施方式中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一种实施方式中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一种实施方式中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。
耳机接口170D用于连接有线耳机。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。
在一些实施例中,本申请提出的交互方法,可以在不唤醒AP的情况下由智能传感集线器(Sensor hub)独立执行,即,本申请提供的交互方法可以在AP处于休眠状态下,通过Sensor hub实现与用户的互动。具体地,采用Sensor hub连接并处理传感器模块180中的传感器采集的数据。
Sensor hub,为传感器管理组件,可以实现对触摸传感器等传感器设备的硬件抽象、管理和数据处理。Sensor hub将低功耗微控制单元(Microcontroller Unit;MCU)与轻量级的实时操作系统(Real-time operating system,RTOS)结合,以降低电子设备在连接和处理传感器数据时的功耗。
下面分别从硬件实现和软件实现的角度对本申请实施例中可能采用的Sensor hub进行示例性说明。
如图2所示,采用Sensor hub的硬件架构中,电子设备还包括MCU,处理器110可以包括应用处理器AP,AP上运行通用操作系统,例如通用操作系统可以是安卓(Android)系统或鸿蒙(harmony)操作系统,MCU上运行轻量级的RTOS。MCU为实现Sensor hub的硬件基础,或者说,Sensor hub的硬件芯片可以是MCU。
本申请中,Sensor hub支持采用多种硬件架构,例如采用如下3种架构中的一种:MCU内置型,MCU外置型和MCU独立型。图2示出了MCU独立型的硬件架构示例,MCU独立型,即在硬件架构中,MCU作为一个独立的芯片设置,可以理解为Sensor hub作为单独芯片设置于AP和传感器之间。MCU内置型,即MCU可以集成于AP中,可以理解为由AP来集成Sensor hub,各种传感器先将数据提供给AP内部的Sensor hub,Sensor hub融合后再将数据提供给AP。MCU外置型,即MCU可以作为外设,与传感器Sensors一体设计,可以理解为将Sensor hub与sensors合二为一。
其中,图2中示出的传感器sensors可以包括如图1中传感器模块180所示的传感器中的一个或多个传感器,或者还可以包括其他传感器。Sensors中的一个或多个传感器,可以是微机电系统(Micro-Electro-Mechanical System,MEMS)传感器。
在软件方面,Sensor hub的软件架构实现可以有多种选择。示例性地,例如Sensor hub可以采用分层设计,包括sensor hub逻辑实现层和sensor驱动层。其中,sensor hub逻辑实现层,用于对应用程序(AP侧)提供统一的传感交互接口,对传感器提供统一的适配接口,以及向应用程序(AP侧)提供多种通用的采集策略;sensor driver层,包括各传感器对应的驱动,以及用于向AP侧的应用程序提供挂载到sensor hub上的注册接口。
在本申请一些实施例中,可以在sensor逻辑实现层,部署一个交互模块,该交互模块可以模拟应用,通过调用传感器交互接口,读取传感器采集到的数据,例如,在屏幕进入息屏状态之后,可以通过sensor逻辑实现层的传感交互接口,读取触摸传感器180K采集到的数据,根据采集到的数据识别用户做出的动作,以及基于sensor逻辑实现层提供的多种采集策略配置当前的采集策略,例如设置采样点的时间间隔(采样周期)等。
或者,在另一些实施例中,Sensor hub的软件架构可以采用LiteOS传感框架。如图3所示,LiteOS传感框架包括Sensor Manager层、BSP manager层和Converged Algorithms层。其中,BSP(Board Support Package)指板级升级包。Sensor Manager层,用于实现统一的传感器交互管理,如Sensor的配置、采样、上报等。BSP Manager层,用于提供统一的驱动接口,负责Sensor驱动管理、Sensor交互管理,如Sensor的打开、关闭、读写、数据更新等。Converged Algorithms层,部署有融合算法库,用于根据具体业务需求在MCU进行算法融合。
如图3所示,Sensor hub采用LiteOS传感框架的情况下,可以在Converged Algorithms层部署一个交互模块,交互模块通过BSP Manager层提供的驱动接口,对传感器执行开启、读、写等操作,例如,电子设备在熄屏之后,触摸传感器可能处于关闭状态,即不感应是否有触屏动作。在本申请提供的交互方法中,进入息屏状态后,可以基于BSP层提供的驱动接口,开启触摸传感器180K,在息屏状态下进行触摸检测,可以利用Sensor Manager层提供的交互管理接口,对触摸传感器180K的采样周期进行配置。
部署于sensor hub逻辑实现层或Converged Algorithms层的交互模块,可以根据传感器采集到的数据,生成相应的笔迹,之后,通过显示屏194显示笔迹。
需要说明的是,在一些实施例中,由于AP运行时功耗较高,本申请提供的交互方法,可以在AP休眠状态下由sensor hub执行,以在息屏状态下降低实施本申请提供的交互方法所需要的功耗。
在另外的实施例中,本申请提供的交互方法也可以通过唤醒AP,由AP来执行。
在AP休眠状态下由sensor hub执行的实施例中,AP休眠状态下,图形处理器GPU可以不跟随AP进入休眠状态,因而,在AP休眠时,sensor hub中的交互模块,可以通过与GPU通信,将生成的带有笔迹的图像数据(例如图19中全屏蒙层03与壁纸04混合后的图像数据)传输至GPU,GPU执行数学和几何计算,进行图形渲染,GPU连接显示屏194,可以将渲染后的图像数据传输至显示屏194进行显示。AP休眠状态下实施本申请提出的交互方法,可以对Sensor hub的软件架构进行改动,例如增加一个交互模块,通过GPU实现笔迹显示。
本申请提出的交互方法由AP执行的实施例中,电子设备可以通过GPU,显示屏194,以及应用处理器AP等实现笔迹的显示功能。GPU连接显示屏194和应用处理器AP。需要说明的是,由于此部分实施例中AP不休眠,因而可以不在Sensor hub中设置交互模块,即可以不在Sensor hub软件架构中增加交互模块,交互方法可以基于AP侧对应的软件架构实施。
电子设备100中的应用处理器AP,用于运行通用操作系统,通用操作系统的软件架构可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例进行说明。
图4示例性示出电子设备100中AP对应的软件架构示意图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一种实施方式中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图4所示,应用程序包可以包括相机,日历,音乐,图库,短信息,通话,导航,设置,浏览器等应用程序。本申请实施例中的交互模块可以是独立的应用程序,也可以是集成在其他应用程序中的功能模块,本申请对此不作限定。本申请中的应用程序也可以替换为小程序、原子化服务等其他形式的软件。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。例如,本申请提出的交互方法中,基于用户的动作数据生成笔迹的操作,可以通过一个算法模块实现,该算法模块可以作为一个API,添加到应用程序框架层中。
具体地,如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备100振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
应理解的是,以上仅以安卓系统作为示例,本申请的方法还可以应用于非安卓系统,例如iOS操作系统、鸿蒙操作系统、ColorOS操作系统等其它类型的操作系统。
下面结合息屏状态下的交互场景,示例性说明基于AP执行交互方法的软件以及硬件的工作流程。
电子设备的屏幕熄屏之后,进入到息屏状态,例如进入到基于AOD的局部显示或者全屏压暗状态,当触摸传感器180K接收到用户的触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,根据原始输入事件,确定需要触发的事件,例如需要触发的事件为生成并显示与用户动作对应的内容(例如内容为笔迹)。应用程序框架层根据触摸传感器180K采集到的数据,生成相应的图像数据或其他格式数据,通过调用内核层控制显示驱动,通过显示屏194显示与用户动作对应的内容。
下面介绍本申请实施例涉及的应用场景以及该场景下的用户界面示例。以下示例多以显示内容为笔迹为例展开说明。
图5示例性示出一种交互场景的用户界面的示意图。
以电子设备为手机作为示例,如图5所示,手机熄屏后,采用AOD技术仍然显示时间信息“10:49”以及日期信息“7月12日星期六八月初三”,此种状态下,手机操作系统(通用操作系统或实时操作系统)检测到屏幕处于息屏状态,启动触摸屏传感器180K进行触摸检测,如界面10a所示,用户对屏幕开始做出动作,根据触摸传感器180K检测到的数据,生成与用户做出的动作相对应的笔迹,并驱动显示屏显示笔迹。生成的笔迹可以是图形、文字或符号等的部分或全部,如图5中界面10b所示,跟随用户在屏幕上做出的滑动动作,显示屏实时显示相应的图形,在界面10c中,用户滑动动作结束,显示屏显示完整的图形。
图5所示的爱心图形仅为示例,本申请实施例提供的交互方法,支持显示各种规则或不规则的形状、图形或文字、符号等。
需要说明的是,本申请各实施例中,息屏状态或息屏场景,具体可以是熄屏、局部显示或全屏压暗等状态中的一种或多种组合。如图6a所示,熄屏状态,也可以称为灭屏状态,可以是屏幕全部像素点不发光的状态,或者屏幕的背光源熄灭的状态。对于支持像素点独立发光的屏幕,例如有机发光二极管(Organic Light Emitting Diode,OLED)屏幕,熄屏状态可以是屏幕的全部像素点不发光(关闭)的状态,即视觉上屏幕全黑的状态;对于液晶显示屏(Liquid Crystal Display,LCD),熄屏状态,指背光源(背光灯)不发光(熄灭)的状态。
局部显示状态,即屏幕的部分像素点被点亮,其他像素点关闭的状态,例如,屏幕进入熄屏状态之后,基于AOD技术,屏幕上用于显示时间、日期、天气等信息的像素点被点亮,或者用于显示动态壁纸或者静态壁纸的部分像素点被点亮,其他位置的像素点不发光(也可以称为熄灭或关闭)。示例性地,如图6b所示,屏幕上用于显示时间“10:49”以及用于显示日期“7月12日星期六八月初三”的像素点被点亮,其余像素点均熄灭(也可以称为不发光或关闭),此种状态即为一种局部显示的示例。
全屏压暗状态,即屏幕上的像素点均发光,但经过压暗处理或者背光源的亮度调低,低于预设阈值。例如,全屏压暗,可以是屏幕显示的壁纸或界面被压暗处理的显示状态,或者,可以是背光源亮度调低的显示状态。例如,对于OLED屏幕,屏幕熄屏后,基于AOD技术,在屏幕上显示时间等信息和/或壁纸等内容时,为减少耗电量,对全屏的像素点做压暗处理后进行显示,呈现全屏压暗效果。例如,如图6c所示的界面11c,熄屏后,仍然显示时间、日期以及壁纸111,屏幕中的全部像素点为点亮状态,为减省耗电量,屏幕经过压暗处理,此种状态即为一种全屏压暗状态示例。对于LCD屏幕,可以是背光源的亮度调低的状态,例如在手机等电子设备进入熄屏状态之前,可以自动调低背光源的亮度,此种状态也可以是一种全屏压暗状态。
需要说明的是,局部显示状态,可以包括局部压暗的情形,局部压暗即屏幕中发光的部分像素点显示的区域采用了压暗处理,以进一步降低功耗。例如,局部显示状态可以是局部显示壁纸的情形,局部显示的壁纸做了压暗处理,呈现局部压暗状态。
此外,全屏压暗状态可以包括局部显示壁纸的情形或全屏显示壁纸的情形。
全屏压暗状态下的压暗处理,可以是采用正片叠底(Multiply)模式实现。例如,可以采用一层黑色半透明蒙层与壁纸做正片叠底,黑色半透明蒙层,可以是一个图层,该图层中的像素点的像素值包含RGB和透明度四个维度,其中,全部像素点的RGB通道的值保持一致,透明度α一致,其中0≤α≤100,当α=0时,像素点透明度最高,为完全透明,相应的像素点显示壁纸原本的颜色;当α=100时,透明度最低,为完全不透明,壁纸上相应的像素点被遮挡。通过调节α的值,可以调节壁纸呈现的明暗效果。
图5所示示例可以是经过压暗处理的全屏压暗状态,即屏幕显示黑色半透明蒙层,用户在屏幕上做出画爱心形状的动作,手机屏幕跟随实时显示爱心形状的笔迹,并在屏幕上显示,具体显示方式为将黑色半透明蒙层中笔迹对应的区域擦除,呈现镂空的效果,模拟擦玻璃的交互效果。
本申请实施例提供的交互方法,支持按照多种不同的风格显示笔迹。例如,在一些实施例中,提供水墨风格、沙画风格、蜡笔风格和手写笔风格等多种风格。
在其他实施例中,可以提供不同的美术风格或者书法风格或者字体,例如,美术风格可以包括抽象派、写实派、印象派、水墨画风格等,根据用户画出的图形自动显示相应风格的图像或者图形等。书法风格可以包括不同的字体,根据用户在屏幕上手写的文字,自动显示相应字体或者风格的文字。例如,自动显示楷体、宋体、小篆等字体。
下面以水墨风格、沙画风格、蜡笔风格和手写笔风格作为示例,进行示例性说明。
参考图7a,图7a所示为显示水墨风格笔迹的界面示例。图7a示例性示出的实例中,屏幕熄屏后,基于AOD技术,进入局部显示状态,屏幕中的部分像素点发光,其余像素点不发光,发光的区域用于显示壁纸12a2,壁纸12a2表面设有一层黑色半透明蒙层,呈现壁纸压暗效果。用户在屏幕上做出了书写汉字“李”(拼音为li)的动作,电子设备确定当前的风格为水墨风格之后,根据用户动作,按照水墨风格对应的笔迹生成方式,生成相应的笔迹图层,笔迹图层携带组成笔迹的多个像素点在屏幕中的坐标信息,笔迹图层与黑色半透明蒙层做减法混合,得到擦除笔迹之后的黑色半透明蒙层,并驱动显示屏显示,呈现具有水墨风格的笔迹12a1,即汉字“李”。如此,可以实现在熄屏后,用户可以屏幕上写字,写出来的字迹可以镂空显示,透露底层的壁纸,丰富视觉体验,增添互动乐趣,在一些场景中还可以起到传递信息的作用,例如在比较安静的会场、图书馆等场合,可以通过在屏幕上写字,传递信息。
参考图7b至图7d,图7b所示为显示手写笔风格笔迹的界面示例。图7c所示为沙画风格笔迹的界面示例,图7d所示为蜡笔风格笔迹的界面示例。
图7b示例性示出的实例中,屏幕熄屏后,基于AOD,进入局部显示状态,部分像素点被点亮以用于显示壁纸121。壁纸121采用了压暗处理,表面覆盖一层黑色半透明蒙层,用户在屏幕上做出画出爱心的动作,电子设备确定当前的风格为手写笔风格,根据用户动作,按照手写笔风格对应的笔迹生成方式,生成相应的笔迹图层,笔迹图层与黑色半透明蒙层做减法混合,并驱动显示屏显示,呈现具有手写笔风格的爱心图形12b,模拟擦除玻璃雾气的效果,使用户体验在手机等电子设备擦玻璃的互动乐趣。
类似地,图7c和图7d分别示例性示出的实例中,电子设备确定当前的风格之后,根据用户动作,分别按照沙画风格和蜡笔风格分别对应的笔迹生成方式,生成相应的笔迹图层,与黑色半透明蒙层做混合处理之后进行显示,分别显示具有沙画风格的爱心图形12c,以及具有蜡笔风格的爱心图形12d。
图7a至图7d所示示例均为局部显示场景下的互动示例,参考图7e,图7e示出了全屏显示壁纸场景(全屏压暗状态)下的一个示例,该示例中,全屏显示壁纸121,在用户做出动作后,显示爱心图形12e,该场景示例中,该电子设备的屏幕为折叠屏,本申请实施例提供的交互方法可以应用于具有直板式屏幕或折叠式屏幕等不同形式屏幕的电子设备中。下面再列举其他示例。
参考图7f至图7h,图7f示出了在全屏显示壁纸且采用了压暗处理的场景下,用户在屏幕画出一个对钩“√”形状后,显示相应的对钩形状的示例,在该示例中,不再呈现类似于擦除玻璃雾气的擦除效果,笔迹位置可以不透露底层的壁纸,而是采用颜色填充,例如,采用白色或其他颜色填充笔迹。类似地,图7g示出了全屏压暗场景下,用户在屏幕上写下“王”字后,界面13b显示相应的笔迹,该笔迹以黑色填充。
图7h示出了在熄屏场景(即熄屏状态)下,也就是屏幕的全部像素点均不发光的状态下,检测到用户在屏幕上做出画三角形的动作,界面13c显示与用户动作一致的三角形。此种场景下,电子设备可能不支持AOD功能或者用户未开启AOD功能(即关闭了熄屏显示),用户选择开启熄屏交互功能。
本申请实施例提出的交互方法,支持用户对熄屏交互进行设置,例如对笔迹风格以及是否开启熄屏交互等进行选择。实现熄屏交互设置的界面可以有多种实现方式。例如,在一些实施例中,可以在熄屏显示的设置界面中增加用于实现熄屏交互设置的控件。再例如,在其他实施例中,可以单独设置熄屏交互界面,熄屏显示界面与熄屏交互界面并列,作为“桌面和个性化”的下一级控件。
示例性地,如图8所示,图8示出了实现熄屏交互设置的界面示例。在“熄屏显示”设置界面14a中,可以增加用于控制熄屏交互的控件,例如增加名称为“熄屏交互”的控件14a1,用户点击控件14a1,即可打开用于进行熄屏交互设置的界面14b,在界面14b中,可以选择开启或者关闭熄屏交互功能,并且可以选择笔迹风格,示例性地,界面14b中示出了水墨、手写笔、沙画和蜡笔四个风格候选项。在实际应用中,可以适当增加其他风格或者删减已有风格。根据用户的选择操作,确定当前的风格。若用户在开启熄屏交互功能之后未选择风格,则按照默认风格进行笔迹生成和显示。默认风格可以从多种风格中随机选择一种或者预先指定一种风格。
基于以上说明继续阐述本申请提出的交互方法,该方法可以应用于图1所示的电子设备100。示例性地,电子设备实现本申请提出的交互方法时,电子设备中可以部署如图2所示的硬件架构,和/或,可以采用如图3或图4所示的软件架构。
请参见图9,图9是本申请实施例提供的一种交互方法的一个具体实施例的流程示意图。该方法可以包括但不限于如下步骤:
S101:电子设备检测到当前的屏幕状态为息屏状态。
电子设备检测到当前的屏幕状态为熄屏状态或局部显示状态或全屏压暗状态中的一种状态时,确定当前的屏幕状态为息屏状态。
S102:电子设备查询熄屏交互是否开启,是,则执行S103,否,结束流程。
电子设备可以提供相应的交互界面,交互界面中显示用于控制开启或关闭熄屏交互功能的控件,并显示多个风格候选项,用户可以在交互界面中选择是否开启熄屏交互功能,在熄屏交互开启状态下,用户可以从界面多个风格中选择一种风格。查询到用户开启熄屏交互功能,则继续查询当前被选中的风格信息。
例如,图8所示为设置熄屏交互功能的交互界面的一个示例。电子设备显示该界面,并接收用户的选择操作,记录用户选中的风格。若用户开启熄屏交互功能之后,未从多个风格候选项中进行选择,则电子设备可以随机选择一种风格作为选中的风格,或者在出厂设置时设置默认的风格,例如设置默认的风格为手写笔,将默认的风格作为当前被选中的风格。
需要说明的是,在本实施例中,S101可以先于S102执行,在其他实施例中,S102可以先于S101执行,即先查询是否开启熄屏交互功能,若未开启,则直接结束流程,而无需执行S101。
本申请实施例中的步骤编号仅用于区分不同步骤,不作为对步骤执行顺序或者执行时序的先后限定。
S103:电子设备查询当前选中的风格信息。
S104:电子设备感应用户是否在屏幕上做出动作,是,执行S105,否,则继续等待。
电子设备检测用户是否在屏幕上做出动作,可以是通过触摸传感器180K感应,触摸传感器感应到用户对触摸屏(即屏幕)做出了触控动作,则采集用户在屏幕上做出动作时的动作数据,动作数据可以包括按照预定的采样周期,采集到的多个触摸点坐标信息和时间戳信息。例如,用户在屏幕上做出书写或画画等动作时,每隔8ms或16ms采集一次用户的手指或其他部位触摸屏幕的位置的坐标信息,每个采样点附带时间戳信息,即可得到动作数据。
S105:电子设备生成符合当前选中的风格且与用户做出的动作对应的笔迹。
电子设备根据触摸传感器采集到的动作数据,以及当前选中的风格信息,生成待显示的笔迹。待显示的笔迹,可以是图像数据,包含组成笔迹的多个像素点的坐标信息。
在本实施例中,多种风格分别对应相应的笔迹生成算法,生成符合当前选中风格的笔迹,即采用当前选中的风格对应的笔迹生成算法,生成与用户动作对应的笔迹。例如,可以设置笔迹生成算法对应的API,通过调用各种风格对应的API,生成各种风格分别对应的笔迹。
在本实施例中,生成与用户动作对应的笔迹,可以是生成与用户动作一致的笔迹,例如,如图5或者图7a至图7g所示示例,显示的笔迹与用户动作保持一致的形状。
本实施例以显示的内容为笔迹进行示例性说明,在其他实施例中,根据用户动作显示的内容,不限于笔迹,还可以是其他内容,例如,显示与用户做出的动作对应的动态壁纸或静态壁纸等。
S106:电子设备显示与用户做出的动作对应的笔迹。
下面详细说明在S105中如何生成具有指定风格(即当前选中的风格)且与用户动作对应的笔迹。如图10所示,首先采集到包含5个采样点P1,P2,P3,P4,P5的动作数据,记录这些采样点的坐标信息以及时间戳信息,P1(t1),P2(t2),P3(t3),P4(t4),P5(t5),其中,t1,t2,t3,t4,t5表示5个采样点分别对应的时间戳,相邻的两个时间戳之间的差值为一个采样周期,例如为8ms或16ms。根据动作数据,进行贝赛尔(Bezier)曲线拟合插值,得到Bezier曲线,对Bezier曲线上的点进行采样,得到多个采样点,例如,图中所示的B1至B10表示在Bezier曲线上采样得到的10个采样点,基于这10个采样点,添加相应风格的笔刷元素。
如图11所示,不同的风格对应不同的笔刷元素。其中,水墨风格对应的笔划元素,可以是毛笔笔刷元素。手写笔风格对应的笔刷元素,采用平滑的线条即可。
根据Bezier曲线上的采样点的位置,将笔刷元素均匀地分布到Bezier曲线上,例如,采样点B1位置放置一个笔划元素,采样点B2位置添加一个笔划元素,以此类推,得到添加有笔刷元素的粗曲线,且由于不同的风格采用了不同的笔刷元素,因而得到的粗曲线呈现不同的风格。对该粗曲线做进一步加工或者不做加工,即得到了待显示的笔迹。
根据采样点添加笔刷元素的方式有多种,例如,可以将采样点作为笔划元素的起始点添加,或者将采样点作为笔划元素的中心点位置进行添加,或者,在两个采样点之间添加一个笔刷元素或多个笔刷元素,本实施例不逐一列举。
图10中以手写笔风格作为示例,手写笔的笔刷元素可以是粗细均匀的平滑线条,因而添加相应的手写笔风格的笔刷元素之后,可以得到如图10所示的笔迹示例,该笔迹以黑色填充。
下面详细说明如何基于动作数据得到Bezier曲线。
在本实施例中,采用二阶Bezier曲线,如图12所示,用户在屏幕上随意滑动,画出了一条曲线,图12中的虚线表示用户动作对应的轨迹,触摸传感器采集用户的动作数据,每隔一个采样周期,采集触摸位置的坐标和时间戳,例如,采集到如图10中所示的5个采样点P1-P5。
直线连接点P1和点P2,得到线段P1P2(图12中采用虚直线表示),取线段P1P2的中点为d1,再取线段P1d1之间的中点c1,以P1作为第一段Bezier曲线的起始点S0,以d1作为第一段Bezier曲线的终点S1,以点c1为第一控制点,Bezier曲线对应的t’的值从0变化到1,得到第一Bezier曲线;
接下来,直线连接点P2和点P3,得到线段P2P3,取线段P2P3的中点为d2,以d1作为第二段Bezier曲线的起始点S1,以d2作为第二段Bezier曲线的终点S2,以点P2为第二控制点c2,t’的值从0变化到1,得到第二段Bezier曲线;
类似地,直线连接点P3和点P4,得到线段P3P4,取线段中点为d3,以d2作为第二段Bezier曲线的起始点S2,以点d3作为第二段Bezier曲线的终点S3,以点P3为第三控制点c3,t’的值从0变化到1,得到第三段Bezier曲线;以此类推,再次取点P4和P5的中点d4,以点d3作为起始点S3,以点d4作为终点S4,以点P4作为控制点c4,得到第四段Bezier曲线。
多段Bezier曲线连接,可以得到平滑的如图12所示的Bezier曲线。
在其他实施例中,可以采用三阶Bezier曲线(即3次Bezier曲线),例如确定起始点和终点,在起始点和终点之间取两个点作为控制点,生成三阶Bezier曲线。
需要说明的是,在一些实施例中,生成Bezier曲线之后,在添加笔刷元素时,或者在添加笔刷元素之后,不同的风格可以采用相同或不同的处理方式进行进一步加工。
示例性地,在本实施例中,如图13所示,在得到Bezier曲线之后,对Bezier曲线进行采样,基于得到的多个采样点,添加相应风格的笔刷元素,例如当前选中的风格为手写笔,则在Bezier曲线基础上添加相应的手写笔风格的笔刷元素,若当前选中的风格为沙画,则在Bezier曲线基础上添加手写笔风格的笔刷元素;若当前选中的风格为蜡笔,则在Bezier曲线基础上添加蜡笔风格的笔刷元素。示例性地,在本实施例中,此3种风格的笔刷元素可以均匀添加,得到线条粗细均匀的笔迹。
在一些实施例中,如图14所示,在生成沙画风格或蜡笔风格的笔迹时,可以在添加沙画风格的笔刷元素或者蜡笔风格的笔刷元素时,对笔刷元素进行随机旋转和/或位置抖动处理。
如图15所示,随机旋转,可以是对原始的笔刷元素按照随机的角度,进行旋转,得到旋转后的笔刷元素,例如,随机旋转之后的笔刷元素放置到采样点B2处。
如图16所示,位置抖动,可以是笔刷元素的中心点相对于采样点进行预定量的随机偏移,例如预定量可以是n个像素点,图16中,笔刷元素的中心点相对于采样点B2偏移n个像素点,n可以是0-50。
位置抖动和随机旋转可以组合或者单独实施,例如位置抖动和随机旋转同时施加于同一个笔刷元素,也可以分别施加于不同的笔刷元素,不同的笔刷元素可以采用统一的方式进行加工处理,也可以采用不同的方式进行加工处理,例如,同一条曲线上的笔刷元素采用随机旋转方式处理,而不采用位置抖动方式处理。
在本实施例中,对沙画风格,采用随机旋转和位置抖动组合的方式进行处理,对蜡笔风格,采用位置抖动的方式进行处理。
在其他实施例中,可以采用随机旋转和位置抖动等处理方式中的至少一种,对上述多种风格中的至少一种风格的笔刷元素进行处理,具体不做限定。
示例性地的,在本实施例中,对于水墨风格,可以采用如图17所示的方式进行处理。水墨风格可以针对书写需求设计,呈现类似于用毛笔书写的效果。水墨风格适应书写汉字等语种的文字设计。因而生成的笔迹中,可以包括一个或多个笔划。
在水墨风格对应的处理方式中,笔迹中的笔划的粗细根据速度变化,速度越快,则笔划越细,速度越慢,则笔划越粗。在此种处理方式中,需要进一步获取用户做出动作时的速度信息,速度信息可以基于动作数据中相邻的采样点之间的距离和采样周期确定,例如相邻的采样点之间的距离与采样周期的比值,即可得到速度,速度值越高,也就是速度越快,则相应位置的笔划元素可以做缩小或伸长处理,以使得对应位置呈现的笔划线条相对于原始的笔刷元素更细。速度越慢,也就是速度值越小,则相应位置的笔划元素可以做加粗或者放大处理,以使得相应位置呈现的笔划线条相对于原始的笔刷元素更粗。
需要说明的是,在一些实施例中,根据相邻的采样点之间的距离和采样时间间隔(即采样周期)获得的速度数据可以是离散数据,在实际应用场景中,某个时刻的速度可能产生瞬时突变,即速度变化幅度剧烈,若以速度为参考对线条粗细(例如笔刷元素的粗细)进行调节,可能产生线条的粗细的突变,影响视觉效果,可以对离散的速度数据进行滤波处理,得到更为平滑的速度曲线,利用可以采用低通滤波器对速度数据进行滤波处理,根据滤波后的速度数据调节相应位置的笔刷元素。示例性地,在本实施例中,低通滤波器采用一欧元滤波器(One Euro Filter),在其他实施例中,低通滤波器可以是洛伦兹型低通滤波器、巴特沃斯型低通滤波器、卡尔曼滤波器、RC低通滤波器中的一种或多种组合。
在本实施例或其他实施例中,还可以进一步获取用户做出动作时的压力信息,根据压力信息,进一步调节笔划的粗细,使得笔划的粗细跟随用户动作的压力变化。示例性地,用户做出动作时相对于屏幕的压力越大,则此位置处的笔划越粗,压力越小,则此位置处的笔划越细。类似地,笔划粗细的调节方式可以通过对笔划元素进行预定方向的缩放实现。例如,预定方向可以是沿长度方向或者沿宽度方向,或者沿设定的角度方向、沿长度方向的放大,为拉伸,沿宽度方向的放大为加粗,长和宽两个方向同时放大,则为等比例放大,缩小同理。
对于水墨风格或手写笔风格等风格,还可以设置笔刷元素在Bezier曲线上的放置方向跟随用户做出动作时的运笔方向而变化。其中,运笔方向,即用户做出动作时的行进方向,例如用户手指在屏幕上进行滑动,滑动的前进方向即为运笔方向。笔刷元素在Bezier曲线上的放置方向,包括单个笔刷元素的放置方向或相邻的笔刷元素之间的拼接方向。例如,作为一种可实施方式,可以是横向运笔时,单个笔刷元素横向放置在曲线上,纵向运笔时,单个笔刷纵向放置在曲线上。作为另一种可实施方式,可以是相邻的笔刷元素之间的拼接方向根据运笔方向而定,例如,以息屏时,用户书写汉字场景为例,汉字分为从左至右的横向运笔,和从上至下的纵向运笔,如图18所示,用户横向运笔时,相邻的两个笔刷元素随之横向拼接,用户纵向运笔时,相邻的两个笔刷元素随之纵向拼接。
此外,在本实施例中,对于水墨风格,还可以采用笔触处理。笔触处理,即在起笔或落笔位置,进行预定处理。示例性地,在本实施例中,预定处理可以是在起笔位置和/或落笔位置,对笔划元素进行倍数加粗处理,例如可以根据毛笔字的书写习惯,根据起笔位置的笔划特征,对起笔位置的笔划元素在不同位置分别进行不同倍数的加粗处理,以得到模仿起笔笔触的笔划,落笔处的处理方式同理。在其他实施例中,可以根据毛笔字的书写习惯,可以在笔刷元素中添加起笔位置专用的笔刷元素和落笔位置专用的笔刷元素,在生成笔迹时,在起笔或者落笔位置添加相应的起笔笔刷元素或落笔笔刷元素。
需要说明的是,在用户选择水墨风格的情况下,在其他实施例中,生成笔迹的方式,还可以是根据用户动作,识别用户动作轨迹对应的文本,自动生成不同字体的字符(例如汉字),即上述笔刷元素拼接的方式仅为一种示例,在其他的一部分实施例中,可以不采用笔刷元素拼接的方式,而是识别用户在屏幕上书写的文字等字符之后,自动显示一种字体的字符,字体可以由用户选择。
根据以上示例性说明,可以得到用户动作对应的笔迹。如图19所示,在本实施例中,假设经过上述步骤得到笔迹00,之后,生成笔迹对应的笔迹蒙层01。如前所述,全屏压暗状态,可以是在壁纸上覆盖一层蒙层,例如覆盖一层黑色半透明蒙层,蒙层为一个图层,该图层中各个像素点的RGB三个通道的像素值都是相同的,Alpha通道的值也相同。Alpha通道(简称α)的值表示透明度。透明度可以是从0到1,也可以是从0到100。透明度为1或100,表示完全不透明,透明度为0,表示完全透明。
如图19所示,全屏蒙层02即为覆盖在壁纸上的半透明蒙层,在本实施例中,根据笔迹00生成的笔迹蒙层01的RGB像素值与全屏蒙层02的RGB像素值一致。且笔迹蒙层01中各个像素点的α的值,与全屏蒙层02中的各个像素点的α的值,保持一致,即透明度一致。
接下来,对笔迹蒙层01和全屏蒙层02两个图层做减法混合,示例性地,具体的混合方式可以是进行异或运算XOR,即两个图层相同位置的像素点之间做异或运算,得到全屏蒙层03。在全屏蒙层03中,笔迹对应的区域中的各个像素点的α的值均为0。
将全屏蒙层03与壁纸04(例如是全屏壁纸)混合,示例性地,混合方式可以是正片叠底(multiply)。将混合后的图像数据作为待显示的数据,在显示屏上显示。如图19中界面15a所示,呈现出的视觉效果为全屏壁纸压暗,其中,用户做出动作的区域,也就是笔迹对应的区域为透明,壁纸的图案可以透过笔迹显示,呈现模拟擦除玻璃雾气的视觉效果。
在本实施例中,显示笔迹之后,若在预定时长内没有检测到用户做出的下一个动作,当前显示的笔迹可以采用渐渐淡化的方式在屏幕中消失。作为一种可实施方式,可以从空间维度设置逐渐消失的显示效果,例如,从边缘到中心逐渐消失,或者从左至右逐渐消失,或者从上至下逐渐消失;或者,作为另一种可实施方式,可以根据时间维度设置逐渐消失的效果,例如,笔迹上的每个像素点对应的透明度随时间逐渐增大,直至增大到初始的透明度(也就是与全屏蒙层02的透明度一致),恢复到全屏压暗状态,笔迹不再可见。或者,作为再一种可实施方式,还可以采用时间维度和空间维度相结合的方式,呈现逐渐消失的效果。
请见图20,图20示出了从时间维度呈现逐渐消失的显示效果的示例,在t时刻,界面16a为当前显示有笔迹的界面示例,在t+1时刻,显示的界面为16b,在界面16b中,笔迹对应的区域的透明度随时间逐渐增大,笔迹相对于蒙层的区别程度逐渐弱化;在t+2时刻,如界面16c所示,笔迹对应的区域的像素点的透明度与全屏蒙层02的透明度一致,笔迹完全不可见,恢复至原来的全屏压暗状态。
如图21所示,根据以上示例性说明,可以得到本申请实施例提供的交互方法可以包括但不限于如下步骤:
S201:电子设备确定屏幕处于息屏状态。
息屏状态,可以理解为电子设备熄灭屏幕之后到唤醒屏幕之间的状态,即,电子设备从熄灭屏幕到再次唤醒屏幕之间的状态都可以属于息屏状态。为防止混淆,需要说明的是,熄屏状态可以是息屏中的一种状态。息屏状态还可以是全屏压暗或者局部显示状态或者其他处于屏幕熄灭到屏幕唤醒之间的状态。
其中,唤醒屏幕,指的是用户操作电子设备以唤醒屏幕,屏幕熄灭之后的AOD自动显示与唤醒屏幕不同。
S202:电子设备检测用户的第一动作。
在一些实施例中,电子设备检测用户做出的第一动作的方式,可以是用户在屏幕上做出动作,电子设备通过触摸传感器、压力传感器等设备检测到用户的动作数据。在有的实施例中,可以是用户在电子设备的机器视觉范围内,做出动作,电子设备通过采集用户做出动作的图像数据,识别用户做出的动作。
S203:电子设备响应于第一动作,显示第一内容;第一内容与第一动作对应。
其中,第一内容可以是笔迹,也可以是其他内容。例如,在一些实施例中,显示第一内容,可以是显示与第一动作对应的第一笔迹。在其他实施例中,第一内容可以是动态壁纸或静态壁纸或者其他的指定信息(例如天气、时间、日期、电量等信息)。
第一内容与第一动作对应,可以是第一内容是模仿第一动作得到,例如,在一些实施例中,显示第一笔迹,可以是显示模仿第一动作得到的笔迹。在其他实施例中,第一内容与第一动作对应,也可以是第一内容与第一动作之间具有确定的映射关系,例如,指定的触控动作作为第一动作,指定的静态壁纸或动态壁纸等内容作为第一内容,第一动作与第一内容之间建立确定的映射关系。该映射关系可以由用户自定义。如此,用户在息屏状态下做出指定的触控动作,即可显示用户期望出现的动态壁纸等,提升用户体验。
根据以上示例性说明,可以得到,在一些实施例中,显示第一笔迹之前,可以显示背景,在息屏状态喜爱,显示第一笔迹,可以是显示背景和所述第一笔迹。
其中,背景可以包括壁纸和/或指定信息,壁纸可以是全屏显示的壁纸或局部显示的动态壁纸或静态壁纸等,指定信息可以包括时间、天气、日期、电量、通知消息等多种消息中的至少一种。
例如,图5或图6b所示场景示例中,背景包括显示的时间“10:49”以及日期“7月12日星期六八月初三”。再例如,图6c中,背景包括局部显示的壁纸111和显示的时间“10:49”以及日期“7月12日星期六八月初三”。在图7a中,背景包括局部显示的壁纸120。在图7b至图7d中,背景包括局部显示的壁纸121和显示的时间“10:49”以及日期“7月12日星期六八月初三”。在如图7e中,背景包括全屏壁纸121以及显示的时间等信息。
在一些实施例中,可以是背景和笔迹一起显示。例如,图5中所示界面10c中,显示了背景和爱心形笔迹;在图7a至图7e中,显示了包含壁纸的背景和爱心形笔迹。图7f和图g中,显示了全屏显示的壁纸和笔迹。
在其他实施例中,可以仅显示第一笔迹,而不显示背景。例如,如图7h所示,图7h所示示例中,仅显示了三角形的笔迹,并未显示背景,显示屏中的其他像素点均为熄灭状态。
显示的第一笔迹可以是透明的,也可以是不透明的。例如,图7a至图7e所示的示例中,显示的爱心形笔迹均为透明的,背景中的壁纸中被爱心形的笔迹覆盖的区域可以透过笔迹显示出来。再例如,如图7f至图7h所示,显示的笔迹均为不透明的,底层的壁纸无法透过笔迹显示出来。
在背景和笔迹一起显示的实施例中,背景包括第一壁纸;显示时,在第一壁纸上显示第一笔迹。示例性地,第一笔迹是透明的;第一壁纸上被第一笔迹覆盖的区域透过第一笔迹显示。例如,图7a中,壁纸120被笔迹“李”覆盖的区域,可以透过笔迹显示出来;图7b至图7e所示的示例中,壁纸被笔迹覆盖的区域的图案,也可以透过爱心形笔迹显示出来。
在一些实施例中,一种典型的场景示例为,以第一透明度,显示第一壁纸,例如对于全屏显示的壁纸做压暗处理,表面覆盖一层蒙层;在第一壁纸上,显示第一笔迹时,第一笔迹以第二透明度显示。第二透明度与第一透明度不同,例如第二透明度小于第一透明度。显示笔迹采用的透明度(第二透明度)小于显示背景中的壁纸采用的透明度(第一透明度),可以呈现出笔迹经过的位置被擦亮的视觉效果。此处的透明度指的是阿尔法通道(α Channel或Alpha Channel)的值。例如,图7a至图7e所示的示例中,笔迹经过的位置相比于屏幕中的其他被压暗处理的区域更亮,呈现用户手指划过的部分被擦亮的效果。
在其他实施例中,为区分壁纸和笔迹,还可以以第一亮度显示第一壁纸;在用户做出动作(第一动作)之后,可以在第一壁纸上,显示与用户动作对应的第一笔迹,第一笔迹以第二亮度显示,第二亮度与第一亮度不同。例如,图5所示的界面10c中,显示的爱心形笔迹的亮度可以与屏幕上其他区域的亮度不同。或者,再例如,图7a至图7g所示的界面示例中,显示笔迹的亮度可以采用第一亮度,显示壁纸的亮度可以采用第二亮度,第一亮度与第二亮度不同。
第一亮度与第二亮度,可以通过直接控制像素点的亮度来实现,例如,在包含笔迹的图像数据中,将笔迹对应的像素点的亮度值指定为第一亮度值,而屏幕上其他区域,例如壁纸上除显示笔迹的区域以外的其他区域,则设置像素点的亮度值为第二亮度值。
在一些实施例中,可以通过叠加或混合透明蒙层来实现透明度或亮度的控制。例如,如上述列举的具体实施例中阐述的,如图19所示,以第一透明度显示的第一壁纸,是在第一壁纸(例如壁纸04)上叠加第一蒙层(例如全屏蒙层02)得到的,第一蒙层中的各个像素点具有第一透明度α1;例如,全屏蒙层02中各个像素点的的透明度均为α1。
以第二透明度显示的第一笔迹(例如笔迹06),是在第一壁纸上叠加第二蒙层(例如全屏蒙层03)得到;其中,第二蒙层为第一蒙层与第一笔迹(这里可以指笔迹00对应的笔迹蒙层01)混合得到。其中,在第二蒙层中,第一笔迹(笔迹00)对应的像素点具有第二透明度,例如,示例性地,由于笔迹蒙层01中的像素点的透明度也为α1,因而笔迹蒙层01与全屏蒙层02进行异或运算时,相同透明度的像素点的透明度为0,不同透明度的像素点的透明度保持为第一透明度,得到的全屏蒙层03中,笔迹00对应位置的像素点的透明度变为0,在与壁纸04叠加混合,在笔迹对应的区域,呈现出透明或者镂空的效果。
其中,需要说明的是,在实际应用中,只要使得第二蒙层中,笔迹对应的区域所包含的各个像素点的透明度的值,与蒙层中笔迹之外的其他区域的像素点的透明度的值不同,即可显示出笔迹,笔迹对应的像素点可以不为0。
例如,在其他实施例中,可以不执行如图19所示的流程,而是在确定笔迹00中的边界像素点的坐标之后,在全屏蒙层02中将笔迹对应的位置的各个像素点的α通道的值(也就是透明度)修改为第二透明度α2,α2≠α1即可。
也就是说,在采用蒙层控制第一亮度和第二亮度的实施例中,蒙层中笔迹对应的第二透明度与壁纸中其他区域对应的第一透明度不同,即可显示笔迹,且显示出的笔迹具有镂空效果。
在一些实施例中,本申请实施例提出的交互方法,支持显示指定风格的笔迹。例如,如图7a显示了水墨风格的笔迹,图7b显示了手写笔风格的笔迹,图7c显示了沙画风格的笔迹;图7d显示了蜡笔风格的笔迹。
示例性地,显示第一笔迹,可以是显示线条粗细变化的第一笔迹。其中,如上述实施例中所阐述的,线条粗细可以根据第一动作对应的速度和/或压力确定。如图7a中,水墨风格下,线条的粗细是随用户做出动作时的速度、压力中的至少一种的变化而变化的。
示例性地,显示第一笔迹,可以是显示线条粗细不变的第一笔迹。例如,如图7b至图7h所示,显示的爱心形笔迹的线条粗细,或者显示的对钩形状的笔迹,或者显示的“王”字形笔迹,或者显示的三角形笔迹,线条粗细都是不变的。
示例性地,显示第一笔迹,可以是显示包括第一笔划的第一笔迹,其中,第一笔划的起笔处和/或落笔处采用第一方式显示;第一笔划的中间部分采用第二方式显示,第一方式与第二方式不同;其中,中间部分为第一笔划中起笔处和落笔处之间的笔划。
例如,如图7a所示,显示的“李”字笔迹中,每个笔划的起笔和落笔处,与每个笔划的中间分部分,采用了不同的方式进行显示。其中,第一笔划可以是“一”笔划,以第一笔划为例,该笔划的起笔处和落笔处的显示方式,与该笔划的中间部分的显示方式不同,起笔处和落笔处做了特殊处理,起笔处呈现明显的起笔时的顿笔笔触,落笔处呈现出明显的落笔时的顿笔笔触,而中间部分则未采用笔触处理,未采用笔触显示方式,因而起笔和落笔处,与中间部分的显示方式不同。
在其他实施例中,可以在识别用户在屏幕写出的文字或者符号等字符后,自动显示指定字体的字符。字体的选择可以有用户设置,例如,用户在屏幕上手写写出了一个汉字,则可以在屏幕上不显示模仿用户写出的手写字体的汉字,而是显示楷体或者宋体或者其他字体的标准字体的汉字。
综上,本申请实施例提出的交互方法,可以将笔刷资源(笔刷元素)跟随手滑笔迹不停的绘制,获得笔迹,笔迹可以是笔划或者图形等,将笔迹与蒙层做相减的混合模式,然后叠加到息屏状态下显示的壁纸等对象上,得到的图像数据进行显示,形成笔迹位置镂空的效果,显示的笔迹可以跟随用户的手指滑动实时生成,使用户可以体验到“擦玻璃”的互动乐趣,此外,本申请实施例还可以选择多种风格、多种笔刷效果,使用户体验到风格多样化的“书写”乐趣。
如此,本申请实施例提出的交互方法,可以增加息屏状态下的互动乐趣,提升用户体验。并且,手指移开几秒后,笔划或者图形效果渐渐消失,恢复到原始压暗状态,丰富视觉反馈。
本申请各实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DWD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD)等。以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
Claims (12)
- 一种交互方法,其特征在于,应用于电子设备,所述方法包括:确定所述电子设备的屏幕处于息屏状态;检测用户的第一动作;响应于所述第一动作,在所述息屏状态下,显示第一内容;所述第一内容与所述第一动作对应。
- 如权利要求1所述的方法,其特征在于,显示第一内容,包括:显示第一笔迹;所述第一笔迹与所述第一动作对应。
- 如权利要求2所述的方法,其特征在于,显示第一笔迹之前,所述方法还包括:在所述息屏状态下,显示背景;所述背景包括壁纸和/或指定信息;在所述息屏状态下,显示第一笔迹,包括:在所述息屏状态下,显示所述背景和所述第一笔迹。
- 如权利要求3所述的方法,其特征在于,所述背景包括第一壁纸;所述显示所述背景和所述第一笔迹,包括:在所述第一壁纸上,显示所述第一笔迹;其中,所述第一笔迹是透明的;所述第一壁纸上所述第一笔迹覆盖的区域,透过所述第一笔迹显示。
- 如权利要求3或4所述的方法,其特征在于,所述背景包括第一壁纸;所述显示背景包括:以第一透明度,显示所述第一壁纸;所述显示所述背景和所述第一笔迹,包括:在所述第一壁纸上,显示所述第一笔迹;其中,所述第一笔迹以第二透明度显示;所述第二透明度与所述第一透明度不同。
- 如权利要求5所述的方法,其特征在于,所述第二透明度小于所述第一透明度。
- 如权利要求2-6中任一项所述的方法,其特征在于,显示第一笔迹,包括:显示具有指定风格的第一笔迹。
- 如权利要求2-7中任一项所述的方法,其特征在于,显示第一笔迹,包括:显示线条粗细变化的第一笔迹;其中,所述线条粗细根据所述第一动作对应的速度和/或压力确定。
- 如权利要求2-7中任一项所述的方法,其特征在于,显示第一笔迹,包括:显示线条粗细不变的第一笔迹。
- 如权利要求2-8中任一项所述的方法,其特征在于,显示第一笔迹,包括:显示包括第一笔划的第一笔迹;其中,所述第一笔划的起笔处和/或落笔处采用第一方式显示;所述第一笔划的中间部分采用第二方式显示,所述第一方式与所述第二方式不同;其中,所述中间部分为第一笔划中所述起笔处和落笔处之间的笔划。
- 一种电子设备,其特征在于,所述电子设备包括:存储器,用于存储计算机程序;处理器,所述处理器用于执行所述存储器中的计算机程序以实现如权利要求1-10中任一项所述的方法。
- 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现权利要求1-10任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410705862.8 | 2024-05-31 | ||
| CN202410705862.8A CN121050638A (zh) | 2024-05-31 | 2024-05-31 | 交互方法、电子设备和计算机存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025246293A1 true WO2025246293A1 (zh) | 2025-12-04 |
Family
ID=97812263
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/139889 Pending WO2025246293A1 (zh) | 2024-05-31 | 2024-12-17 | 交互方法、电子设备和计算机存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN121050638A (zh) |
| WO (1) | WO2025246293A1 (zh) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107172282A (zh) * | 2017-05-17 | 2017-09-15 | 努比亚技术有限公司 | 锁屏壁纸显示方法、移动终端及计算机可读存储介质 |
| CN108196670A (zh) * | 2017-12-25 | 2018-06-22 | 深圳市金立通信设备有限公司 | 一种手势显示方法、终端设备及计算机可读存储介质 |
| CN110489199A (zh) * | 2019-08-23 | 2019-11-22 | 深圳传音控股股份有限公司 | 息屏显示方法、装置、终端及存储介质 |
| CN306550852S (zh) * | 2021-05-18 |
-
2024
- 2024-05-31 CN CN202410705862.8A patent/CN121050638A/zh active Pending
- 2024-12-17 WO PCT/CN2024/139889 patent/WO2025246293A1/zh active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN306550852S (zh) * | 2021-05-18 | |||
| CN107172282A (zh) * | 2017-05-17 | 2017-09-15 | 努比亚技术有限公司 | 锁屏壁纸显示方法、移动终端及计算机可读存储介质 |
| CN108196670A (zh) * | 2017-12-25 | 2018-06-22 | 深圳市金立通信设备有限公司 | 一种手势显示方法、终端设备及计算机可读存储介质 |
| CN110489199A (zh) * | 2019-08-23 | 2019-11-22 | 深圳传音控股股份有限公司 | 息屏显示方法、装置、终端及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN121050638A (zh) | 2025-12-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110119296B (zh) | 切换父页面和子页面的方法、相关装置 | |
| CN108776568B (zh) | 网页页面的显示方法、装置、终端及存储介质 | |
| KR102689503B1 (ko) | 전자 장치 및 그의 표시 방법 | |
| WO2021159922A1 (zh) | 卡片显示方法、电子设备及计算机可读存储介质 | |
| CN110647274A (zh) | 一种界面显示方法及设备 | |
| CN113810533B (zh) | 一种信息提醒方法及电子设备 | |
| WO2025001973A1 (zh) | 显示方法、电子设备和计算机存储介质 | |
| WO2023040775A1 (zh) | 一种预览方法、电子设备及系统 | |
| CN113515327B (zh) | 一种显示时间的方法及电子设备 | |
| WO2025167740A1 (zh) | 显示方法、用户界面及相关装置 | |
| CN113986406B (zh) | 生成涂鸦图案的方法、装置、电子设备及存储介质 | |
| CN114095610B (zh) | 一种通知消息处理方法及计算机可读存储介质 | |
| CN116700585B (zh) | 熄屏控制方法、电子设备及存储介质 | |
| US12572373B2 (en) | Quick interface return method and electronic device | |
| CN115145436B (zh) | 一种图标处理方法及电子设备 | |
| CN115328592A (zh) | 显示方法及相关装置 | |
| CN116088715B (zh) | 消息提醒方法及电子设备 | |
| EP4394560A1 (en) | Display method and electronic device | |
| WO2025246293A1 (zh) | 交互方法、电子设备和计算机存储介质 | |
| WO2024152747A1 (zh) | 屏幕显示方法、电子设备及可读存储介质 | |
| CN115933952B (zh) | 一种触控采样率调节方法及相关装置 | |
| WO2023040613A1 (zh) | 人机交互方法、计算机可读介质和电子设备 | |
| CN116055627A (zh) | 一种熄屏控制方法、电子设备和存储介质 | |
| WO2026086252A1 (zh) | 一种显示方法及电子设备 | |
| WO2025260663A1 (zh) | 一种显示方法及电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24941561 Country of ref document: EP Kind code of ref document: A1 |