WO2022257737A1 - Haptic effect control method and apparatus, and electronic device - Google Patents

Haptic effect control method and apparatus, and electronic device Download PDF

Info

Publication number
WO2022257737A1
WO2022257737A1 PCT/CN2022/094245 CN2022094245W WO2022257737A1 WO 2022257737 A1 WO2022257737 A1 WO 2022257737A1 CN 2022094245 W CN2022094245 W CN 2022094245W WO 2022257737 A1 WO2022257737 A1 WO 2022257737A1
Authority
WO
WIPO (PCT)
Prior art keywords
haptic
tactile
priority
trigger message
output
Prior art date
Application number
PCT/CN2022/094245
Other languages
French (fr)
Chinese (zh)
Inventor
董舒
马可铮
柯毅
刘德珩
Original Assignee
武汉市聚芯微电子有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202110647049.6A external-priority patent/CN113296638A/en
Priority claimed from CN202110647060.2A external-priority patent/CN113253848A/en
Priority claimed from CN202110647057.0A external-priority patent/CN113110748B/en
Application filed by 武汉市聚芯微电子有限责任公司 filed Critical 武汉市聚芯微电子有限责任公司
Publication of WO2022257737A1 publication Critical patent/WO2022257737A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer

Definitions

  • the invention relates to a method and device for flexibly controlling the output of haptic effects, and electronic equipment including the device.
  • Touch screens have replaced traditional keys and are used in various electronic devices. Taking a portable electronic device such as a smart phone as an example, in addition to volume and power buttons, a physical keyboard is no longer provided, but a virtual keyboard is instead provided on a touch screen to receive user input. In response to the user touching the virtual keyboard, tactile effects such as vibration feedback may be provided to confirm successful key entry to the user. In addition, vibration effects can also be provided when text messages or voice calls are received, and when an alarm is due.
  • the vibration effect can be provided by a motor such as a rotor motor or a linear motor, which is controlled by a driver chip.
  • the driver chip may include hardware trigger pins. When the operating system detects a predetermined event, it can generate a hardware trigger pulse and provide the pulse to a hardware trigger pin of the motor driver chip. In response to detecting a trigger pulse on the hardware trigger pin, the driver chip can use the drive signal to drive the motor to generate a vibration effect.
  • Motor drive chips generally include one to three hardware trigger pins, which are used to receive trigger pulses generated in response to specific events or event types, and use different drivers in response to receiving trigger pulses on different hardware trigger pins. Signals are used to drive motors to provide different haptic effects.
  • portable electronic devices can provide more and more functions, so it is also expected that they can provide richer tactile effects. For example, when a user uses a portable electronic device to watch movies, listen to music, or play games, he may expect to be able to provide tactile effects corresponding to video images or music; Electronic devices can provide tactile feedback. For different events or event types, users expect to experience different haptic effects.
  • the traditional trigger method based on hardware pins can no longer meet the needs of increasingly rich trigger situations and haptic effects. If the driver chip provides more pins for receiving pulse signals triggered by different events to generate different tactile effects, this will lead to a more complex structure of the driver chip and higher costs.
  • an operating system running on an electronic device may execute multiple parallel processes, and these parallel processes may trigger multiple different haptic effects simultaneously or within a short period of time, causing the motor driver chip to be unable to determine which haptic effect should be executed.
  • the motor driver chip receives a new haptic effect trigger signal generated by the operating system while the motor is outputting the previously triggered haptic effect, the driver chip does not know how to generate the haptic effect desired by the user.
  • One aspect of the present application provides a haptic effect control method executed in a haptic effect control chip, including: receiving a haptic trigger message, the haptic trigger message at least including a haptic mode code, the haptic mode code indicating multiple predetermined haptic modes One of, wherein the plurality of predetermined haptic patterns correspond to a plurality of haptic effects represented by a drive signal for driving a haptic output device; decoding the haptic trigger message to determine the haptic pattern code The indicated tactile mode; according to the mapping relationship between the tactile mode code and the register address storing the corresponding drive signal, determine the register address of the drive signal corresponding to the tactile mode code, thereby determining the tactile effect corresponding to the tactile mode and using the drive signal stored in the register address to drive the tactile output device to output the tactile effect.
  • the haptic trigger message further includes a header for identifying the haptic trigger message.
  • the haptic trigger message further includes a priority code associated with the haptic mode code, the priority code indicating a priority of the haptic mode indicated by the haptic mode code.
  • decoding the haptic trigger message further includes determining a priority indicated by the priority encoding, and the method further includes determining whether to output the haptic effect based on the priority.
  • the haptic trigger message is received on a plurality of pins, the plurality of pins including a control pin and one or more data pins, when the control pin is activated , receiving the haptic trigger message on the one or more data pins.
  • the haptic trigger message is received on an I2C or I2S interface
  • the driving signal includes a real-time driving signal received on the I2C or I2S interface
  • the The real-time driving signal is written into the first-in-first-out register, so that when the haptic pattern code obtained by decoding the haptic trigger message is mapped to the register address in the first-in-first-out register for storing the real-time driving signal, the The real-time driving signal in the register address is used to drive the tactile output device, so as to realize the real-time output of the tactile effect.
  • the driving signal includes a real-time driving signal
  • the real-time driving signal and the haptic trigger message are received through a single pin of the haptic effect control chip.
  • the real-time driving signal and the haptic trigger message are represented by floating levels, and the floating levels are detected and decoded by a level detection unit in the haptic effect control chip.
  • the floating level has a first level range corresponding to the header part and a second level range corresponding to the signal payload part, and the first level range is different from the second level range, the header part is used to indicate that the signal payload part includes a tactile mode code or a real-time driving signal.
  • a haptic effect control chip including: an input unit configured to receive a haptic trigger message, the haptic trigger message at least including a haptic mode code, the haptic mode code indicating a plurality of predetermined haptic modes One, wherein the plurality of predetermined haptic patterns correspond to a plurality of haptic effects represented by a driving signal for driving a haptic output device; a decoding unit configured to decode the haptic trigger message to determine the The tactile mode indicated by the tactile mode code; the tactile effect determining unit configured to determine the register address of the drive signal corresponding to the tactile mode code according to the mapping relationship between the tactile mode code and the register address storing the corresponding drive signal, thereby determining a haptic effect corresponding to the haptic mode; and a driving unit configured to use a driving signal stored in the register address to drive the haptic output device to output the haptic effect.
  • the haptic trigger message further includes a header for identifying the haptic trigger message.
  • the haptic trigger message further includes a priority code associated with the haptic mode code, the priority code indicating a priority of the haptic mode indicated by the haptic mode code.
  • the decoding unit further determines the priority indicated by the priority encoding when decoding the haptic trigger message, and the haptic effect determining unit is further configured to determine whether to output the priority based on the priority. haptic effects.
  • the input unit receives the haptic trigger message from multiple pins, the multiple pins include a control pin and one or more data pins, when the control pin is activated , receiving the haptic trigger message on the one or more data pins.
  • the input unit includes an I2C or I2S interface
  • the haptic trigger message is received on the I2C or I2S interface
  • the driving signal includes a real-time driving signal received on the I2C or I2S interface. signal, the real-time driving signal received through the I2C or I2S interface is written into the first-in-first-out register, so that the tactile pattern code obtained when decoding the tactile trigger message is mapped to the first-in-first-out register for storage
  • the real-time driving signal in the register address is used to drive the haptic output device, so as to realize the real-time output of the haptic effect.
  • the driving signal includes a real-time driving signal
  • the real-time driving signal and the haptic trigger message are received through a single pin of the haptic effect control chip.
  • the real-time driving signal and the haptic trigger message are represented by floating levels, and the floating levels are detected and decoded by a level detection unit in the haptic effect control chip.
  • the floating level has a first level range corresponding to the header part and a second level range corresponding to the signal payload part, and the first level range is different from the second level range, the header part is used to indicate that the signal payload part includes a tactile mode code or a real-time driving signal.
  • a mobile electronic device including: at least one tactile output device; and the above-mentioned tactile effect control chip, configured to control the at least one tactile output device to output a corresponding tactile effect.
  • Another aspect of the present application provides a method for controlling haptic feedback, including: receiving a first haptic trigger message, the first haptic trigger message including a first haptic mode code indicating a first haptic mode and indicating the first haptic first priority encoding of the first priority of the mode; in response to receiving said first haptic trigger message, start a timer; before said timer expires, receive a second haptic trigger message, said second haptic trigger message
  • the trigger message includes a second haptic mode code indicating a second haptic mode and a second priority code indicating a second priority of the second haptic mode; based on the first haptic mode and the first priority and the first two haptic modes and a second priority, determining the haptic mode to be output; and instructing the haptic output device to output the determined haptic mode to be output after the timer expires.
  • determining the haptic pattern to be output includes, when the first haptic pattern is the same as the second haptic pattern: if the first priority is the same as the second priority, selecting the one of the first haptic mode and the second haptic mode and ignore the other; or if the first priority is different from the second priority, select the haptic mode with the higher priority and ignore the haptic mode with the higher priority. Low priority haptic mode.
  • determining the haptic pattern to be output includes, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, then determining the The first haptic mode is the haptic mode to be output, and the second haptic mode is ignored; if the first priority is lower than the second priority, then determine that the second haptic mode is the haptic mode to be output mode, and ignore the first haptic mode; or if the first priority is equal to the second priority, determine one of the first haptic mode and the second haptic mode as the haptic to be output mode, and ignore the other of the first haptic mode and the second haptic mode.
  • determining the haptic pattern to output includes, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, and the If the second priority is higher than or equal to a predetermined threshold, it is determined that the first haptic mode and the second haptic mode are the haptic modes to be output, and the output timing of the first haptic mode is in the second haptic mode Before; if the first priority is higher than the second priority, and the second priority is lower than a predetermined threshold, then determining that the first haptic pattern is a haptic pattern to be output, and ignoring the first haptic pattern Two haptic modes; if the first priority is lower than the second priority, and the first priority is higher than or equal to a predetermined threshold, then determining that the first haptic mode and the second haptic mode are a haptic pattern to be output, and the output timing of the first haptic pattern is after the second haptic pattern; if the first priority is lower
  • the method further includes: establishing a haptic pattern output list, and after the timer expires, inserting the determined haptic pattern to be output into the haptic pattern output list.
  • the method further includes: when the determined haptic pattern to be output is completed or canceled, deleting the haptic pattern from the haptic pattern output list.
  • Another aspect of the present application provides an apparatus for controlling haptic feedback, including: a first receiving unit configured to receive a first haptic trigger message, the first haptic trigger message including a first haptic signal indicating a first haptic mode A mode code and a first priority code indicating a first priority of the first haptic mode; a timer control unit, configured to start a timer in response to receiving the first haptic trigger message; a second receiving unit, receiving a second haptic trigger message before the timer expires, the second haptic trigger message including a second haptic mode code indicating a second haptic mode and a second priority indicating the second haptic mode
  • the second priority encoding the determination unit is used to determine the tactile mode to be output based on the first tactile mode and the first priority and the second tactile mode and the second priority; and an indication unit is used for After the timer expires, the haptic output device is instructed to output the determined haptic pattern to be output.
  • the determining unit is configured to, when the first haptic pattern is the same as the second haptic pattern: if the first priority is the same as the second priority, select the One of the first haptic mode and the second haptic mode and ignore the other; or if the first priority is different from the second priority, select the haptic mode with the higher priority and ignore the haptic mode with the lower priority.
  • Prioritized haptic patterns if the first priority is the same as the second priority, select the One of the first haptic mode and the second haptic mode and ignore the other.
  • the determining unit is configured to, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, determine the The first haptic mode is the haptic mode to be output, and ignoring the second haptic mode; if the first priority is lower than the second priority, determining that the second haptic mode is the haptic mode to be output , and ignore the first haptic pattern; or if the first priority is equal to the second priority, determine one of the first haptic pattern and the second haptic pattern as the haptic pattern to be output , and ignore the other of the first haptic pattern and the second haptic pattern.
  • the determining unit is configured to, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, and the second If the priority is higher than or equal to a predetermined threshold, it is determined that the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the output timing of the first haptic pattern is before the second haptic pattern ; if the first priority is higher than the second priority, and the second priority is lower than a predetermined threshold, then determine that the first haptic pattern is the haptic pattern to be output, and ignore the second a haptic mode; if the first priority is lower than the second priority, and the first priority is higher than or equal to a predetermined threshold, then determining the first haptic mode and the second haptic mode to be output haptic pattern, and the output timing of the first haptic pattern is after the second haptic pattern; if the first priority is lower than the second priority, and the first priority is lower than a
  • the device further includes an output list maintenance unit, configured to establish a tactile pattern output list, and after the timer expires, insert the determined tactile pattern to be output into the tactile pattern In the output list, and when the determined tactile pattern to be output is completed or canceled, the tactile pattern is deleted from the tactile pattern output list.
  • an output list maintenance unit configured to establish a tactile pattern output list, and after the timer expires, insert the determined tactile pattern to be output into the tactile pattern In the output list, and when the determined tactile pattern to be output is completed or canceled, the tactile pattern is deleted from the tactile pattern output list.
  • a mobile electronic device comprising: at least one tactile output device; and the above-mentioned device for controlling tactile feedback, configured to control the at least one tactile output device in response to a received tactile trigger message Output the corresponding haptic feedback.
  • Another aspect of the present application provides a method for controlling haptic feedback, including: based on a received haptic trigger message, determining a first haptic pattern to be output and a first priority of the first haptic pattern, the haptic trigger The message includes a haptic mode code indicating the first haptic mode and a priority code indicating the first priority; determining a second haptic mode being output by a haptic output device and a second priority of the second haptic mode; And based on the first haptic mode and first priority and the second haptic mode and second priority, determining a driving haptic mode for driving the haptic output device.
  • determining the driving haptic mode for driving the haptic output device includes, when the first haptic mode is the same as the second haptic mode, ignoring the first haptic mode and continuing to use the A second haptic mode drives the haptic output device; when the first haptic mode is different from the second haptic mode, if the first priority is higher than the second priority, suspending or terminating the The output of the second haptic mode, using the first haptic mode to drive the haptic output device, if the first priority is equal to or lower than the second priority, continue to use the second haptic mode to drive the tactile output device, and ignore the first tactile mode or use the first tactile mode to drive the tactile output device after the second tactile mode ends.
  • the method further includes: determining a third haptic pattern to be output based on the haptic trigger message and a third priority of the third haptic pattern, the third haptic pattern being different from the first haptic pattern.
  • a haptic mode, the third priority is equal to or lower than the first priority, and the output order of the third haptic mode is after the first haptic mode.
  • the step of determining the driving haptic pattern for driving the haptic output device is iteratively performed in their output order.
  • the method further includes: updating a drive haptic pattern list with the determined drive haptic pattern, the drive haptic pattern list including at most a predetermined number of drive haptic patterns for driving the haptic output device and each The priorities of the driving haptic modes, the maximum predetermined number of driving haptic modes for driving the haptic output device are different from each other and are arranged in order of priority from high to low.
  • a device for controlling haptic feedback including: a haptic pattern to be output determining unit, configured to determine a first haptic pattern to be output and the first haptic pattern based on a received haptic trigger message
  • the first priority of the mode, the haptic trigger message includes the tactile mode code indicating the first tactile mode and the priority code indicating the first priority
  • the current tactile mode determination unit is used to determine that the tactile output device is outputting a second haptic mode and a second priority of the second haptic mode
  • driving a haptic mode determination unit for based on the first haptic mode and first priority and the second haptic mode and second priority
  • the priority determines the driving haptic mode for driving the haptic output device.
  • the driving haptic mode determining unit is configured to ignore the first haptic mode and continue driving with the second haptic mode when the first haptic mode is the same as the second haptic mode.
  • the haptic output device when the first haptic mode is different from the second haptic mode, if the first priority is higher than the second priority, suspending or terminating the second haptic mode, driving the haptic output device using the first haptic mode, continuing to drive the haptic output device using the second haptic mode if the first priority is equal to or lower than the second priority, and The first haptic mode is ignored or the haptic output device is driven using the first haptic mode after the second haptic mode ends.
  • the haptic pattern to be output determining unit is further configured to determine a third haptic pattern to be output and a third priority of the third haptic pattern based on the haptic trigger message, the third haptic pattern Different from the first haptic pattern, the third priority is equal to or lower than the first priority, and an output order of the third haptic pattern is after the first haptic pattern.
  • the drive haptic mode determination unit is configured to iteratively perform the determination for driving the haptic output in the order of their output for the first haptic mode and the third haptic mode indicated by the haptic trigger message Steps to drive the haptic pattern of the device.
  • the device further includes: a driving haptic pattern list maintenance unit configured to update the driving haptic pattern list with the determined driving haptic pattern, the driving haptic pattern list includes a maximum predetermined number of driving haptic patterns for driving the The driving tactile modes of the tactile output device and the priority of each driving tactile mode, the maximum predetermined number of driving tactile modes for driving the tactile output device are different from each other and arranged in order of priority from high to low.
  • a driving haptic pattern list maintenance unit configured to update the driving haptic pattern list with the determined driving haptic pattern
  • the driving haptic pattern list includes a maximum predetermined number of driving haptic patterns for driving the The driving tactile modes of the tactile output device and the priority of each driving tactile mode, the maximum predetermined number of driving tactile modes for driving the tactile output device are different from each other and arranged in order of priority from high to low.
  • Another aspect of the present application provides a haptic effect control method, including: playing a first driving signal to output a first haptic effect; in response to a trigger event, pausing playing the first driving signal, and playing a second driving signal to output a second a haptic effect; and during playing of the second driving signal, performing virtual playing of the first driving signal.
  • the first driving signal is a real-time driving signal
  • the second driving signal is a driving signal pre-stored in a memory.
  • performing virtual playback of the first driving signal includes: reading the first driving signal from a FIFO register, and discarding the read first driving signal.
  • the haptic effect control method further includes: when the playing of the second driving signal is finished, starting from the current virtual playing position of the first driving signal, and continuing to play the first driving signal.
  • a mobile electronic device comprising: at least one tactile output device; and the above-mentioned device for controlling tactile feedback, configured to control the at least one tactile output device in response to a received tactile trigger message Output the corresponding haptic feedback.
  • Fig. 1 shows a schematic block diagram of an electronic device including a haptic effect control device.
  • Fig. 2 shows a flowchart of a method for controlling a haptic effect according to an embodiment of the present invention.
  • FIG. 3 shows a schematic diagram of encoding a haptic trigger message according to an embodiment of the present invention.
  • FIG. 4 shows a schematic diagram of receiving a haptic trigger message through a single pin according to an embodiment of the present invention.
  • Fig. 5 shows a schematic diagram of receiving a haptic trigger message through multiple pins according to another embodiment of the present invention.
  • Fig. 6 shows a schematic diagram of receiving a haptic trigger message under the control of a control signal according to another embodiment of the present invention.
  • Fig. 7 shows a schematic diagram of receiving a haptic trigger message through an I2C interface according to another embodiment of the present invention.
  • Fig. 8 shows a schematic diagram of receiving a haptic trigger message through an I2S interface according to another embodiment of the present invention.
  • FIG. 9A to 9D show schematic diagrams of receiving haptic trigger messages and real-time driving signals on a single pin, wherein FIG. 9A is a schematic diagram of a floating level, FIG. 9B is a schematic diagram of a device for decoding a floating level, and FIG. 9C and FIG. 9D is a schematic diagram of the structure of a message transmitted using a floating level.
  • Fig. 10 shows a schematic diagram of encoding a haptic trigger message according to another embodiment of the present invention.
  • Fig. 11 shows a schematic block diagram of a haptic effect control device according to an embodiment of the present invention.
  • Fig. 12 shows a flowchart of a haptic effect control method according to another embodiment of the present invention.
  • FIG. 13 shows a schematic diagram of processing a haptic trigger message based on a timer signal according to an embodiment of the present invention.
  • Fig. 14 shows a flowchart of a method for determining a tactile pattern to be output according to an embodiment of the present invention.
  • Fig. 15 shows a flowchart of a method for determining a tactile pattern to be output according to another embodiment of the present invention.
  • Fig. 16 shows a functional block diagram of an apparatus for controlling haptic effects according to an embodiment of the present invention.
  • Fig. 17 shows a flowchart of a haptic effect control method according to another embodiment of the present invention.
  • FIG. 18 shows a flowchart of a method for determining a driving haptic mode according to an embodiment of the present invention.
  • Fig. 19 shows a schematic diagram of multiple haptic modes being triggered simultaneously according to an embodiment of the present invention.
  • FIG. 20 shows a schematic diagram of a list of driving haptic patterns according to an embodiment of the present invention.
  • 21 , 22 and 23 illustrate schematic diagrams of updating a list of driving haptic patterns according to some embodiments of the present invention.
  • Fig. 24 shows a functional block diagram of an apparatus for controlling haptic effects according to an embodiment of the present invention.
  • Fig. 25 shows a flow chart of a haptic effect control method according to another embodiment of the present invention.
  • Fig. 26 shows a schematic diagram of a FIFO register.
  • Fig. 1 shows a schematic block diagram of an electronic device 100 including a haptic effect control device.
  • the electronic device 100 may be a portable mobile electronic device, such as a smart phone, a personal digital assistant, a personal terminal device, a tablet computer, a handheld game console, a wearable electronic device, an automotive electronic device, and the like.
  • an electronic device 100 may include one or more processors 101 .
  • the processor 101 may be a general-purpose processor or a special-purpose processor, examples of which include, for example, a central processing unit (CPU), an ARM processor, Apple's A-series and M-series processors, a microcontroller unit (MCU), a field-programmable gate array (FPGA), audio processor, graphics processing unit (GPU), coprocessor, etc. It can be understood that the processor 101 may be a single-core or multi-core processor.
  • the electronic device 100 may further include a touch screen 102, which has the functions of display output and touch input.
  • the touch screen 102 may be a Liquid Crystal Display (LCD), an Active Matrix Organic Light Emitting Diode (AMOLED) display, etc., and is integrated with a capacitive or resistive touch sensing function.
  • LCD Liquid Crystal Display
  • AMOLED Active Matrix Organic Light Emitting Diode
  • Electronic device 100 may have one or more memories 103, which may include non-volatile and volatile memory.
  • non-volatile memory include flash memory, SD card, ROM, EEPROM, etc., which can be used to store program instructions executable by processor 101, user data, etc.
  • volatile memory include RAM, SRAM, DRAM, etc., which are also called memory, and are used to store instruction data for execution by the processor 101 or as a data cache when the electronic device 100 is running.
  • the electronic device 100 may also include a speaker 104 for playing audio and one or more sensors 105.
  • sensors 105 include, for example, a light sensor, a distance sensor, a speed sensor, a gravity sensor, a magnetic sensor, a gyroscope, and the like.
  • the electronic device 100 may further include a tactile effect control device 106 and a tactile output device 107 to provide a tactile effect output, which may also be called a tactile feedback.
  • the tactile effect includes but is not limited to vibration, and may also include, for example, touch texture simulation, deformation, pressure, and the like.
  • touch texture simulation can simulate surfaces with different roughness in response to driving signals
  • ultrasonic waves can simulate radiation pressure, and so on.
  • the tactile output device 107 may be various devices capable of generating tactile effects, examples of which may include eccentric rotor motors (ERMs), linear resonant motors (LRAs), piezoelectric motors, electrostatic actuators, ultrasonic transducers, memory Alloy etc.
  • the tactile effect control device 106 may be, for example, one or more driver chips mounted on a printed circuit board, which is used to control and drive the tactile output device 107 to output desired tactile effects, which will be further described in detail below.
  • the aforementioned devices may be connected to the bus system 108 to communicate with each other.
  • the processor 101 can execute programs stored in the memory 103, such as operating system programs, applet programs (APP), video programs, audio programs, etc., and control operations of various devices.
  • the processor 101 may control the touch screen 102 to play video, the speaker 104 to play audio, and detect inputs from the touch screen 102 and the sensor 105 .
  • the processor 101 may instruct the haptic effect control device 106 to drive the haptic output device 107 to output corresponding haptic effects.
  • the processor 101 when the processor 101 detects that the user presses a virtual key or performs other gesture operations through the touch screen 102, it may instruct the tactile effect control device 106 to generate various corresponding tactile effects.
  • the processor 101 when the processor 101 detects the sensing input of the sensor 105, for example, when the magnetic sensor detects that the user opens the device case (such as a mobile phone case) of the electronic device 100, it may instruct the tactile effect control device 106 to generate various corresponding tactile effect.
  • the processor 101 detects various other events, such as playing audio and/or video, receiving a phone call, and an alarm, it may also instruct the haptic effect control device 106 to generate various corresponding haptic effects .
  • a vibration effect with corresponding rhythm and amplitude can be generated; or when the movie or game video includes vibration effect data associated with a specific picture such as explosion, impact, vibration, etc. 101 may also instruct the haptic effect control device 106 to generate a corresponding haptic effect based on the data.
  • An exemplary embodiment of controlling and driving the tactile output device 107 to generate various tactile effects through the tactile effect control device 106 will be described in detail below, and for simplicity and convenience of description, vibration is used as an example of the tactile effect, but it should be understood that this The principles of the invention can be applied to trigger various haptic effects in various scenarios or occasions, without being limited to the embodiments described here.
  • FIG. 2 shows a flow chart of a haptic effect control method 200 according to an embodiment of the present invention, which may be executed, for example, by the haptic effect control apparatus 106 in the electronic device 100 shown in FIG. 1 .
  • the method 200 may include step S210 of receiving a haptic trigger message.
  • the processor 101 when it detects a predetermined event associated with the haptic effect, it may send a haptic trigger message to the haptic effect control device 106 . It can be understood that the processor 101 may trigger a haptic effect when various predetermined events are detected, and various events may correspond to different or the same haptic effects. Therefore, in step S210, the received haptic trigger message may include a haptic mode code, which may indicate one of various predetermined haptic modes.
  • Fig. 3 shows a schematic diagram of tactile mode coding in a tactile trigger message according to an embodiment of the present invention.
  • the tactile pattern code may be N-bit data, where N is an integer greater than 1.
  • a haptic mode code can have 2N values, and a value of zero can also indicate 2N -1 haptic modes if one considers no haptic effect.
  • a 3-bit haptic pattern code can indicate 7 haptic patterns.
  • Various tactile modes can be flexibly defined for various events; when the processor 101 detects a specific event, it can encode the corresponding tactile mode into a tactile trigger message and send it to the tactile effect control device 106 .
  • the processor 101 when the processor 101 detects that the user presses a key on the virtual keyboard to perform input, it can generate a tactile trigger message whose tactile mode code is 001; Or when there are three virtual buttons on the home page (home), a tactile trigger message with a tactile mode coded as 010 can be generated; when the set alarm clock is up, a tactile trigger message with a tactile mode coded as 011 can be generated; when playing games or watching
  • a haptic trigger message whose haptic mode code is 100 can be generated; when the haptic feedback is triggered when listening to music, a haptic trigger message whose haptic mode code is 101 can be generated; when a short message is received, a haptic trigger message can be generated
  • a haptic trigger message with mode code 110; a haptic trigger message with haptic mode code 111 may be generated when a voice call is received; and so on.
  • the haptic trigger message may also include a header portion before the haptic pattern encoding, so that the haptic effect control device 106 may identify the message as a haptic trigger message based on the header.
  • Fig. 4 shows a schematic diagram of receiving a haptic trigger message according to an embodiment of the present invention.
  • the haptic trigger message including the haptic pattern code may be received on one data pin PIN1 of the haptic effect control device 106 , such as a driver chip.
  • the haptic effect control device 106 can perform signal sampling on the data pin PIN1 to read data thereon.
  • the signal received on the data pin PIN1 may be a digital signal or an analog signal.
  • the haptic effect control device 106 may include an analog-to-digital converter (ADC) to convert the received analog signal into a digital signal.
  • ADC analog-to-digital converter
  • the haptic trigger message can be identified by the header and valid sampling data can be extracted therefrom.
  • the haptic trigger message received on the pin PIN1 can be processed immediately, such as decoded, and can also be stored, such as in a register, for subsequent processing.
  • Fig. 5 shows a schematic diagram of receiving a haptic trigger message according to another embodiment of the present invention.
  • the haptic trigger message including the haptic pattern code can be received on multiple data pins of the haptic effect control device 106 such as a driver chip.
  • FIG. 5 shows two data receiving pins PIN1 and PIN2 .
  • signal sampling may be performed on the data receiving pins PIN1 and PIN2 based on the system clock signal SCL to read data received thereon. It can be understood that these pins can be sampled once or multiple times.
  • the present invention saves pins for triggering haptic effects compared to traditional hardware pin triggering modes, because encoding is used to indicate different haptic modes number.
  • Fig. 6 shows a schematic diagram of receiving a haptic trigger message according to another embodiment of the present invention.
  • the control pin Ctrl can also be used to control the sampling of the data receiving pin PIN1 . That is, only when the control pin Ctrl is activated, one or more data receiving pins are sampled, which can avoid a large number of invalid samples and ensure the validity of the sampled data.
  • the control pin Ctrl can be activated with a high level, and sampling starts at the second rising edge of the system clock signal after the rising edge signal on the pin Ctrl is detected, and the voltage on the pin Ctrl Stop sampling when level goes low.
  • the activation duration of the control pin Ctrl may be equal to or greater than the effective data transmission duration of the data pin PIN1. At this time, the data from the most significant bit MSB to the least significant bit 1 in the sampling data can be regarded as valid data, and the remaining data can be regarded as invalid data and discarded. It should be understood that the control pin Ctrl may also be activated in other ways, such as low-level activation, pulse activation, and the like.
  • Fig. 7 shows a schematic diagram of receiving a haptic trigger message according to another embodiment of the present invention.
  • the haptic trigger message may be received on an I2C (inter-integrated circuit) interface.
  • the I2C interface is an existing bidirectional interface
  • FIG. 7 shows a signal timing diagram for receiving a haptic trigger message using it.
  • the system clock signal SCL is at a high level
  • the level of the data pin SDA changes, for example, from a high level to a low level, and data transmission starts.
  • the data pulse width on the data pin SDA should be greater than the pulse width of the system clock signal, that is, the level change on the data pin SDA only occurs during the low level period of the system clock signal.
  • 8-bit data including the address of the slave device (slave device) can be transmitted first, that is, the address of the tactile effect control device 106 such as the driver chip, followed by the read/write flag, as shown here is a write flag represented by a low level, indicating that the data transmission is a write operation from a master device (master device) such as the processor 101 to a slave device such as the haptic effect control device 106.
  • the slave device can assert the ACK signal to confirm the correct receipt of the transfer data, then the master device can continue to send the 8-bit register address, and the slave device can assert the ACK to confirm the correct receipt of the register address.
  • the slave can also assert an ACK to indicate that the data was received correctly.
  • 8-bit data can be sent multiple times, and it will continue to be written to the next address of the previous register address.
  • the system clock signal is at a high level, the level of the data pin SDA changes, indicating that the data transmission ends. In the operation shown in FIG. 7 , the received haptic trigger message is stored into the specified register address.
  • the I2C interface in addition to receiving haptic trigger messages, can also be reused to receive driving signals for driving the haptic effect output device 107 , which will be described in detail later. In this way, the number of pins of the tactile effect control device 106 can be further saved, the structure can be simplified, packaging and installation can be facilitated, and cost can be saved.
  • the haptic trigger message may also be received on an I2S (inter-IC sound) interface, and FIG. 8 shows such an embodiment.
  • the I2S interface is an existing interface that was originally used to transmit audio data.
  • the I2S interface includes a channel control pin LRCK on which a channel clock signal can be received.
  • FIG. 8 shows that a high level indicates the left channel, and a low level indicates the right channel. Based on the channel control signal, data acquisition can be performed on the data pin SDA.
  • the second rising edge of the system clock signal after the rising edge of the channel control signal starts to collect the data of the left channel, including data from the highest bit MSB to the lowest bit 1; after the second falling edge of the channel control signal
  • the rising edge of the system clock signal starts to collect the data of the left channel, including the data from the highest bit MSB to the lowest bit 1.
  • it may be transmitted using only the left channel, only the right channel, or both the left and right channels.
  • the I2S interface in addition to receiving haptic trigger messages, can also be reused to receive driving signals for driving the haptic effect output device 107, which will be described in detail later. In this way, the number of pins of the tactile effect control device 106 can be further saved, the structure can be simplified, packaging and installation can be facilitated, and cost can be saved.
  • FIGS. 4-8 Various embodiments of receiving a haptic trigger message are described above with reference to FIGS. 4-8 . It can be understood that the present invention can use a small number of pins (at least one pin) to flexibly indicate various tactile modes by adopting tactile mode coding, so that various tactile modes can be expanded without increasing the complexity of hardware design. Effect flexibility. For example, various haptic patterns can be defined and applied for various events, thereby improving the user experience.
  • the received haptic trigger message may be decoded to determine the haptic mode indicated by the haptic mode code included therein.
  • decoding may include extracting a predetermined location and number of bits in the haptic trigger message as a haptic pattern code.
  • a haptic effect corresponding to the haptic pattern may be determined.
  • the tactile effect can be represented by a drive signal for driving the tactile output device 107 such as a linear motor, and the drive signal can be, for example, a triangular wave signal, a sawtooth wave signal, a sine wave signal, a square wave signal, an irregular wave signal, or any combination of the above signals,
  • the frequency and amplitude of these signals are modulated so that when applied to the haptic output device 107 a desired haptic effect can be produced.
  • a plurality of driving signals can be pre-stored in a predetermined register address, and a real-time driving signal received from the outside can also be stored in a predetermined register address.
  • a mapping relationship between the tactile pattern code and the register address of the driving signal can be established, and this mapping relationship can be stored in, for example, a look-up table. Therefore, after the haptic mode code is decoded in step S220, the haptic mode code can be used to search a lookup table to determine the register address of the corresponding driving signal, thereby determining the haptic effect corresponding to the haptic mode.
  • the haptic effect control device 106 may receive a real-time driving signal for generating a desired haptic effect from the outside. For example, when a user is playing a game or watching a movie, a driving signal corresponding to the audio or video of the game or movie may be provided to the haptic effect control device 106 in real time to generate a haptic effect that matches the audio or video. As mentioned above, the haptic effect control device 106 can receive the real-time driving signal through the I2C or I2S interface, and the received real-time driving signal can be stored in the predetermined address of the register.
  • the received real-time drive signal can be stored in a first-in-first-out (FIFO) register, and the tactile mode code corresponding to the real-time drive signal and the read address of the first-in-first-out (FIFO) register can be established mapping relationship between them.
  • the FIFO register address corresponding to the real-time driving signal can be determined according to the mapping relationship, so that the real-time driving signal temporarily stored in the address is used to drive the tactile output device 107 in subsequent steps To produce haptic effect output.
  • the FIFO register can operate in an asynchronous mode, that is, the writing end and the reading end of the FIFO register can be associated with different clock domains, so that the data reading frequency can be different from the data writing frequency. Therefore, the FIFO register is especially suitable for temporarily storing the real-time driving signal, so that the reading frequency of the real-time driving signal is not limited by the writing frequency, so that a more flexible data reading clock can be applied to provide richer tactile effect output.
  • both haptic trigger messages and real-time drive signals can be received on a single interface, such as an I2C or I2S interface.
  • the haptic trigger message and the real-time driving signal can also be received on a single pin to further reduce the pin count of the haptic effect control device 106 , such an embodiment is shown in FIGS. 9A to 9D .
  • a floating level can be received on a single pin, and the level value of the floating level can float within a certain range.
  • the floating level can be floating within a first floating range and a second floating range, and the first floating range is different from the second floating range.
  • the signal level provided by the system is in the range of 0 volts to 5 volts, for example 0 volts can be used as the idle level, and the range of 4 volts to 5 volts can be used as the first floating range, which will be greater than 0 Volts and less than 4 volts as the second floating range.
  • the floating level may be detected and decoded by the level detection unit in the haptic effect control device 106 .
  • the level detection unit may be an analog-to-digital converter (ADC) that converts a floating-level sampling value into a digital code of a predetermined number of bits.
  • ADC analog-to-digital converter
  • an 8-bit ADC can convert the level value into an 8-bit digital code, and the coded value depends on the sampling value of the floating level.
  • a floating level within a first floating range may be used to represent a header portion of a signal received on a pin
  • a floating level within a second floating range may be used to represent a payload portion of a signal. That is to say, when the coded value produced by the level detection unit corresponds to the first floating range, the coded value is identified as header code; when the coded value produced by the level detection unit corresponds to the second floating range, the coded value The value identifies the encoded payload of the signal.
  • the header portion may be used to indicate the content of the signal payload portion, eg, whether the signal payload portion includes haptic pattern encoding or real-time driving signal encoding. In this way, both haptic trigger messages and real-time drive signals can be received on a single pin.
  • FIG. 9C shows a schematic diagram of signals received on a single pin of the haptic effect control device 106 .
  • an idle level may be received on the pin, followed by a level value within a first floating range, which represents the header portion.
  • an encoding level representing the signal payload, which is within a second floating range different from the first floating range, so that the haptic effect control device 106 can identify it as a signal payload rather than a header.
  • the level detection unit in the haptic effect control device 106 can sample the encoding level once or multiple times in each time window, and when multiple sampling is performed, any one of the samples or the multiple sampling can be The average value is output as a sampled value within this time window.
  • the level sampling of the header part may also be performed within a predetermined time window.
  • the header part can also be omitted.
  • haptic trigger messages received on a single pin of haptic effect control device 106 may be decoded directly.
  • the haptic mode code included in the haptic trigger message indicates the real-time driving signal
  • the real-time driving signal may be transmitted within a predetermined period after the haptic trigger message.
  • FIG. 9D shows the message structure when the header part is omitted. Other aspects of the message structure are similar to the message shown in FIG. 9C , and will not be described again here.
  • both the haptic trigger message and the real-time drive signal can be received on a single pin of the haptic effect control device 106, thus further reducing the pin count of the haptic effect control device 106. number. Furthermore, since each sample value of the floating level can be decoded into a multi-bit code, the message code can be transmitted with higher efficiency.
  • the haptic output device 107 may be driven to output the determined haptic effect.
  • the drive signal waveforms have been stored in one or more register positions, at this time, in step S240, the drive signal data in these register positions can be directly used to drive the tactile output device 107 to output the desired tactile effect.
  • some video games, application programs, or audio-visual works may include custom haptic effect data (ie, driving signals), and at this time, the haptic effect data can be provided to the haptic effect control device 106, and the haptic effect control device 106 can use the haptic effect control device 106.
  • the effect data drives the haptic output device 107 to output the desired haptic effect in real time.
  • the haptic effect data can be continuously written into the first-in-first-out (FIFO) register through the I2C interface, and the signal output from the FIFO register is used to drive the haptic output device 107, thereby realizing the real-time output of the haptic effect .
  • FIFO first-in-first-out
  • the audio signal can be provided to the haptic effect control device 106 through the I2S interface.
  • the tactile effect control device 106 can use the audio signal to drive the tactile output device 107 to generate a tactile effect corresponding to the audio, or, the tactile effect control device 106 can first process the audio data with an algorithm, and extract the audio data according to characteristics such as frequency and amplitude. specific audio component, such as a drum signal, and then use the extracted signal to drive the haptic output device 107 to generate a haptic effect corresponding to the specific audio component, such as a drum. Likewise, the haptic effect control device 106 may also store the received audio signal for real-time driving of the haptic output device 107 in the FIFO register.
  • the I2C interface and/or I2S interface for receiving real-time haptic effect data can reuse the I2C interface and/or I2S interface for receiving haptic trigger messages described with respect to FIGS. 7 and 8 without requiring a separate Therefore, the number of pins of the tactile effect control device 106 can be further saved, its hardware structure can be simplified, and packaging and installation can be facilitated.
  • the process of triggering and outputting haptic effects using coding is described above. It can be understood that with the solution of the present invention, various tactile modes and effects defined for various events can be realized by using a small number of pins, thereby improving user experience. However, the inventors also realized that with the sharp increase in the number of tactile modes, overlapping and conflicts between multiple modes may occur. For example, the electronic device 100 may trigger multiple haptic modes at the same time, so how to correctly and orderly output the haptic effects corresponding to these haptic modes also becomes a problem. To solve this problem, an embodiment of the present invention further proposes a solution. As shown in FIG. 9 , the tactile trigger message received in step S210 may include not only the tactile mode code, but also the priority associated with the tactile mode.
  • P can be a positive integer greater than or equal to 1.
  • Different events may trigger the same or different haptic pattern codes, and the same haptic pattern code may have different priority levels because it is triggered by different events.
  • the processor of the electronic device 100 detects a predetermined event, it can determine a corresponding tactile pattern, and flexibly assign a corresponding priority to the pattern, and the priority can reflect the urgency and/or importance of the event.
  • the transmission of the haptic trigger message including the haptic mode code and the priority code can be as described above with reference to FIGS. 4-8 , and the description will not be repeated here.
  • the priority can be decoded in step S220 shown in FIG. 2 .
  • the method 200 may further include determining whether to output and how to output a haptic effect related to the priority based on the priority. For example, when a haptic effect with low priority overlaps with a haptic effect with high priority in time, the haptic effect with low priority can be ignored and only the haptic effect with high priority can be output, or the priority can be changed from high to low The order in which these haptic effects are output sequentially. Therefore, the present invention can more flexibly control the output of various haptic effects by assigning priorities to each haptic mode, and avoid conflict and interference between them.
  • the application of priority coding will be described in more detail in the following embodiments.
  • Fig. 10 shows a schematic block diagram of a haptic effect control device 300 according to an embodiment of the present invention. It can be understood that the haptic effect control device 300 can be used as the haptic effect control device 106 in the electronic device 100 described above, and its function and operation have been described in detail above with reference to FIGS. 1-9 , so only a brief description is given below.
  • the haptic effect control device 300 may include an input unit 301 , a memory 302 , a decoding unit 303 , a haptic effect determining unit 304 and a driving unit 305 .
  • the input unit 301 may include pins or interfaces for receiving haptic trigger messages, such as I2C and/or I2S interfaces.
  • the received haptic trigger message may include a haptic mode code and an optional priority code, the haptic mode code indicates one of various predetermined haptic modes, and the priority code indicates the priority of the haptic mode.
  • the memory 302 can be used to store the haptic mode code and priority code in the received haptic trigger message, and can also be used to store other data, including but not limited to data related to the haptic effect being output and to be output such as haptic mode code, Priority encoding, driving signal data, and the mapping relationship between haptic modes and haptic effects, etc. Memory 302 may also be used to store any other data related to haptic feedback.
  • the decoding unit 303 can decode the received haptic trigger message to determine the encoded haptic pattern and its corresponding priority.
  • the haptic effect determining unit 304 may determine a haptic effect corresponding to the decoded determined haptic pattern. In some embodiments, when multiple haptic patterns overlap or conflict in time, the haptic effect determining unit 304 may also determine whether to output the haptic effect of the haptic pattern based on the priority of each haptic pattern. For example, the haptic effect determining unit 304 may determine to output a high-priority haptic pattern while ignoring a low-priority haptic pattern.
  • the driving unit 305 may drive the haptic output device according to the determined haptic effect.
  • the tactile effect is represented by the corresponding driving signal waveform, which can be the driving signal waveform pre-stored in the memory, or the driving signal waveform received in real time from the outside.
  • the driving signal waveform is used to drive one or more tactile output devices, so as to achieve a desired tactile effect.
  • pins or interfaces of the receiving unit 301 for receiving haptic trigger messages such as I2C and/or I2S interfaces, can be reused to receive driving signal waveforms representing haptic effects.
  • FIG. 11 shows a flowchart of a haptic effect control method 400 according to another embodiment of the present invention. It can be understood that the method 400 shown in FIG. 11 may be executed, for example, by the haptic effect control apparatus 106 in the electronic device 100 shown in FIG. 1 .
  • the haptic effect control device 106 may receive a first haptic trigger message.
  • a haptic trigger message may be generated and sent to the haptic effect control device 106 .
  • the haptic trigger message generated by the processor 101 may include a header for identifying the message and a haptic mode code for indicating one of a plurality of predetermined haptic modes, wherein the haptic mode corresponds to a specific haptic effect, That is, a specific driving signal for driving the tactile output device 107 to generate a tactile effect.
  • the haptic trigger message may further include a priority code, which indicates the priority of the corresponding haptic mode, that is, the priority of outputting the haptic effect corresponding to the haptic mode.
  • the first haptic trigger message received by the haptic effect control device 106 may include a first haptic mode code and a first priority code.
  • the haptic effect control device 106 may start the timer T at step S420. It can be understood that when the first haptic trigger message is received in step S410, the timer T has not been started yet. If the timer T has been started when the first haptic trigger message is received, that is to say, the haptic trigger message is received during the running of the timer T, then the processing of the haptic trigger message can be as follows regarding the receipt of the second haptic trigger message as described.
  • the timer T can have a preset duration, such as 0.1 second, 0.5 second, 1 second or 2 seconds, etc., which can be set according to specific applications. As can be understood from the detailed description below, multiple haptic trigger messages received during the running of the timer T (ie, before expiration) can be regarded as simultaneously triggered haptic trigger messages.
  • the haptic effect control device 106 receives a second haptic trigger message, which may include a second haptic mode code indicating the second haptic mode and an indication A second priority encoding for the priority of the second haptic mode. It can be understood that before the timer T expires, the haptic effect control device 106 may receive a plurality of haptic trigger messages, for example, a plurality of haptic trigger messages generated by the processor 101 in response to various events during this period, these haptic Both trigger messages may be processed according to the steps described herein for the second haptic trigger message.
  • Fig. 12 shows a schematic diagram of receiving a haptic trigger message during the running of the timer.
  • the first haptic trigger message is received at time T1 , and a timer T is started in response to the first haptic trigger message, which has a predetermined duration T timer .
  • T2 and T3 T2-T1 ⁇ T timer , T3-T1 ⁇ T timer ) before the timer T expires, the second haptic trigger message and the third haptic trigger message are respectively received.
  • T4 T4-T1>T timer
  • a fourth haptic trigger message is received at time T4 (T4-T1>T timer ) after the timer T expires.
  • the first, second and third haptic trigger messages are regarded as simultaneously received haptic trigger messages, and the operations described here are performed; and when the fourth haptic trigger message is received, it restarts the timer T , that is, the processing of the fourth haptic trigger message is similar to the processing described herein for the first haptic trigger message.
  • the processing of the fourth haptic trigger message is similar to the processing described herein for the first haptic trigger message.
  • the third haptic trigger message received during the running of the timer T even more haptic trigger messages Messages can also undergo the processing steps described here, which are within the scope of the invention as defined in the claims.
  • step S440 based on the first haptic pattern and the first priority received in step S410 and the second haptic pattern and the second priority received in step S430, it may be determined to be output Tactile mode.
  • the first haptic pattern and the second haptic pattern may be the same, for example, different events correspond to the same haptic effect output, or the user executes the same event multiple times in a short time to trigger multiple haptic effect outputs.
  • the first and second haptic patterns identical to each other are simultaneously triggered within a short time and correspond to the output of the same haptic effect, their corresponding haptic effects may be output only once.
  • a haptic mode with a high priority may be selected, and a haptic mode with a low priority may be ignored.
  • the first priority of the first haptic mode is also the same as the second priority of the second haptic mode, either one of the first haptic mode and the second haptic mode may be selected to be output while ignoring the other, because both are essentially are exactly the same.
  • the first haptic pattern and the second haptic pattern may not be the same.
  • it may be determined which haptic pattern or modes to output based on the first priority and the second priority and FIG. 13 shows an example of such a process 500 .
  • step 510 it may be determined by comparison whether the first priority is higher than, equal to, or lower than the second priority.
  • step 520 determines the first haptic pattern as the haptic pattern to be output, and ignore the second haptic pattern; if the first priority is lower than the second priority level, execute step 530, determine the second haptic pattern as the haptic pattern to be output, and ignore the first haptic pattern; if the first priority is equal to the second priority, execute step 540, determine the first haptic pattern and the second One of the haptic patterns is the haptic pattern to be output, and the other is ignored.
  • step 540 for example, the haptic mode triggered first may be selected, or the haptic mode triggered later may be selected, which may be determined according to specific applications.
  • a predetermined priority threshold may also be introduced to determine the tactile pattern to be output, and FIG. 14 shows an example of such a process 600 . Referring to FIG. 14, in step 610, it may be determined by comparison whether the first priority is higher than, equal to, or lower than the second priority.
  • step 620a If the first priority is higher than the second priority, then in step 620a, continue to compare whether the second priority is greater than or equal to a predetermined threshold. If the second priority is greater than or equal to the predetermined threshold, it indicates that both the first haptic pattern and the second haptic pattern are important, so in step 630, it can be determined that both the first haptic pattern and the second haptic pattern are to be output haptic mode, and determine the output timing of the first haptic mode and the second haptic mode in order of priority, that is, the output timing of the first haptic mode is before the second haptic mode.
  • the haptic effect corresponding to the alarm clock expiration event can be output to remind the user that the alarm clock is due without causing the user to miss important events .
  • the second priority is lower than the predetermined threshold, it indicates that the second haptic mode is not important, so in step 640, the first haptic mode with higher priority may be determined as the haptic mode to be output, and the second haptic mode is ignored .
  • step 620b continue to compare whether the first priority is greater than or equal to a predetermined threshold. If the first priority is greater than or equal to the predetermined threshold, it indicates that both the first haptic pattern and the second haptic pattern are important, so in step 650, it can be determined that both the first haptic pattern and the second haptic pattern are to be output haptic mode, and determine the output timing of the first haptic mode and the second haptic mode in order of priority, that is, the output timing of the first haptic mode is after the second haptic mode. If the first priority is lower than the predetermined threshold, it indicates that the first haptic mode is not important, so in step 660, it may be determined that the second haptic mode is the haptic mode to be output, and the first haptic mode is ignored.
  • step 620c continue to compare whether the first/second priority is greater than or equal to a predetermined threshold. If both are greater than or equal to the predetermined threshold, then in step 670 it can be determined that both the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the first haptic pattern and the second haptic pattern can be determined in order of, for example, trigger time.
  • the output timing of the modes that is, the output timing of the first haptic mode is before the second haptic mode.
  • either one of the first haptic pattern and the second haptic pattern may be determined to be the haptic pattern to be output, and the other one may be ignored, Alternatively, both the first haptic pattern and the second haptic pattern can be ignored.
  • step S450 after the timer T expires, the haptic output device 107 (see FIG. 1 ) may be instructed to output the determined haptic pattern to be output.
  • the haptic mode corresponds to the drive signal stored in a predetermined register address, which can be used to drive the haptic output device 107 to produce a desired haptic effect output.
  • the haptic effect control device 106 can determine the driving signal corresponding to the haptic pattern to be output according to the mapping relationship between the haptic pattern code and the register address storing the driving signal, and use it to drive the haptic output device 107 to generate Desired haptic effect output.
  • the haptic effect control device 106 can also create a haptic pattern output list, and insert the determined haptic pattern codes to be output into the list in time sequence, so that the corresponding haptic effects can be output in sequence.
  • the list may include a haptic pattern currently being output, and one or more haptic patterns to be outputted in sequence.
  • the haptic pattern may be deleted from the haptic pattern output list, and the next haptic pattern to be output is executed until all the haptic patterns are output.
  • the tactile pattern output list it will be further described in detail in the following embodiments.
  • FIG. 15 shows a schematic functional block diagram of a haptic effect control device 700 according to an embodiment of the present invention. It can be understood that each functional module in the tactile effect control device 700 shown in FIG. part. The relevant functions and operations of each functional module in the haptic effect control device 700 shown in FIG. 15 have been described in detail above with reference to FIGS. 11-14 , so only a brief description will be given below.
  • the haptic effect control device 700 may include a first receiving unit 710 for receiving a first haptic trigger message, the first haptic trigger message including a first haptic mode code indicating a first haptic mode and indicating the first haptic mode code.
  • a first priority code for the first priority of a haptic mode.
  • the haptic effect control apparatus 700 may further include a timer control unit 720, configured to start a timer in response to receiving the first haptic trigger message.
  • the haptic effect control device 700 may further include a second receiving unit 730, configured to receive a second haptic trigger message before the timer expires, the second haptic trigger message including a second haptic pattern indicating the second haptic pattern A code and a second priority code indicating a second priority of the second haptic mode.
  • the haptic effect control apparatus 700 may further include a determination unit 740 configured to determine a haptic pattern to be output based on the first haptic pattern and first priority and the second haptic pattern and second priority. For example, when the first haptic mode is the same as the second haptic mode, if the first priority is the same as the second priority, select the first haptic mode and the second haptic mode one and ignore the other; if the first priority is different from the second priority, the haptic mode with the higher priority is selected and the haptic mode with the lower priority is ignored.
  • a determination unit 740 configured to determine a haptic pattern to be output based on the first haptic pattern and first priority and the second haptic pattern and second priority. For example, when the first haptic mode is the same as the second haptic mode, if the first priority is the same as the second priority, select the first haptic mode and the second haptic mode one and ignore the other; if the first priority is different from the second priority, the hap
  • the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, determine that the first haptic pattern is the haptic pattern to be output, and ignore the second haptic pattern; if the first priority is lower than the second priority, then determining the second haptic pattern as the haptic pattern to be output and ignoring the first haptic pattern; or if the If the first priority is equal to the second priority, then it is determined that one of the first haptic pattern and the second haptic pattern is the haptic pattern to be output, and the first haptic pattern and the second haptic pattern are ignored. Another of two haptic patterns.
  • the first haptic pattern when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, and the second priority is higher than or equal to a predetermined threshold, Then determine that the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the output timing of the first haptic pattern is before the second haptic pattern; if the first priority is higher than the second priority, and the second priority is lower than a predetermined threshold, then determine that the first haptic pattern is the haptic pattern to be output, and ignore the second haptic pattern; if the first priority lower than the second priority, and the first priority is higher than or equal to a predetermined threshold, then it is determined that the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the first an output of the haptic pattern is timed after the second haptic pattern; determining the second haptic pattern if the first priority is lower than the second priority and the first priority is lower than a
  • the haptic effect control apparatus 700 may further include an instructing unit 750 configured to instruct the haptic output device to output the determined haptic pattern to be output after the timer expires.
  • the haptic effect control device 700 may further include an output list maintenance unit 760, configured to establish a haptic pattern output list, and insert the determined haptic pattern to be output into the haptic pattern after the timer expires.
  • an output list maintenance unit 760 configured to establish a haptic pattern output list, and insert the determined haptic pattern to be output into the haptic pattern after the timer expires.
  • the haptic pattern output list and when the determined haptic pattern to be output is completed or canceled, the haptic pattern is deleted from the haptic pattern output list.
  • the method 400 described above with respect to FIG. 11 describes the processing of multiple haptic trigger messages triggered at the same time, which can determine the haptic pattern to be output from the multiple haptic trigger messages triggered at the same time or within a short period of time, and use the corresponding driving Signals are used to drive the tactile output device 107 to generate corresponding tactile effects.
  • the haptic effect control means 106 determines the haptic pattern to be output, the haptic output device 107 may be outputting the previously determined haptic effect.
  • FIG. 16 shows a flow chart of a haptic effect control method 800 according to another embodiment of the present invention. It can be understood that the method 800 shown in FIG. 16 may be executed, for example, by the haptic effect control apparatus 106 in the electronic device 100 shown in FIG. 1 .
  • the haptic effect control device 106 may determine the first haptic pattern to be output and its corresponding first priority based on the received haptic trigger message.
  • the processor 101 detects a predetermined event associated with a haptic effect, it can generate and send a haptic trigger message to the haptic effect control device 106, and the haptic effect control device 106 can determine based on the received haptic trigger message A first haptic mode and its corresponding first priority.
  • multiple predetermined events may correspond to different or the same haptic effects.
  • the processor 101 may generate a haptic trigger message corresponding to the predetermined events to trigger the corresponding haptic effect output. It should also be understood that when different events trigger the same haptic effect, they may correspond to different priorities, and the priority indicates the importance of outputting the haptic effect, which generally reflects the predetermined event detected by the processor 101 importance.
  • the haptic effect control device 106 may determine the second haptic pattern currently being output by the haptic output device 107 and its corresponding second priority. That is to say, the haptic effect control device 106 determines that when the haptic output device 107 is outputting the second haptic pattern, it has received a trigger message to output the first haptic pattern, so that the first and second haptic patterns conflict with each other in terms of output time Or conflict. It should be understood that throughout the present application, ordinal numerals such as “first” and “second” are only used to distinguish different objects, and do not impose any limitation on the described objects.
  • the haptic effect control device 106 may, based on the currently outputting second haptic pattern and its corresponding second priority, and the newly triggered first haptic pattern to be output and its corresponding first priority,
  • the driving tactile mode for driving the tactile output device 107 is determined, so as to solve the problem of mutual conflict or conflict between multiple tactile modes.
  • the haptic effect control device 106 may continue to output the second haptic pattern while ignoring the newly triggered first haptic pattern, or may continue to output the second haptic pattern in the second haptic pattern.
  • the haptic effect control device 106 may select a desired haptic mode for output by the haptic output device 107 based on the first and second haptic modes and the first and second priorities.
  • FIG. 17 shows a flowchart of a method 900 for determining a driving haptic mode based on first and second haptic modes and first and second priorities according to an embodiment.
  • the haptic effect control device 106 may first determine whether the first haptic pattern and the second haptic pattern are the same at step 910 .
  • the first haptic pattern and the second haptic pattern may be the same, for example, they are haptic patterns triggered in response to the same type of events occurring at different times in succession, or the same haptic patterns triggered in response to different types of events , their priorities (first and second priorities) can be different from each other or the same.
  • the haptic output device 107 may continue to output the haptic pattern currently being output, while ignoring the newly triggered same haptic pattern. Therefore, in step 920 , the haptic effect control device 106 may ignore the first haptic mode, and determine to continue to use the second haptic mode as the driving haptic mode for driving the haptic output device 107 .
  • the first haptic pattern and the second haptic pattern may be different from each other, for example, the processor 101 triggers different haptic patterns in response to different events.
  • the haptic effect control means 106 may determine the driving haptic mode for driving the haptic output device 107 based on the priority.
  • the haptic effect control device 106 may compare whether the first priority of the first haptic pattern is greater than the second priority of the second haptic pattern.
  • the haptic effect control device 106 can determine to terminate the haptic output
  • the device 107 is outputting the second tactile pattern, and then uses the first tactile pattern to drive the tactile output device 107, or may suspend the output of the second tactile pattern, and continue to output the second tactile sensation after the output of the first tactile pattern is finished. model.
  • the haptic effect control device 106 may determine to continue to use the second haptic mode to drive the haptic output device 107 . At this time, the haptic effect control device 106 may ignore the newly triggered first haptic pattern, or may output the first haptic pattern after the output of the second haptic pattern ends.
  • the method described above with reference to FIGS. 16-17 can select from a plurality of haptic patterns whose output times contradict or conflict with each other and output a desired haptic pattern at an appropriate timing, thereby avoiding different haptic effects while providing rich haptic effects. conflicts or interferences between them, improving the user experience.
  • the processor 101 may trigger multiple haptic patterns to be output in response to multiple events detected at the same time (eg, within a sufficiently short time), and FIG. 18 shows a schematic diagram of such an embodiment. .
  • the processor 101 may trigger a first haptic pattern in response to a first event at time T1.
  • the processor 101 can start a timer to monitor the time, if the processor 101 triggers another, for example, the third haptic pattern in response to the second event at time T2 within the predetermined period T timer , the processor 101 can consider the second
  • the first and third haptic patterns are two haptic patterns that are triggered simultaneously.
  • the processor 101 may trigger more, for example, three or four haptic modes at the same time.
  • the processor 101 may selectively instruct the haptic effect control device 106 a predetermined number of haptic patterns to be output based on the type of the triggered haptic pattern and its corresponding priority, such as one or two with higher priority. Haptic modes that are different from each other, ignoring one or more haptic modes with lower priority.
  • the processor 101 may indicate to the haptic effect control device 106 the haptic patterns to be output in order of priority from high to low. Referring to FIG.
  • the processor 101 triggers a haptic output mode in response to an event at time T3 after exceeding a predetermined period of time T timer (for example, after the timer expires), it is regarded as a new trigger instead of Together with the triggers at T1 and T2 times, they are considered as simultaneous triggers. It can be understood that for the new trigger T3, it can be processed according to the method described above for the trigger T1.
  • step S810 the haptic effect control device 106 determines the first and third haptic patterns to be output and their corresponding first and third priorities based on the haptic trigger message received from the processor 101, wherein the third haptic The mode is different from the first haptic mode, and the third priority is equal to or lower than the first priority, so that the output order of the third haptic mode is after the first haptic mode.
  • the output sequence can be determined according to the order of priority from high to low. When the priority is the same, it can be determined according to its trigger timing.
  • one or more haptic patterns may be arranged in the order of their output.
  • step S830 the steps of determining the driving haptic mode for driving the haptic output device 107 described above with reference to FIGS. .
  • “Iteration” means that if it is determined in the above steps that the first haptic mode is used to drive the haptic output device 107, and the second mode currently being output is suspended or terminated, then when the above steps are performed using the third haptic mode, the The driving haptic pattern currently being output is iterated into the first haptic pattern instead of the original second haptic pattern.
  • the list of driving haptic patterns may also be updated with the determined driving haptic patterns.
  • the haptic effect control device 106 may maintain a list of driving haptic patterns, and FIG. 19 shows an example of such a list of driving haptic patterns.
  • the drive haptic mode list may include up to a predetermined number of drive haptic modes for driving the haptic output device 107, shown as three in the example of FIG. 19 , specifically, may include its haptic mode code and priority coding. These drive haptic modes are different from each other and can be arranged in order of priority from highest to lowest.
  • the first tactile pattern is the tactile pattern currently being output by the tactile output device 107 , followed by the first tactile pattern to be output, and the second tactile pattern to be output after that.
  • the output haptic pattern is finished and no new haptic pattern is triggered, the first output haptic pattern becomes the output haptic pattern, and the second output haptic pattern becomes the first output haptic pattern.
  • FIG. 20 to 22 show some examples of updating the driving haptic mode list with the determined driving haptic mode, from which the above-described steps of determining the driving haptic mode for driving the haptic output device 107 can also be further understood.
  • the current drive haptic pattern list includes only the second haptic pattern with the second priority being output.
  • step S830 it is determined to use the first haptic mode to drive the haptic output device 107, and after the end of the first haptic mode If the second haptic pattern continues to be output, the driving haptic pattern list may be updated in step S840 so that the first pattern becomes the current output and the second pattern becomes the first driving haptic pattern to be output. In some embodiments, if the second haptic mode is terminated, the second haptic mode may not be included in the updated drive haptic mode list.
  • the haptic trigger message may indicate a first haptic pattern with a first priority and a third haptic pattern with a third priority, wherein the first, second, and third haptic patterns are different from each other, and the third haptic pattern has a third priority.
  • the priority is lower than the first priority, and the current drive haptic pattern list includes only the second haptic pattern with the second priority being output.
  • step S830 it is determined to use the first haptic mode to drive the haptic output device 107, and then continue after the first haptic mode ends Outputting the second haptic pattern; further determining that the third haptic pattern is executed after the first haptic pattern (now becoming the driving haptic pattern currently being output) when iteratively processing the third haptic pattern, and based on the comparison of the third and second priorities , it may be determined that the third haptic pattern is performed after the second haptic pattern. At this time, as shown in FIG.
  • the driving haptic mode list can be updated in step S840, so that the first mode becomes the current output, the second mode becomes the first driving haptic mode to be output, and the third mode becomes the second outputting mode.
  • Drive Haptic Mode if the third priority is higher than the second priority, the output orders of the second haptic pattern and the third haptic pattern shown in FIG. 21 may be exchanged with each other.
  • the haptic trigger message may be the same as FIG. 21 , indicating a first haptic pattern with a first priority and a third haptic pattern with a third priority.
  • the current drive haptic mode list includes a fourth haptic mode with a fourth priority in addition to a second haptic mode with a second priority, where the first, second, third, and fourth haptic modes are different from each other , the third priority is lower than the first priority, and the fourth priority is lower than the second priority.
  • step S830 it is determined in step S830 to use the first haptic mode to drive the haptic output device 107, and continue to output the second haptic mode after the end of the first haptic mode; further in the iterative process
  • the third haptic mode if the third priority is lower than the fourth priority, since the driving haptic mode list can accommodate up to three driving haptic modes to be output, the third haptic mode will be ignored, and the updated driving haptic mode list
  • the first tactile pattern, the second tactile pattern and the fourth tactile pattern are sequentially included.
  • the ways of updating the driving haptic pattern list described above with reference to FIGS. 20-22 are only examples, and the list of driving haptic patterns can also be maintained and updated in other ways. Using the list of driving haptic patterns, multiple driving haptic patterns to be output can be conveniently managed, which is very useful for systems that provide rich haptic feedback.
  • FIG. 23 shows a schematic functional block diagram of a haptic effect control device 1000 according to an embodiment of the present invention. It can be understood that each functional module in the haptic effect control apparatus 1000 shown in FIG. part. The relevant functions and operations of each functional module in the haptic effect control device 1000 shown in FIG. 23 have been described in detail above with reference to FIGS. 16-22 , so only a brief description will be given below.
  • the haptic effect control device 1000 may include: a haptic pattern to be output determining unit 1010 , which may be configured to determine a first haptic pattern to be output and a first haptic pattern of the first haptic pattern based on the received haptic trigger message. priority; a current haptic mode determination unit 1020 configured to determine a second haptic mode that the tactile output device is outputting and a second priority of the second haptic mode; and a drive haptic mode determination unit 1030 configured to determine based on the The first haptic mode and first priority and the second haptic mode and second priority determine a driving haptic mode for driving the haptic output device.
  • the driving haptic mode determining unit 1030 may be configured to ignore the first haptic mode and continue to drive the haptic mode with the second haptic mode when the first haptic mode is the same as the second haptic mode.
  • the haptic output device when the first haptic mode is different from the second haptic mode, if the first priority is higher than the second priority, then suspend or terminate the second haptic mode, using the first haptic mode to drive the haptic output device, if the first priority is equal to or lower than the second priority, continue to use the second haptic mode to drive the haptic output device, and ignore
  • the first haptic mode or the first haptic mode is used to drive the haptic output device after the second haptic mode ends.
  • the to-be-output haptic pattern determination unit 1010 may also be configured to determine a third haptic pattern to be output and a third priority of the third haptic pattern based on the haptic trigger message, the third haptic pattern Different from the first haptic pattern, the third priority is equal to or lower than the first priority, and an output order of the third haptic pattern is after the first haptic pattern.
  • the driving haptic mode determination unit 1030 may be configured to iteratively perform the determination for driving the haptic output for the first haptic mode and the third haptic mode indicated by the haptic trigger message in the order of their output Steps to drive the haptic pattern of the device.
  • the device 1000 may also include a driving haptic pattern list maintenance unit 1040, which may be configured to update the driving haptic pattern list with the determined driving haptic pattern, the driving haptic pattern list includes a maximum predetermined number A driving tactile mode for driving the tactile output device and a priority of each driving tactile mode, the maximum predetermined number of driving tactile modes for driving the tactile output device are different from each other and in order of priority from high to high lower order.
  • a driving haptic pattern list maintenance unit 1040 may be configured to update the driving haptic pattern list with the determined driving haptic pattern
  • the driving haptic pattern list includes a maximum predetermined number A driving tactile mode for driving the tactile output device and a priority of each driving tactile mode, the maximum predetermined number of driving tactile modes for driving the tactile output device are different from each other and in order of priority from high to high lower order.
  • the tactile output device 107 when the tactile output device 107 is playing the first driving signal to output the first tactile effect, it is suddenly interrupted and plays the second driving signal to output the second tactile effect.
  • the haptic effect corresponding to the music is interrupted by the haptic effect triggered by the incoming voice call event, because the incoming voice call event has a higher priority, so the haptic effect control device 106 will instead use the second haptic effect corresponding to the incoming voice call event.
  • the driving signal is used to drive the tactile output device 107 .
  • the playing of the first driving signal can be stopped, or after the playing of the second driving signal is completed, the playing of the first driving signal can be continued from the pause point of the first driving signal.
  • the haptic output device 107 when the haptic output device 107 is playing the real-time driving signal received from the outside, there may be problems in continuing to play after the interruption. For example, when a user listens to a broadcast or webcast program (music and/or video, etc.) accompanied by real-time haptic effects, the real-time driving signal will be continuously written into the FIFO register; When outputting the haptic effect corresponding to a voice call, on the one hand, the real-time driving signal continues to be written into the FIFO register, which may cause the FIFO register to be filled and overflow; on the other hand, when the haptic effect corresponding to the voice call is output , when the real-time driving signal continues to be played, since the broadcast or webcast program has continued to the next moment, there may be a situation where the real-time driving signal (that is, the real-time haptic effect) does not match the broadcast or webcast program.
  • the real-time driving signal that is, the real-time haptic effect
  • an embodiment of the present invention proposes a haptic effect control method, as shown in FIG. 24 .
  • the method can be executed by, for example, the haptic effect control device 106 to control the haptic effect output through the haptic output device 107 .
  • a haptic effect control method 1100 may include step S1110, playing a first driving signal to generate a first haptic effect.
  • the first driving signal may be a real-time driving signal.
  • the haptic effect control device 106 may receive the real-time driving signal provided by the outside and store it in the FIFO register. The haptic effect control device 106 also reads the real-time driving signal from the FIFO register in real time, and uses the real-time driving signal to drive the haptic output device 107 to generate the first haptic effect output.
  • Figure 25 shows a schematic diagram of a FIFO register.
  • the FIFO register has a predetermined address range, that is, from a start address to an end address.
  • the haptic effect control device 106 can continuously write the real-time driving signal received through the I2C or I2S interface into the FIFO register, and read the real-time driving signal from the FIFO read address to drive the haptic output device 107 to generate tactile sensation Effect output. You can set the write counter and read counter to monitor the read and write status of the FIFO register.
  • the haptic effect control device 106 reads and plays the real-time driving signal stored therein; when the FIFO is empty, stops playing the real-time driving signal.
  • the haptic effect control device 106 may interrupt the playing of the first driving signal, such as a real-time driving signal, and instead play the second driving signal to output the second haptic effect.
  • the electronic device 100 receives a voice call, so it turns to play the second driving signal triggered by the voice call event to generate the second haptic effect.
  • the second driving signal may be a different type of driving signal from the first driving signal.
  • the first driving signal is a real-time driving signal received from the outside in real time
  • the second driving signal is a driving signal pre-stored in a non-volatile memory. Signals, such as WAV waveform signals.
  • step S1130 while playing the second driving signal, perform virtual playing of the first driving signal.
  • the haptic effect control device 106 may continue to receive and write the first driving signal into the FIFO register, and read the first driving signal from the FIFO register.
  • the read first drive signal is not used to drive the tactile output device 107, but can be discarded, because the tactile effect control device 106 is using the second drive signal to drive the tactile output device 107 to output the second tactile effect. In this way, through the virtual playback of the first driving signal, many advantages can be realized.
  • the real-time driving signal received by the haptic effect control device 106 occupies the storage space of the entire FIFO register, or even overflows; in addition, it can ensure that the first driving signal keeps matching with the corresponding event, such as a broadcast or webcast program, without A delay in the real-time haptic effect is generated due to the paused playback of the first drive signal.
  • step S1140 after the second driving signal is played, the first driving signal can be played continuously from the current virtual playing position of the first driving signal to generate a corresponding haptic effect.
  • the haptic effect control device 106 only needs to simply provide the first driving signal read from the FIFO register to the haptic output device 107 .
  • the haptic effect control device 106 will find that the FIFO register is empty, because the first driving signal has been read out completely during the virtual playback period, at this time the haptic effect control device 106 can determine the first driving signal The playback has been completed, and the driving signal triggered by the subsequent event is played instead.
  • the haptic effect control device 106 can normally receive, store and read out the real-time driving signal, so as to ensure that the real-time driving signal and the corresponding event such as broadcasting or webcast program are maintained. Matching will not cause the delay of the real-time haptic effect due to the pause of the real-time driving signal, and by reading the real-time driving signal from the FIFO register, it can prevent the real-time driving signal from filling the FIFO register and causing overflow.
  • each component or each step can be decomposed and/or reassembled. These decompositions and/or recombinations should be considered equivalents of this application.

Abstract

A haptic effect control method, which may comprise: receiving a haptic trigger message, the haptic trigger message at least comprising haptic mode encoding, the haptic mode encoding indicating one among multiple predetermined haptic modes, the multiple predetermined haptic modes corresponding to multiple haptic effects, and a haptic effect being expressed by a drive signal used to drive a haptic output device; decoding the haptic trigger message, so as to determine a haptic mode indicated by the haptic mode encoding; according to the mapping between haptic mode encoding and the register address that stores a corresponding drive signal, determining the register address of a drive signal corresponding to the haptic mode encoding, thereby determining a haptic effect corresponding to the haptic mode; and driving the haptic output device by using the drive signal stored in the register address, so as to output the haptic effect.

Description

触觉效果控制方法和装置及电子设备Haptic effect control method and device, and electronic device 技术领域technical field
本发明涉及一种用于灵活控制触觉效果输出的方法和装置、以及包括该装置的电子设备。The invention relates to a method and device for flexibly controlling the output of haptic effects, and electronic equipment including the device.
背景技术Background technique
触摸屏已经替代传统按键应用于各种电子设备中。以便携式电子设备例如智能手机为例,除了音量和电源按钮之外,已不再提供物理键盘,而是替代地在触摸屏上提供虚拟键盘以接收用户的输入。响应于用户触摸虚拟键盘,可以提供诸如振动反馈之类的触觉效果,以向用户确认成功的按键输入。此外,在收到短信或语音呼叫、以及闹铃到时等情况下,也可以提供振动效果。Touch screens have replaced traditional keys and are used in various electronic devices. Taking a portable electronic device such as a smart phone as an example, in addition to volume and power buttons, a physical keyboard is no longer provided, but a virtual keyboard is instead provided on a touch screen to receive user input. In response to the user touching the virtual keyboard, tactile effects such as vibration feedback may be provided to confirm successful key entry to the user. In addition, vibration effects can also be provided when text messages or voice calls are received, and when an alarm is due.
振动效果可通过马达例如转子马达或者线性马达来提供,其由驱动芯片控制。驱动芯片可包括硬件触发管脚。当操作系统检测到预定事件时,可以产生硬件触发脉冲,并将该脉冲提供给马达驱动芯片的硬件触发管脚。响应于在硬件触发管脚上检测到触发脉冲,驱动芯片可以使用驱动信号驱动马达以产生振动效果。马达驱动芯片一般包括一至三个硬件触发管脚,分别用于接收响应于特定的事件或事件类型产生的触发脉冲,并且响应于在不同的硬件触发管脚上接收到触发脉冲而使用不同的驱动信号来驱动马达以提供不同的触觉效果。The vibration effect can be provided by a motor such as a rotor motor or a linear motor, which is controlled by a driver chip. The driver chip may include hardware trigger pins. When the operating system detects a predetermined event, it can generate a hardware trigger pulse and provide the pulse to a hardware trigger pin of the motor driver chip. In response to detecting a trigger pulse on the hardware trigger pin, the driver chip can use the drive signal to drive the motor to generate a vibration effect. Motor drive chips generally include one to three hardware trigger pins, which are used to receive trigger pulses generated in response to specific events or event types, and use different drivers in response to receiving trigger pulses on different hardware trigger pins. Signals are used to drive motors to provide different haptic effects.
随着硬件和软件的发展,便携电子设备可提供的功能越来越多,因此也期望其能够提供更丰富的触觉效果。例如,当用户利用便携式电子设备来看电影、听音乐和玩游戏时,可能期望能够提供与视频图像或音乐相应的触觉效果;再例如,当用户打开或关闭电子设备的智能外壳时,也期望电子设备能提供触觉反馈。针对不同的事件或事件类型,用户期望体验不同的触觉效果。然而,一方面,由于管脚数量的限制,传统的基于硬件管脚的触发方式已经不能满足日益丰富的触发情形和触觉效果的需要。如果驱动芯片提供更多管脚以用于接收不同事件触发的脉冲信号,进而产生不同的触觉效果,这会导致驱动芯片的结构更复杂,成本更高。另一方面,当电子设备针对各种 事件提供丰富的触觉反馈时,也可能产生多个触觉效果之间彼此抵触或干扰的问题。例如,电子设备运行的操作系统可执行多个并行进程,这些并行进程可能会同时或在短时间内触发多个不同的触觉效果,导致马达驱动芯片不能确定应当执行哪个触觉效果。再例如,如果马达正在输出之前触发的触觉效果时,马达驱动芯片又收到操作系统新产生的触觉效果触发信号,此时驱动芯片也不清楚应当如何产生用户期望的触觉效果。With the development of hardware and software, portable electronic devices can provide more and more functions, so it is also expected that they can provide richer tactile effects. For example, when a user uses a portable electronic device to watch movies, listen to music, or play games, he may expect to be able to provide tactile effects corresponding to video images or music; Electronic devices can provide tactile feedback. For different events or event types, users expect to experience different haptic effects. However, on the one hand, due to the limitation of the number of pins, the traditional trigger method based on hardware pins can no longer meet the needs of increasingly rich trigger situations and haptic effects. If the driver chip provides more pins for receiving pulse signals triggered by different events to generate different tactile effects, this will lead to a more complex structure of the driver chip and higher costs. On the other hand, when electronic devices provide rich tactile feedback for various events, the problem of conflict or interference between multiple tactile effects may also arise. For example, an operating system running on an electronic device may execute multiple parallel processes, and these parallel processes may trigger multiple different haptic effects simultaneously or within a short period of time, causing the motor driver chip to be unable to determine which haptic effect should be executed. For another example, if the motor driver chip receives a new haptic effect trigger signal generated by the operating system while the motor is outputting the previously triggered haptic effect, the driver chip does not know how to generate the haptic effect desired by the user.
因此,仍期望提供一种用于控制触觉效果输出的装置和方法,其具有简单的结构,并且能够灵活地处理多个触发信号以产生期望的触觉效果输出。发明内容Therefore, it is still desirable to provide an apparatus and method for controlling haptic effect output, which has a simple structure and can flexibly process multiple trigger signals to generate desired haptic effect output. Contents of the invention
本申请的一个方面提供一种在触觉效果控制芯片中执行的触觉效果控制方法,包括:接收触觉触发消息,所述触觉触发消息至少包括触觉模式编码,所述触觉模式编码指示多种预定触觉模式中的一种,其中所述多种预定触觉模式与多种触觉效果相对应,所述触觉效果由用于驱动触觉输出器件的驱动信号表示;解码所述触觉触发消息以确定所述触觉模式编码指示的触觉模式;根据触觉模式编码与存储对应的驱动信号的寄存器地址之间的映射关系,确定与所述触觉模式编码对应的驱动信号的寄存器地址,从而确定与所述触觉模式对应的触觉效果;以及使用所述寄存器地址中存储的驱动信号来驱动所述触觉输出器件,以输出所述触觉效果。One aspect of the present application provides a haptic effect control method executed in a haptic effect control chip, including: receiving a haptic trigger message, the haptic trigger message at least including a haptic mode code, the haptic mode code indicating multiple predetermined haptic modes One of, wherein the plurality of predetermined haptic patterns correspond to a plurality of haptic effects represented by a drive signal for driving a haptic output device; decoding the haptic trigger message to determine the haptic pattern code The indicated tactile mode; according to the mapping relationship between the tactile mode code and the register address storing the corresponding drive signal, determine the register address of the drive signal corresponding to the tactile mode code, thereby determining the tactile effect corresponding to the tactile mode and using the drive signal stored in the register address to drive the tactile output device to output the tactile effect.
在一些实施例中,所述触觉触发消息还包括报头,所述报头用于识别所述触觉触发消息。In some embodiments, the haptic trigger message further includes a header for identifying the haptic trigger message.
在一些实施例中,所述触觉触发消息还包括与所述触觉模式编码相关联的优先级编码,所述优先级编码指示所述触觉模式编码指示的触觉模式的优先级。In some embodiments, the haptic trigger message further includes a priority code associated with the haptic mode code, the priority code indicating a priority of the haptic mode indicated by the haptic mode code.
在一些实施例中,解码所述触觉触发消息还包括确定所述优先级编码指示的优先级,并且所述方法还包括基于所述优先级来确定是否输出所述触觉效果。In some embodiments, decoding the haptic trigger message further includes determining a priority indicated by the priority encoding, and the method further includes determining whether to output the haptic effect based on the priority.
在一些实施例中,所述触觉触发消息是在多个管脚上接收的,所述多个管脚包括一个控制管脚以及一个或多个数据管脚,当所述控制管脚被激活时,在所述一个或多个数据管脚上接收所述触觉触发消息。In some embodiments, the haptic trigger message is received on a plurality of pins, the plurality of pins including a control pin and one or more data pins, when the control pin is activated , receiving the haptic trigger message on the one or more data pins.
在一些实施例中,所述触觉触发消息是在I2C或I2S接口上接收的,所 述驱动信号包括在所述I2C或I2S接口上接收的实时驱动信号,通过所述I2C或I2S接口接收到的实时驱动信号被写入到先入先出寄存器,从而当解码所述触觉触发消息获得的触觉模式编码被映射到所述先入先出寄存器中用于存储所述实时驱动信号的寄存器地址时,使用所述寄存器地址中的所述实时驱动信号来驱动所述触觉输出器件,以实现所述触觉效果的实时输出。In some embodiments, the haptic trigger message is received on an I2C or I2S interface, the driving signal includes a real-time driving signal received on the I2C or I2S interface, and the The real-time driving signal is written into the first-in-first-out register, so that when the haptic pattern code obtained by decoding the haptic trigger message is mapped to the register address in the first-in-first-out register for storing the real-time driving signal, the The real-time driving signal in the register address is used to drive the tactile output device, so as to realize the real-time output of the tactile effect.
在一些实施例中,所述驱动信号包括实时驱动信号,所述实时驱动信号和所述触觉触发消息通过所述触觉效果控制芯片的单个管脚被接收。In some embodiments, the driving signal includes a real-time driving signal, and the real-time driving signal and the haptic trigger message are received through a single pin of the haptic effect control chip.
在一些实施例中,所述实时驱动信号和所述触觉触发消息由浮动电平表示,所述浮动电平由所述触觉效果控制芯片中的电平检测单元进行检测和解码。In some embodiments, the real-time driving signal and the haptic trigger message are represented by floating levels, and the floating levels are detected and decoded by a level detection unit in the haptic effect control chip.
在一些实施例中,所述浮动电平具有与报头部分对应的第一电平范围和与信号载荷部分对应的第二电平范围,所述第一电平范围不同于所述第二电平范围,所述报头部分用于指示所述信号载荷部分包括触觉模式编码或实时驱动信号。In some embodiments, the floating level has a first level range corresponding to the header part and a second level range corresponding to the signal payload part, and the first level range is different from the second level range, the header part is used to indicate that the signal payload part includes a tactile mode code or a real-time driving signal.
本申请的另一方面提供一种触觉效果控制芯片,包括:输入单元,配置为接收触觉触发消息,所述触觉触发消息至少包括触觉模式编码,所述触觉模式编码指示多种预定触觉模式中的一种,其中所述多种预定触觉模式与多种触觉效果相对应,所述触觉效果由用于驱动触觉输出器件的驱动信号表示;解码单元,配置为解码所述触觉触发消息以确定所述触觉模式编码指示的触觉模式;触觉效果确定单元,配置为根据触觉模式编码与存储对应的驱动信号的寄存器地址之间的映射关系,确定与所述触觉模式编码对应的驱动信号的寄存器地址,从而确定与所述触觉模式对应的触觉效果;以及驱动单元,配置为使用所述寄存器地址中存储的驱动信号来驱动所述触觉输出器件,以输出所述触觉效果。Another aspect of the present application provides a haptic effect control chip, including: an input unit configured to receive a haptic trigger message, the haptic trigger message at least including a haptic mode code, the haptic mode code indicating a plurality of predetermined haptic modes One, wherein the plurality of predetermined haptic patterns correspond to a plurality of haptic effects represented by a driving signal for driving a haptic output device; a decoding unit configured to decode the haptic trigger message to determine the The tactile mode indicated by the tactile mode code; the tactile effect determining unit configured to determine the register address of the drive signal corresponding to the tactile mode code according to the mapping relationship between the tactile mode code and the register address storing the corresponding drive signal, thereby determining a haptic effect corresponding to the haptic mode; and a driving unit configured to use a driving signal stored in the register address to drive the haptic output device to output the haptic effect.
在一些实施例中,所述触觉触发消息还包括报头,所述报头用于识别所述触觉触发消息。In some embodiments, the haptic trigger message further includes a header for identifying the haptic trigger message.
在一些实施例中,所述触觉触发消息还包括与所述触觉模式编码相关联的优先级编码,所述优先级编码指示所述触觉模式编码指示的触觉模式的优先级。In some embodiments, the haptic trigger message further includes a priority code associated with the haptic mode code, the priority code indicating a priority of the haptic mode indicated by the haptic mode code.
在一些实施例中,所述解码单元在解码所述触觉触发消息时还确定所述优先级编码指示的优先级,并且所述触觉效果确定单元还配置为基于所述优 先级来确定是否输出所述触觉效果。In some embodiments, the decoding unit further determines the priority indicated by the priority encoding when decoding the haptic trigger message, and the haptic effect determining unit is further configured to determine whether to output the priority based on the priority. haptic effects.
在一些实施例中,所述输入单元从多个管脚接收所述触觉触发消息,所述多个管脚包括一个控制管脚以及一个或多个数据管脚,当所述控制管脚被激活时,在所述一个或多个数据管脚上接收所述触觉触发消息。In some embodiments, the input unit receives the haptic trigger message from multiple pins, the multiple pins include a control pin and one or more data pins, when the control pin is activated , receiving the haptic trigger message on the one or more data pins.
在一些实施例中,所述输入单元包括I2C或I2S接口,所述触觉触发消息是在所述I2C或I2S接口上接收的,所述驱动信号包括在所述I2C或I2S接口上接收的实时驱动信号,通过所述I2C或I2S接口接收到的实时驱动信号被写入到先入先出寄存器,从而当解码所述触觉触发消息获得的触觉模式编码被映射到所述先入先出寄存器中用于存储所述实时驱动信号的寄存器地址时,使用所述寄存器地址中的所述实时驱动信号来驱动所述触觉输出器件,以实现所述触觉效果的实时输出。In some embodiments, the input unit includes an I2C or I2S interface, the haptic trigger message is received on the I2C or I2S interface, and the driving signal includes a real-time driving signal received on the I2C or I2S interface. signal, the real-time driving signal received through the I2C or I2S interface is written into the first-in-first-out register, so that the tactile pattern code obtained when decoding the tactile trigger message is mapped to the first-in-first-out register for storage When the register address of the real-time driving signal is used, the real-time driving signal in the register address is used to drive the haptic output device, so as to realize the real-time output of the haptic effect.
在一些实施例中,所述驱动信号包括实时驱动信号,所述实时驱动信号和所述触觉触发消息通过所述触觉效果控制芯片的单个管脚被接收。In some embodiments, the driving signal includes a real-time driving signal, and the real-time driving signal and the haptic trigger message are received through a single pin of the haptic effect control chip.
在一些实施例中,所述实时驱动信号和所述触觉触发消息由浮动电平表示,所述浮动电平由所述触觉效果控制芯片中的电平检测单元进行检测和解码。In some embodiments, the real-time driving signal and the haptic trigger message are represented by floating levels, and the floating levels are detected and decoded by a level detection unit in the haptic effect control chip.
在一些实施例中,所述浮动电平具有与报头部分对应的第一电平范围和与信号载荷部分对应的第二电平范围,所述第一电平范围不同于所述第二电平范围,所述报头部分用于指示所述信号载荷部分包括触觉模式编码或实时驱动信号。In some embodiments, the floating level has a first level range corresponding to the header part and a second level range corresponding to the signal payload part, and the first level range is different from the second level range, the header part is used to indicate that the signal payload part includes a tactile mode code or a real-time driving signal.
本申请的另一方面提供一种移动电子设备,包括:至少一个触觉输出器件;以及上述触觉效果控制芯片,用于响应于接收到的触觉触发消息,控制所述至少一个触觉输出器件输出相应的触觉效果。Another aspect of the present application provides a mobile electronic device, including: at least one tactile output device; and the above-mentioned tactile effect control chip, configured to control the at least one tactile output device to output a corresponding tactile effect.
本申请的另一方面提供一种控制触觉反馈的方法,包括:接收第一触觉触发消息,所述第一触觉触发消息包括指示第一触觉模式的第一触觉模式编码和指示所述第一触觉模式的第一优先级的第一优先级编码;响应于接收到所述第一触觉触发消息,启动定时器;在所述定时器到期之前,接收第二触觉触发消息,所述第二触觉触发消息包括指示第二触觉模式的第二触觉模式编码和指示所述第二触觉模式的第二优先级的第二优先级编码;基于所述第一触觉模式和第一优先级以及所述第二触觉模式和第二优先级,确定待输出的触觉模式;以及在所述定时器到期之后,指示触觉输出器件输出所确定的 待输出的触觉模式。Another aspect of the present application provides a method for controlling haptic feedback, including: receiving a first haptic trigger message, the first haptic trigger message including a first haptic mode code indicating a first haptic mode and indicating the first haptic first priority encoding of the first priority of the mode; in response to receiving said first haptic trigger message, start a timer; before said timer expires, receive a second haptic trigger message, said second haptic trigger message The trigger message includes a second haptic mode code indicating a second haptic mode and a second priority code indicating a second priority of the second haptic mode; based on the first haptic mode and the first priority and the first two haptic modes and a second priority, determining the haptic mode to be output; and instructing the haptic output device to output the determined haptic mode to be output after the timer expires.
在一些实施例中,确定待输出的触觉模式包括,当所述第一触觉模式与所述第二触觉模式相同时:如果所述第一优先级与所述第二优先级相同,则选择所述第一触觉模式和所述第二触觉模式之一并且忽略另一个;或者如果所述第一优先级与所述第二优先级不同,则选择具有较高优先级的触觉模式,忽略具有较低优先级的触觉模式。In some embodiments, determining the haptic pattern to be output includes, when the first haptic pattern is the same as the second haptic pattern: if the first priority is the same as the second priority, selecting the one of the first haptic mode and the second haptic mode and ignore the other; or if the first priority is different from the second priority, select the haptic mode with the higher priority and ignore the haptic mode with the higher priority. Low priority haptic mode.
在一些实施例中,确定待输出的触觉模式包括,当所述第一触觉模式与所述第二触觉模式不同时:如果所述第一优先级高于所述第二优先级,则确定所述第一触觉模式为待输出的触觉模式,并且忽略所述第二触觉模式;如果所述第一优先级低于所述第二优先级,则确定所述第二触觉模式为待输出的触觉模式,并且忽略所述第一触觉模式;或者如果所述第一优先级等于所述第二优先级,则确定所述第一触觉模式和所述第二触觉模式中的一个为待输出的触觉模式,并且忽略所述第一触觉模式和所述第二触觉模式中的另一个。In some embodiments, determining the haptic pattern to be output includes, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, then determining the The first haptic mode is the haptic mode to be output, and the second haptic mode is ignored; if the first priority is lower than the second priority, then determine that the second haptic mode is the haptic mode to be output mode, and ignore the first haptic mode; or if the first priority is equal to the second priority, determine one of the first haptic mode and the second haptic mode as the haptic to be output mode, and ignore the other of the first haptic mode and the second haptic mode.
在一些实施例中,确定待输出的触觉模式包括,当所述第一触觉模式与所述第二触觉模式不同时:如果所述第一优先级高于所述第二优先级,并且所述第二优先级高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之前;如果所述第一优先级高于所述第二优先级,并且所述第二优先级低于预定阈值,则确定所述第一触觉模式为待输出的触觉模式,并且忽略所述第二触觉模式;如果所述第一优先级低于所述第二优先级,并且所述第一优先级高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之后;如果所述第一优先级低于所述第二优先级,并且所述第一优先级低于预定阈值,则确定所述第二触觉模式为待输出的触觉模式,并且忽略所述第一触觉模式;如果所述第一优先级等于所述第二优先级,并且两者都高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之前;或者如果所述第一优先级等于所述第二优先级,并且两者都低于预定阈值,则确定所述第一触觉模式和所述第二触觉模式中的一个为待输出的触觉模式,并且忽略所述第一触觉模式和所述第二触觉模式中的另一个,或者忽 略所述第一触觉模式和所述第二触觉模式两者。In some embodiments, determining the haptic pattern to output includes, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, and the If the second priority is higher than or equal to a predetermined threshold, it is determined that the first haptic mode and the second haptic mode are the haptic modes to be output, and the output timing of the first haptic mode is in the second haptic mode Before; if the first priority is higher than the second priority, and the second priority is lower than a predetermined threshold, then determining that the first haptic pattern is a haptic pattern to be output, and ignoring the first haptic pattern Two haptic modes; if the first priority is lower than the second priority, and the first priority is higher than or equal to a predetermined threshold, then determining that the first haptic mode and the second haptic mode are a haptic pattern to be output, and the output timing of the first haptic pattern is after the second haptic pattern; if the first priority is lower than the second priority, and the first priority is lower than A predetermined threshold, then determine that the second haptic pattern is the haptic pattern to be output, and ignore the first haptic pattern; if the first priority is equal to the second priority, and both are higher than or equal to A predetermined threshold, then determine that the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the output timing of the first haptic pattern is before the second haptic pattern; or if the first If the priority is equal to the second priority, and both are lower than a predetermined threshold, then it is determined that one of the first haptic pattern and the second haptic pattern is the haptic pattern to be output, and the first haptic pattern is ignored. The other of the haptic mode and the second haptic mode, or both the first haptic mode and the second haptic mode are ignored.
在一些实施例中,所述方法还包括:建立一触觉模式输出列表,并且在所述定时器到期之后,将所确定的待输出的触觉模式插入到所述触觉模式输出列表中。In some embodiments, the method further includes: establishing a haptic pattern output list, and after the timer expires, inserting the determined haptic pattern to be output into the haptic pattern output list.
在一些实施例中,所述方法还包括:在所确定的待输出的触觉模式执行完毕或者被取消时,从所述触觉模式输出列表删除该触觉模式。In some embodiments, the method further includes: when the determined haptic pattern to be output is completed or canceled, deleting the haptic pattern from the haptic pattern output list.
本申请的另一方面提供一种用于控制触觉反馈的装置,包括:第一接收单元,用于接收第一触觉触发消息,所述第一触觉触发消息包括指示第一触觉模式的第一触觉模式编码和指示所述第一触觉模式的第一优先级的第一优先级编码;定时器控制单元,用于响应于接收到所述第一触觉触发消息,启动定时器;第二接收单元,用于在所述定时器到期之前,接收第二触觉触发消息,所述第二触觉触发消息包括指示第二触觉模式的第二触觉模式编码和指示所述第二触觉模式的第二优先级的第二优先级编码;确定单元,用于基于所述第一触觉模式和第一优先级以及所述第二触觉模式和第二优先级,确定待输出的触觉模式;以及指示单元,用于在所述定时器到期之后,指示触觉输出器件输出所确定的待输出的触觉模式。Another aspect of the present application provides an apparatus for controlling haptic feedback, including: a first receiving unit configured to receive a first haptic trigger message, the first haptic trigger message including a first haptic signal indicating a first haptic mode A mode code and a first priority code indicating a first priority of the first haptic mode; a timer control unit, configured to start a timer in response to receiving the first haptic trigger message; a second receiving unit, receiving a second haptic trigger message before the timer expires, the second haptic trigger message including a second haptic mode code indicating a second haptic mode and a second priority indicating the second haptic mode The second priority encoding; the determination unit is used to determine the tactile mode to be output based on the first tactile mode and the first priority and the second tactile mode and the second priority; and an indication unit is used for After the timer expires, the haptic output device is instructed to output the determined haptic pattern to be output.
在一些实施例中,所述确定单元配置为,当所述第一触觉模式与所述第二触觉模式相同时:如果所述第一优先级与所述第二优先级相同,则选择所述第一触觉模式和所述第二触觉模式之一并且忽略另一个;或者如果所述第一优先级与所述第二优先级不同,则选择具有较高优先级的触觉模式,忽略具有较低优先级的触觉模式。In some embodiments, the determining unit is configured to, when the first haptic pattern is the same as the second haptic pattern: if the first priority is the same as the second priority, select the One of the first haptic mode and the second haptic mode and ignore the other; or if the first priority is different from the second priority, select the haptic mode with the higher priority and ignore the haptic mode with the lower priority. Prioritized haptic patterns.
在一些实施例中,所述确定单元配置为,当所述第一触觉模式与所述第二触觉模式不同时:如果所述第一优先级高于所述第二优先级,则确定所述第一触觉模式为待输出的触觉模式,并且忽略所述第二触觉模式;如果所述第一优先级低于所述第二优先级,则确定所述第二触觉模式为待输出的触觉模式,并且忽略所述第一触觉模式;或者如果所述第一优先级等于所述第二优先级,则确定所述第一触觉模式和所述第二触觉模式中的一个为待输出的触觉模式,并且忽略所述第一触觉模式和所述第二触觉模式中的另一个。In some embodiments, the determining unit is configured to, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, determine the The first haptic mode is the haptic mode to be output, and ignoring the second haptic mode; if the first priority is lower than the second priority, determining that the second haptic mode is the haptic mode to be output , and ignore the first haptic pattern; or if the first priority is equal to the second priority, determine one of the first haptic pattern and the second haptic pattern as the haptic pattern to be output , and ignore the other of the first haptic pattern and the second haptic pattern.
在一些实施例中,所述确定单元配置为,当所述第一触觉模式与所述第二触觉模式不同时:如果所述第一优先级高于所述第二优先级,并且所述第二优先级高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模 式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之前;如果所述第一优先级高于所述第二优先级,并且所述第二优先级低于预定阈值,则确定所述第一触觉模式为待输出的触觉模式,并且忽略所述第二触觉模式;如果所述第一优先级低于所述第二优先级,并且所述第一优先级高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之后;如果所述第一优先级低于所述第二优先级,并且所述第一优先级低于预定阈值,则确定所述第二触觉模式为待输出的触觉模式,并且忽略所述第一触觉模式;如果所述第一优先级等于所述第二优先级,并且两者都高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之前;或者如果所述第一优先级等于所述第二优先级,并且两者都低于预定阈值,则确定所述第一触觉模式和所述第二触觉模式中的一个为待输出的触觉模式,并且忽略所述第一触觉模式和所述第二触觉模式中的另一个,或者忽略所述第一触觉模式和所述第二触觉模式两者。In some embodiments, the determining unit is configured to, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, and the second If the priority is higher than or equal to a predetermined threshold, it is determined that the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the output timing of the first haptic pattern is before the second haptic pattern ; if the first priority is higher than the second priority, and the second priority is lower than a predetermined threshold, then determine that the first haptic pattern is the haptic pattern to be output, and ignore the second a haptic mode; if the first priority is lower than the second priority, and the first priority is higher than or equal to a predetermined threshold, then determining the first haptic mode and the second haptic mode to be output haptic pattern, and the output timing of the first haptic pattern is after the second haptic pattern; if the first priority is lower than the second priority, and the first priority is lower than a predetermined threshold, then determine that the second haptic pattern is the haptic pattern to be output, and ignore the first haptic pattern; if the first priority is equal to the second priority, and both are higher than or equal to the predetermined threshold, it is determined that the first haptic pattern and the second haptic pattern are the haptic patterns to be output, and the output timing of the first haptic pattern is before the second haptic pattern; or if the first haptic pattern is prioritized level is equal to the second priority, and both are lower than a predetermined threshold, then determine that one of the first haptic pattern and the second haptic pattern is the haptic pattern to be output, and ignore the first haptic pattern mode and the second haptic mode, or both the first haptic mode and the second haptic mode are ignored.
在一些实施例中,所述装置还包括输出列表维护单元,用于建立一触觉模式输出列表,并且在所述定时器到期之后,将所确定的待输出的触觉模式插入到所述触觉模式输出列表中,以及在所确定的待输出的触觉模式执行完毕或者被取消时,从所述触觉模式输出列表删除该触觉模式。In some embodiments, the device further includes an output list maintenance unit, configured to establish a tactile pattern output list, and after the timer expires, insert the determined tactile pattern to be output into the tactile pattern In the output list, and when the determined tactile pattern to be output is completed or canceled, the tactile pattern is deleted from the tactile pattern output list.
本申请的另一方面提供一种移动电子设备,包括:至少一个触觉输出器件;以及上述用于控制触觉反馈的装置,用于响应于接收到的触觉触发消息,控制所述至少一个触觉输出器件输出相应的触觉反馈。Another aspect of the present application provides a mobile electronic device, comprising: at least one tactile output device; and the above-mentioned device for controlling tactile feedback, configured to control the at least one tactile output device in response to a received tactile trigger message Output the corresponding haptic feedback.
本申请的另一方面提供一种控制触觉反馈的方法,包括:基于接收到的触觉触发消息,确定要输出的第一触觉模式和所述第一触觉模式的第一优先级,所述触觉触发消息包括指示所述第一触觉模式的触觉模式编码和指示所述第一优先级的优先级编码;确定触觉输出器件正在输出的第二触觉模式和所述第二触觉模式的第二优先级;以及基于所述第一触觉模式和第一优先级以及所述第二触觉模式和第二优先级,确定用于驱动所述触觉输出器件的驱动触觉模式。Another aspect of the present application provides a method for controlling haptic feedback, including: based on a received haptic trigger message, determining a first haptic pattern to be output and a first priority of the first haptic pattern, the haptic trigger The message includes a haptic mode code indicating the first haptic mode and a priority code indicating the first priority; determining a second haptic mode being output by a haptic output device and a second priority of the second haptic mode; And based on the first haptic mode and first priority and the second haptic mode and second priority, determining a driving haptic mode for driving the haptic output device.
在一些实施例中,确定用于驱动所述触觉输出器件的驱动触觉模式包括,当所述第一触觉模式与所述第二触觉模式相同时,忽略所述第一触觉模式, 继续用所述第二触觉模式驱动所述触觉输出器件;当所述第一触觉模式与所述第二触觉模式不同时,如果所述第一优先级高于所述第二优先级,则暂停或终止所述第二触觉模式的输出,使用所述第一触觉模式来驱动所述触觉输出器件,如果所述第一优先级等于或低于所述第二优先级,则继续使用所述第二触觉模式驱动所述触觉输出器件,并且忽略所述第一触觉模式或者在所述第二触觉模式结束后使用所述第一触觉模式来驱动所述触觉输出器件。In some embodiments, determining the driving haptic mode for driving the haptic output device includes, when the first haptic mode is the same as the second haptic mode, ignoring the first haptic mode and continuing to use the A second haptic mode drives the haptic output device; when the first haptic mode is different from the second haptic mode, if the first priority is higher than the second priority, suspending or terminating the The output of the second haptic mode, using the first haptic mode to drive the haptic output device, if the first priority is equal to or lower than the second priority, continue to use the second haptic mode to drive the tactile output device, and ignore the first tactile mode or use the first tactile mode to drive the tactile output device after the second tactile mode ends.
在一些实施例中,所述方法还包括:基于所述触觉触发消息确定要输出的第三触觉模式和所述第三触觉模式的第三优先级,所述第三触觉模式不同于所述第一触觉模式,所述第三优先级等于或低于所述第一优先级,并且所述第三触觉模式的输出顺序位于所述第一触觉模式之后。In some embodiments, the method further includes: determining a third haptic pattern to be output based on the haptic trigger message and a third priority of the third haptic pattern, the third haptic pattern being different from the first haptic pattern. A haptic mode, the third priority is equal to or lower than the first priority, and the output order of the third haptic mode is after the first haptic mode.
在一些实施例中,对于所述触觉触发消息指示的第一触觉模式和第三触觉模式,按其输出顺序迭代地执行所述确定用于驱动所述触觉输出器件的驱动触觉模式的步骤。In some embodiments, for the first haptic pattern and the third haptic pattern indicated by the haptic trigger message, the step of determining the driving haptic pattern for driving the haptic output device is iteratively performed in their output order.
在一些实施例中,所述方法还包括:用所确定的驱动触觉模式更新驱动触觉模式列表,所述驱动触觉模式列表包括最多预定数量个用于驱动所述触觉输出器件的驱动触觉模式以及每个驱动触觉模式的优先级,所述最多预定数量个用于驱动所述触觉输出器件的驱动触觉模式彼此不同并且按照优先级从高到低的顺序排列。In some embodiments, the method further includes: updating a drive haptic pattern list with the determined drive haptic pattern, the drive haptic pattern list including at most a predetermined number of drive haptic patterns for driving the haptic output device and each The priorities of the driving haptic modes, the maximum predetermined number of driving haptic modes for driving the haptic output device are different from each other and are arranged in order of priority from high to low.
本申请的另一方面提供一种用于控制触觉反馈的装置,包括:待输出触觉模式确定单元,用于基于接收到的触觉触发消息,确定要输出的第一触觉模式和所述第一触觉模式的第一优先级,所述触觉触发消息包括指示所述第一触觉模式的触觉模式编码和指示所述第一优先级的优先级编码;当前触觉模式确定单元,用于确定触觉输出器件正在输出的第二触觉模式和所述第二触觉模式的第二优先级;以及驱动触觉模式确定单元,用于基于所述第一触觉模式和第一优先级以及所述第二触觉模式和第二优先级,确定用于驱动所述触觉输出器件的驱动触觉模式。Another aspect of the present application provides a device for controlling haptic feedback, including: a haptic pattern to be output determining unit, configured to determine a first haptic pattern to be output and the first haptic pattern based on a received haptic trigger message The first priority of the mode, the haptic trigger message includes the tactile mode code indicating the first tactile mode and the priority code indicating the first priority; the current tactile mode determination unit is used to determine that the tactile output device is outputting a second haptic mode and a second priority of the second haptic mode; and driving a haptic mode determination unit for based on the first haptic mode and first priority and the second haptic mode and second priority The priority determines the driving haptic mode for driving the haptic output device.
在一些实施例中,所述驱动触觉模式确定单元配置为,当所述第一触觉模式与所述第二触觉模式相同时,忽略所述第一触觉模式,继续用所述第二触觉模式驱动所述触觉输出器件;当所述第一触觉模式与所述第二触觉模式不同时,如果所述第一优先级高于所述第二优先级,则暂停或终止所述第二触觉模式,使用所述第一触觉模式来驱动所述触觉输出器件,如果所述第一 优先级等于或低于所述第二优先级,则继续使用所述第二触觉模式驱动所述触觉输出器件,并且忽略所述第一触觉模式或者在所述第二触觉模式结束后使用所述第一触觉模式来驱动所述触觉输出器件。In some embodiments, the driving haptic mode determining unit is configured to ignore the first haptic mode and continue driving with the second haptic mode when the first haptic mode is the same as the second haptic mode. the haptic output device; when the first haptic mode is different from the second haptic mode, if the first priority is higher than the second priority, suspending or terminating the second haptic mode, driving the haptic output device using the first haptic mode, continuing to drive the haptic output device using the second haptic mode if the first priority is equal to or lower than the second priority, and The first haptic mode is ignored or the haptic output device is driven using the first haptic mode after the second haptic mode ends.
在一些实施例中,所述待输出触觉模式确定单元还用于基于所述触觉触发消息确定要输出的第三触觉模式和所述第三触觉模式的第三优先级,所述第三触觉模式不同于所述第一触觉模式,所述第三优先级等于或低于所述第一优先级,并且所述第三触觉模式的输出顺序位于所述第一触觉模式之后。In some embodiments, the haptic pattern to be output determining unit is further configured to determine a third haptic pattern to be output and a third priority of the third haptic pattern based on the haptic trigger message, the third haptic pattern Different from the first haptic pattern, the third priority is equal to or lower than the first priority, and an output order of the third haptic pattern is after the first haptic pattern.
在一些实施例中,所述驱动触觉模式确定单元配置为对于所述触觉触发消息指示的第一触觉模式和第三触觉模式,按其输出顺序迭代地执行所述确定用于驱动所述触觉输出器件的驱动触觉模式的步骤。In some embodiments, the drive haptic mode determination unit is configured to iteratively perform the determination for driving the haptic output in the order of their output for the first haptic mode and the third haptic mode indicated by the haptic trigger message Steps to drive the haptic pattern of the device.
在一些实施例中,所述装置还包括:驱动触觉模式列表维护单元,配置为用所确定的驱动触觉模式更新驱动触觉模式列表,所述驱动触觉模式列表包括最多预定数量个用于驱动所述触觉输出器件的驱动触觉模式以及每个驱动触觉模式的优先级,所述最多预定数量个用于驱动所述触觉输出器件的驱动触觉模式彼此不同并且按照优先级从高到低的顺序排列。In some embodiments, the device further includes: a driving haptic pattern list maintenance unit configured to update the driving haptic pattern list with the determined driving haptic pattern, the driving haptic pattern list includes a maximum predetermined number of driving haptic patterns for driving the The driving tactile modes of the tactile output device and the priority of each driving tactile mode, the maximum predetermined number of driving tactile modes for driving the tactile output device are different from each other and arranged in order of priority from high to low.
本申请的另一方面提供一种触觉效果控制方法,包括:播放第一驱动信号以输出第一触觉效果;响应于触发事件,暂停播放第一驱动信号,而播放第二驱动信号以输出第二触觉效果;以及在播放第二驱动信号期间,执行第一驱动信号的虚拟播放。Another aspect of the present application provides a haptic effect control method, including: playing a first driving signal to output a first haptic effect; in response to a trigger event, pausing playing the first driving signal, and playing a second driving signal to output a second a haptic effect; and during playing of the second driving signal, performing virtual playing of the first driving signal.
在一些实施例中,所述第一驱动信号是实时驱动信号,所述第二驱动信号是预先存储在存储器中的驱动信号。In some embodiments, the first driving signal is a real-time driving signal, and the second driving signal is a driving signal pre-stored in a memory.
在一些实施例中,执行第一驱动信号的虚拟播放包括:从FIFO寄存器中读取第一驱动信号,并丢弃所读取的第一驱动信号。In some embodiments, performing virtual playback of the first driving signal includes: reading the first driving signal from a FIFO register, and discarding the read first driving signal.
在一些实施例中,所述触觉效果控制方法还包括:当第二驱动信号播放完毕时,从第一驱动信号的当前虚拟播放位置处开始,继续播放第一驱动信号。In some embodiments, the haptic effect control method further includes: when the playing of the second driving signal is finished, starting from the current virtual playing position of the first driving signal, and continuing to play the first driving signal.
本申请的另一方面提供一种移动电子设备,包括:至少一个触觉输出器件;以及上述用于控制触觉反馈的装置,用于响应于接收到的触觉触发消息,控制所述至少一个触觉输出器件输出相应的触觉反馈。Another aspect of the present application provides a mobile electronic device, comprising: at least one tactile output device; and the above-mentioned device for controlling tactile feedback, configured to control the at least one tactile output device in response to a received tactile trigger message Output the corresponding haptic feedback.
本申请的上述和其他特征和优点将从下面结合附图对示例性实施例的描述变得显而易见。The above and other features and advantages of the present application will become apparent from the following description of exemplary embodiments taken in conjunction with the accompanying drawings.
附图说明Description of drawings
图1示出一种包括触觉效果控制装置的电子设备的示意性框图。Fig. 1 shows a schematic block diagram of an electronic device including a haptic effect control device.
图2示出根据本发明一实施例的触觉效果控制方法的流程图。Fig. 2 shows a flowchart of a method for controlling a haptic effect according to an embodiment of the present invention.
图3示出根据本发明一实施例的触觉触发消息编码的示意图。FIG. 3 shows a schematic diagram of encoding a haptic trigger message according to an embodiment of the present invention.
图4示出根据本发明一实施例的通过单个管脚接收触觉触发消息的示意图。FIG. 4 shows a schematic diagram of receiving a haptic trigger message through a single pin according to an embodiment of the present invention.
图5示出根据本发明另一实施例的通过多个管脚接收触觉触发消息的示意图。Fig. 5 shows a schematic diagram of receiving a haptic trigger message through multiple pins according to another embodiment of the present invention.
图6示出根据本发明另一实施例的在控制信号的控制下接收触觉触发消息的示意图。Fig. 6 shows a schematic diagram of receiving a haptic trigger message under the control of a control signal according to another embodiment of the present invention.
图7示出根据本发明另一实施例的通过I2C接口接收触觉触发消息的示意图。Fig. 7 shows a schematic diagram of receiving a haptic trigger message through an I2C interface according to another embodiment of the present invention.
图8示出根据本发明另一实施例的通过I2S接口接收触觉触发消息的示意图。Fig. 8 shows a schematic diagram of receiving a haptic trigger message through an I2S interface according to another embodiment of the present invention.
图9A至图9D示出在单个管脚上接收触觉触发消息和实时驱动信号的示意图,其中图9A是浮动电平的示意图,图9B是对浮动电平进行解码的器件的示意图,图9C和图9D是利用浮动电平传送的消息的结构示意图。9A to 9D show schematic diagrams of receiving haptic trigger messages and real-time driving signals on a single pin, wherein FIG. 9A is a schematic diagram of a floating level, FIG. 9B is a schematic diagram of a device for decoding a floating level, and FIG. 9C and FIG. 9D is a schematic diagram of the structure of a message transmitted using a floating level.
图10示出根据本发明另一实施例的触觉触发消息编码的示意图。Fig. 10 shows a schematic diagram of encoding a haptic trigger message according to another embodiment of the present invention.
图11示出根据本发明一实施例的触觉效果控制装置的示意性框图。Fig. 11 shows a schematic block diagram of a haptic effect control device according to an embodiment of the present invention.
图12示出根据本发明另一实施例的触觉效果控制方法的流程图。Fig. 12 shows a flowchart of a haptic effect control method according to another embodiment of the present invention.
图13示出根据本发明一实施例的基于定时器信号来处理触觉触发消息的示意图。FIG. 13 shows a schematic diagram of processing a haptic trigger message based on a timer signal according to an embodiment of the present invention.
图14示出根据本发明一实施例的确定待输出的触觉模式的方法的流程图。Fig. 14 shows a flowchart of a method for determining a tactile pattern to be output according to an embodiment of the present invention.
图15示出根据本发明另一实施例的确定待输出的触觉模式的方法的流程图。Fig. 15 shows a flowchart of a method for determining a tactile pattern to be output according to another embodiment of the present invention.
图16示出根据本发明一实施例的用于控制触觉效果的装置的功能框图。Fig. 16 shows a functional block diagram of an apparatus for controlling haptic effects according to an embodiment of the present invention.
图17示出根据本发明另一实施例的触觉效果控制方法的流程图。Fig. 17 shows a flowchart of a haptic effect control method according to another embodiment of the present invention.
图18示出根据本发明一实施例的确定驱动触觉模式的方法的流程图。FIG. 18 shows a flowchart of a method for determining a driving haptic mode according to an embodiment of the present invention.
图19示出根据本发明一实施例的多个触觉模式被同时触发的示意图。Fig. 19 shows a schematic diagram of multiple haptic modes being triggered simultaneously according to an embodiment of the present invention.
图20示出根据本发明一实施例的驱动触觉模式的列表的示意图。FIG. 20 shows a schematic diagram of a list of driving haptic patterns according to an embodiment of the present invention.
图21、图22和图23示出根据本发明一些实施例的更新驱动触觉模式的列表的示意图。21 , 22 and 23 illustrate schematic diagrams of updating a list of driving haptic patterns according to some embodiments of the present invention.
图24示出根据本发明一实施例的用于控制触觉效果的装置的功能框图。Fig. 24 shows a functional block diagram of an apparatus for controlling haptic effects according to an embodiment of the present invention.
图25示出根据本发明另一实施例的触觉效果控制方法的流程图。Fig. 25 shows a flow chart of a haptic effect control method according to another embodiment of the present invention.
图26示出FIFO寄存器的示意图。Fig. 26 shows a schematic diagram of a FIFO register.
具体实施方式Detailed ways
下面将参照附图来描述本发明的一些示范性实施例。为了清楚和完整地描述这些示范性实施例,下面的描述提供了一些特定细节。但是应理解,本发明不应被限制到这些示范性实施例的特定细节。而是,可以在没有这些特定细节或者采用其他替代方式的情况下,实施本发明的实施例,而不会偏离权利要求定义的本发明的思想和原理。Some exemplary embodiments of the present invention will be described below with reference to the accompanying drawings. The following description provides some specific details in order to clearly and completely describe these exemplary embodiments. It should be understood, however, that the invention should not be limited to the specific details of these exemplary embodiments. Rather, embodiments of the invention may be practiced without these specific details, or with other alternatives, without departing from the idea and principle of the invention as defined by the claims.
图1示出一种包括触觉效果控制装置的电子设备100的示意性框图。电子设备100可以是便携式移动电子设备,例如智能手机、个人数字助理、个人终端设备、平板计算机、手持式游戏机、穿戴式电子设备、汽车电子设备等。Fig. 1 shows a schematic block diagram of an electronic device 100 including a haptic effect control device. The electronic device 100 may be a portable mobile electronic device, such as a smart phone, a personal digital assistant, a personal terminal device, a tablet computer, a handheld game console, a wearable electronic device, an automotive electronic device, and the like.
参照图1,电子设备100可包括一个或多个处理器101。处理器101可以是通用处理器或专用处理器,其示例包括例如中央处理单元(CPU)、ARM处理器、苹果的A系列和M系列处理器、微控制单元(MCU)、现场可编程门阵列(FPGA)、音频处理器、图形处理器(GPU)、协处理器等。可以理解,处理器101可以是单核或多核处理器。Referring to FIG. 1 , an electronic device 100 may include one or more processors 101 . The processor 101 may be a general-purpose processor or a special-purpose processor, examples of which include, for example, a central processing unit (CPU), an ARM processor, Apple's A-series and M-series processors, a microcontroller unit (MCU), a field-programmable gate array (FPGA), audio processor, graphics processing unit (GPU), coprocessor, etc. It can be understood that the processor 101 may be a single-core or multi-core processor.
电子设备100还可以包括触摸屏102,其兼具显示输出和触摸输入的功能。触摸屏102可以是液晶显示屏(LCD)、有源矩阵有机发光二极管(AMOLED)显示屏等,并且集成有电容式或电阻式触摸感测功能。The electronic device 100 may further include a touch screen 102, which has the functions of display output and touch input. The touch screen 102 may be a Liquid Crystal Display (LCD), an Active Matrix Organic Light Emitting Diode (AMOLED) display, etc., and is integrated with a capacitive or resistive touch sensing function.
电子设备100可具有一个或多个存储器103,其可包括非易失性和易失性存储器。非易失性存储器的示例包括闪存、SD卡、ROM、EEPROM等,其可用于存储可由处理器101运行的程序指令、用户数据等。易失性存储器的示例包括RAM,SRAM、DRAM等,其也被称为内存,用于在电子设备100运行时存储供处理器101执行的指令数据或者用作数据缓存等。Electronic device 100 may have one or more memories 103, which may include non-volatile and volatile memory. Examples of non-volatile memory include flash memory, SD card, ROM, EEPROM, etc., which can be used to store program instructions executable by processor 101, user data, etc. Examples of volatile memory include RAM, SRAM, DRAM, etc., which are also called memory, and are used to store instruction data for execution by the processor 101 or as a data cache when the electronic device 100 is running.
电子设备100还可包括用于播放音频的扬声器104以及一个或多个传感 器105。传感器105的示例包括例如光线传感器、距离传感器、速度传感器、重力传感器、磁传感器、陀螺仪等。The electronic device 100 may also include a speaker 104 for playing audio and one or more sensors 105. Examples of the sensor 105 include, for example, a light sensor, a distance sensor, a speed sensor, a gravity sensor, a magnetic sensor, a gyroscope, and the like.
电子设备100还可包括触觉效果控制装置106和触觉输出器件107以提供触觉效果输出,其也可称为触觉反馈。在本文中,触觉效果包括但不限于振动,还可以包括例如触摸纹理模拟、形变、压力等。例如,触摸纹理模拟能够响应于驱动信号而模拟不同粗糙度的表面,超声波能够模拟辐射压力等。因此,触觉输出器件107可以是各种能够产生触觉效果的器件,其示例可包括转子偏心马达(ERM)、线性谐振马达(LRA)、压电马达、静电致动器、超声波换能器、记忆合金等。触觉效果控制装置106可以是例如安装在印刷电路板上的一个或多个驱动芯片,其用于控制和驱动触觉输出器件107以输出期望的触觉效果,其将在下面进一步详细描述。The electronic device 100 may further include a tactile effect control device 106 and a tactile output device 107 to provide a tactile effect output, which may also be called a tactile feedback. Herein, the tactile effect includes but is not limited to vibration, and may also include, for example, touch texture simulation, deformation, pressure, and the like. For example, touch texture simulation can simulate surfaces with different roughness in response to driving signals, ultrasonic waves can simulate radiation pressure, and so on. Therefore, the tactile output device 107 may be various devices capable of generating tactile effects, examples of which may include eccentric rotor motors (ERMs), linear resonant motors (LRAs), piezoelectric motors, electrostatic actuators, ultrasonic transducers, memory Alloy etc. The tactile effect control device 106 may be, for example, one or more driver chips mounted on a printed circuit board, which is used to control and drive the tactile output device 107 to output desired tactile effects, which will be further described in detail below.
上述器件可以连接到总线系统108以彼此通信。当电子设备100运行时,处理器101可执行存储器103中存储的程序,例如操作系统程序、小应用程序(APP)、视频程序、音频程序等,并且控制各个器件的操作。例如,处理器101可以控制触摸屏102播放视频,扬声器104播放音频,并且检测来自触摸屏102和传感器105的输入。响应于各种预定义事件,处理器101可以指示触觉效果控制装置106驱动触觉输出器件107来输出相应的触觉效果。例如,当处理器101检测到用户通过触摸屏102按下了虚拟按键或者进行了其他手势操作时,可以指示触觉效果控制装置106来产生各种相应的触觉效果。再例如,当处理器101检测到传感器105的感测输入,例如通过磁传感器检测到用户打开电子设备100的设备外壳(例如手机壳)时,可以指示触觉效果控制装置106来产生各种相应的触觉效果。还例如,当处理器101检测到各种其他事件,例如播放音频和/或视频、收到电话呼叫、闹铃到时等事件时,也可以指示触觉效果控制装置106产生各种相应的触觉效果。例如,可以随着音频中的鼓点或重低音,产生相应节奏和幅度的振动效果;又或者当电影或游戏视频中包括与特定画面例如爆炸、撞击、震动等关联的振动效果数据时,处理器101也可以指示触觉效果控制装置106基于该数据产生相应的触觉效果。下面将详细描述通过触觉效果控制装置106来控制和驱动触觉输出器件107产生各种触觉效果的示例性实施例,并且为了描述的简单和方便,以振动作为触觉效果的示例,但是应理解,本发明的原理可以应用于在各种情景或场合下触发各种触觉效果,而不限于这里描述的实施例。The aforementioned devices may be connected to the bus system 108 to communicate with each other. When the electronic device 100 is running, the processor 101 can execute programs stored in the memory 103, such as operating system programs, applet programs (APP), video programs, audio programs, etc., and control operations of various devices. For example, the processor 101 may control the touch screen 102 to play video, the speaker 104 to play audio, and detect inputs from the touch screen 102 and the sensor 105 . In response to various predefined events, the processor 101 may instruct the haptic effect control device 106 to drive the haptic output device 107 to output corresponding haptic effects. For example, when the processor 101 detects that the user presses a virtual key or performs other gesture operations through the touch screen 102, it may instruct the tactile effect control device 106 to generate various corresponding tactile effects. For another example, when the processor 101 detects the sensing input of the sensor 105, for example, when the magnetic sensor detects that the user opens the device case (such as a mobile phone case) of the electronic device 100, it may instruct the tactile effect control device 106 to generate various corresponding tactile effect. Also for example, when the processor 101 detects various other events, such as playing audio and/or video, receiving a phone call, and an alarm, it may also instruct the haptic effect control device 106 to generate various corresponding haptic effects . For example, along with the drumbeat or heavy bass in the audio, a vibration effect with corresponding rhythm and amplitude can be generated; or when the movie or game video includes vibration effect data associated with a specific picture such as explosion, impact, vibration, etc. 101 may also instruct the haptic effect control device 106 to generate a corresponding haptic effect based on the data. An exemplary embodiment of controlling and driving the tactile output device 107 to generate various tactile effects through the tactile effect control device 106 will be described in detail below, and for simplicity and convenience of description, vibration is used as an example of the tactile effect, but it should be understood that this The principles of the invention can be applied to trigger various haptic effects in various scenarios or occasions, without being limited to the embodiments described here.
图2示出根据本发明一实施例的一种触觉效果控制方法200的流程图,其可以由例如图1所示的电子设备100中的触觉效果控制装置106执行。FIG. 2 shows a flow chart of a haptic effect control method 200 according to an embodiment of the present invention, which may be executed, for example, by the haptic effect control apparatus 106 in the electronic device 100 shown in FIG. 1 .
参照图2,方法200可包括步骤S210,接收触觉触发消息。在一些实施例中,如前所述,当处理器101检测到与触觉效果相关联的预定事件时,可以向触觉效果控制装置106发送触觉触发消息。可以理解的是,处理器101可以在检测到各种预定事件时触发触觉效果,而且各种事件可以对应于不同或者相同的触觉效果。因此,在步骤S210中,接收到的触觉触发消息可以包括触觉模式编码,该触觉模式编码可以指示多种预定触觉模式中的一种。Referring to FIG. 2 , the method 200 may include step S210 of receiving a haptic trigger message. In some embodiments, as mentioned above, when the processor 101 detects a predetermined event associated with the haptic effect, it may send a haptic trigger message to the haptic effect control device 106 . It can be understood that the processor 101 may trigger a haptic effect when various predetermined events are detected, and various events may correspond to different or the same haptic effects. Therefore, in step S210, the received haptic trigger message may include a haptic mode code, which may indicate one of various predetermined haptic modes.
图3示出了根据本发明一实施例的触觉触发消息中的触觉模式编码的示意图。如图3所示,触觉模式编码可以是N比特的数据,其中N是大于1的整数。因此,触觉模式编码可具有2 N种值,如果将零值视为无触觉效果,其也可以指示2 N-1种触觉模式。例如,3比特的触觉模式编码即可指示7种触觉模式。可以灵活地针对各种事件定义各种不同的触觉模式;当处理器101检测到特定事件时,即可将其对应的触觉模式编码到触觉触发消息中发送给触觉效果控制装置106。例如,以3比特的触觉模式编码为例,当处理器101检测到用户按下虚拟键盘上的按键以执行输入时,可以生成触觉模式编码为001的触觉触发消息;用户按下表示菜单、后退或者主页(home)的三个虚拟按键时,可以生成触觉模式编码为010的触觉触发消息;当设定的闹钟到时间时,可以生成触觉模式编码为011的触觉触发消息;当玩游戏或者看电影时触发触觉反馈时,可以生成触觉模式编码为100的触觉触发消息;当听音乐时触发触觉反馈时,可以生成触觉模式编码为101的触觉触发消息;当收到短消息时,可以生成触觉模式编码为110的触觉触发消息;当收到语音呼叫时,可以生成触觉模式编码为111的触觉触发消息;等等。应理解,这里描述的编码仅是示例,可以根据期望的触觉反馈应用场景,用更多比特的编码来定义更多种触觉模式。虽然未示出,但是触觉触发消息还可以包括在触觉模式编码之前的报头(header)部分,从而触觉效果控制装置106可以基于报头来将该消息识别为触觉触发消息。 Fig. 3 shows a schematic diagram of tactile mode coding in a tactile trigger message according to an embodiment of the present invention. As shown in FIG. 3 , the tactile pattern code may be N-bit data, where N is an integer greater than 1. Thus, a haptic mode code can have 2N values, and a value of zero can also indicate 2N -1 haptic modes if one considers no haptic effect. For example, a 3-bit haptic pattern code can indicate 7 haptic patterns. Various tactile modes can be flexibly defined for various events; when the processor 101 detects a specific event, it can encode the corresponding tactile mode into a tactile trigger message and send it to the tactile effect control device 106 . For example, taking the 3-bit tactile mode code as an example, when the processor 101 detects that the user presses a key on the virtual keyboard to perform input, it can generate a tactile trigger message whose tactile mode code is 001; Or when there are three virtual buttons on the home page (home), a tactile trigger message with a tactile mode coded as 010 can be generated; when the set alarm clock is up, a tactile trigger message with a tactile mode coded as 011 can be generated; when playing games or watching When the haptic feedback is triggered during a movie, a haptic trigger message whose haptic mode code is 100 can be generated; when the haptic feedback is triggered when listening to music, a haptic trigger message whose haptic mode code is 101 can be generated; when a short message is received, a haptic trigger message can be generated A haptic trigger message with mode code 110; a haptic trigger message with haptic mode code 111 may be generated when a voice call is received; and so on. It should be understood that the encoding described here is only an example, and more bits of encoding can be used to define more kinds of tactile modes according to desired application scenarios of tactile feedback. Although not shown, the haptic trigger message may also include a header portion before the haptic pattern encoding, so that the haptic effect control device 106 may identify the message as a haptic trigger message based on the header.
图4示出根据本发明一实施例的接收触觉触发消息的示意图。在图4的示例中,包括触觉模式编码的触觉触发消息可以在触觉效果控制装置106例如驱动芯片的一个数据管脚PIN1上接收。例如,基于系统时钟信号SCL,触觉效果控制装置106可以对数据管脚PIN1进行信号采样,以读取其上的 数据。可以理解,数据管脚PIN1上接收的信号可以是数字信号,或者也可以是模拟信号。当是模拟信号时,触觉效果控制装置106可包括模数转换器(ADC)以将接收到的模拟信号转换成数字信号。在图4的实施例中,可以通过报头来识别触觉触发消息并且从其提取有效的采样数据。在管脚PIN1上接收到的触觉触发消息可以被立即处理,例如解码,也可以存储在例如寄存器中以供后续处理。Fig. 4 shows a schematic diagram of receiving a haptic trigger message according to an embodiment of the present invention. In the example of FIG. 4 , the haptic trigger message including the haptic pattern code may be received on one data pin PIN1 of the haptic effect control device 106 , such as a driver chip. For example, based on the system clock signal SCL, the haptic effect control device 106 can perform signal sampling on the data pin PIN1 to read data thereon. It can be understood that the signal received on the data pin PIN1 may be a digital signal or an analog signal. When an analog signal, the haptic effect control device 106 may include an analog-to-digital converter (ADC) to convert the received analog signal into a digital signal. In the embodiment of FIG. 4 , the haptic trigger message can be identified by the header and valid sampling data can be extracted therefrom. The haptic trigger message received on the pin PIN1 can be processed immediately, such as decoded, and can also be stored, such as in a register, for subsequent processing.
图5示出根据本发明另一实施例的接收触觉触发消息的示意图。在图5的示例中,包括触觉模式编码的触觉触发消息可以在触觉效果控制装置106例如驱动芯片的多个数据管脚上接收,图5示出了两个数据接收管脚PIN1和PIN2。例如,可以基于系统时钟信号SCL,对数据接收管脚PIN1和PIN2进行信号采样,以读取在其上接收到的数据。可以理解,可以对这些管脚进行单次或者多次采样。例如,当在三个管脚上接收长度为3比特的触觉模式编码时,仅进行一次采样即可;当在三个管脚上接收长度为8比特的触觉模式编码时,则需要进行三次采样。在各个管脚上采样的数据可以按照预定义规则进行拼合,例如各个管脚上的数据按顺序依次拼合,或者交织拼合。无论是在单个还是多个管脚上接收触觉触发消息,因为采用了编码来指示不同的触觉模式,因此相对于传统的硬件管脚触发模式,本发明都能节省用于触发触觉效果的管脚数目。Fig. 5 shows a schematic diagram of receiving a haptic trigger message according to another embodiment of the present invention. In the example of FIG. 5 , the haptic trigger message including the haptic pattern code can be received on multiple data pins of the haptic effect control device 106 such as a driver chip. FIG. 5 shows two data receiving pins PIN1 and PIN2 . For example, signal sampling may be performed on the data receiving pins PIN1 and PIN2 based on the system clock signal SCL to read data received thereon. It can be understood that these pins can be sampled once or multiple times. For example, when receiving a 3-bit haptic pattern code on three pins, only one sample is required; when receiving an 8-bit haptic pattern code on three pins, three samples are required . The data sampled on each pin can be combined according to predefined rules, for example, the data on each pin can be combined sequentially or interleaved. Regardless of whether the haptic trigger message is received on a single or multiple pins, the present invention saves pins for triggering haptic effects compared to traditional hardware pin triggering modes, because encoding is used to indicate different haptic modes number.
图6示出根据本发明另一实施例的接收触觉触发消息的示意图。在图6的实施例中,还可以利用控制管脚Ctrl来控制对数据接收管脚PIN1的采样。也就是说,仅当控制管脚Ctrl被激活时,对单个或者多个数据接收管脚进行采样,这可以避免大量的无效采样,确保采样数据的有效性。例如,如图6所示,可以用高电平激活控制管脚Ctrl,在检测到管脚Ctrl上的上升沿信号之后的第二个系统时钟信号上升沿开始采样,在管脚Ctrl上的电平变为低电平时停止采样。控制管脚Ctrl的激活时长可以等于或大于数据管脚PIN1上的有效数据传输时长。此时,采样数据中的最高有效位MSB到最低有效位1的数据可以被视为有效数据,剩余的数据则可以被视为无效数据而丢弃。应理解,也可以用其他方式来激活控制管脚Ctrl,例如低电平激活、脉冲激活等。Fig. 6 shows a schematic diagram of receiving a haptic trigger message according to another embodiment of the present invention. In the embodiment of FIG. 6 , the control pin Ctrl can also be used to control the sampling of the data receiving pin PIN1 . That is, only when the control pin Ctrl is activated, one or more data receiving pins are sampled, which can avoid a large number of invalid samples and ensure the validity of the sampled data. For example, as shown in Figure 6, the control pin Ctrl can be activated with a high level, and sampling starts at the second rising edge of the system clock signal after the rising edge signal on the pin Ctrl is detected, and the voltage on the pin Ctrl Stop sampling when level goes low. The activation duration of the control pin Ctrl may be equal to or greater than the effective data transmission duration of the data pin PIN1. At this time, the data from the most significant bit MSB to the least significant bit 1 in the sampling data can be regarded as valid data, and the remaining data can be regarded as invalid data and discarded. It should be understood that the control pin Ctrl may also be activated in other ways, such as low-level activation, pulse activation, and the like.
图7示出根据本发明另一实施例的接收触觉触发消息的示意图。在图7的实施例中,可以在I2C(inter-integrated circuit)接口上接收触觉触发消息。 I2C接口是一种现有的双向接口,图7示出了利用其来接收触觉触发消息的信号时序图。参照图7,当系统时钟信号SCL为高电平时,数据管脚SDA上的电平发生变化,例如从高电平变为低电平时,数据传输开始。数据传输期间,数据管脚SDA上的数据脉冲宽度应大于系统时钟信号的脉冲宽度,即数据管脚SDA上的电平变化仅发生在系统时钟信号的低电平期间。如图7所示,在数据管脚SDA上可首先传输包括从设备(slave device)地址的8比特数据,即触觉效果控制装置106例如驱动芯片的地址,接着是读/写标记,这里示出的是低电平表示的写标记,表明数据传输是从主设备(master device)例如处理器101到从设备例如触觉效果控制装置106的写入操作。在接下来的一比特中,从设备可断言ACK信号以确认正确收到传输数据,然后主设备可以继续发送8比特的寄存器地址,并且从设备断言ACK以确认正确收到该寄存器地址。接着是传输写入到该寄存器地址的8比特数据,从设备同样可断言ACK以表明正确接收到该数据。这里,可以多次发送8比特的数据,其会继续写入到之前寄存器地址的下一个地址。最后,在系统时钟信号为高电平期间数据管脚SDA上的电平发生改变,表明数据传输结束。在图7所示的操作中,接收到的触觉触发消息被存储到指定的寄存器地址中。Fig. 7 shows a schematic diagram of receiving a haptic trigger message according to another embodiment of the present invention. In the embodiment of FIG. 7, the haptic trigger message may be received on an I2C (inter-integrated circuit) interface. The I2C interface is an existing bidirectional interface, and FIG. 7 shows a signal timing diagram for receiving a haptic trigger message using it. Referring to FIG. 7 , when the system clock signal SCL is at a high level, the level of the data pin SDA changes, for example, from a high level to a low level, and data transmission starts. During data transmission, the data pulse width on the data pin SDA should be greater than the pulse width of the system clock signal, that is, the level change on the data pin SDA only occurs during the low level period of the system clock signal. As shown in FIG. 7 , on the data pin SDA, 8-bit data including the address of the slave device (slave device) can be transmitted first, that is, the address of the tactile effect control device 106 such as the driver chip, followed by the read/write flag, as shown here is a write flag represented by a low level, indicating that the data transmission is a write operation from a master device (master device) such as the processor 101 to a slave device such as the haptic effect control device 106. In the next bit, the slave device can assert the ACK signal to confirm the correct receipt of the transfer data, then the master device can continue to send the 8-bit register address, and the slave device can assert the ACK to confirm the correct receipt of the register address. This is followed by the transfer of the 8-bit data written to the register address, the slave can also assert an ACK to indicate that the data was received correctly. Here, 8-bit data can be sent multiple times, and it will continue to be written to the next address of the previous register address. Finally, when the system clock signal is at a high level, the level of the data pin SDA changes, indicating that the data transmission ends. In the operation shown in FIG. 7 , the received haptic trigger message is stored into the specified register address.
在一些实施例中,I2C接口除了接收触觉触发消息之外,还可以被重用以接收用于驱动触觉效果输出器件107的驱动信号,其将在后面详细描述。这样,可以进一步节省触觉效果控制装置106的管脚数目,简化结构,便于封装和安装,并且节约成本。In some embodiments, in addition to receiving haptic trigger messages, the I2C interface can also be reused to receive driving signals for driving the haptic effect output device 107 , which will be described in detail later. In this way, the number of pins of the tactile effect control device 106 can be further saved, the structure can be simplified, packaging and installation can be facilitated, and cost can be saved.
在一些实施例中,还可以在I2S(inter-IC sound)接口上接收触觉触发消息,图8示出了这样的实施例。I2S接口是一种现有接口,其原本用于传输音频数据。如图8所示,I2S接口包括声道控制管脚LRCK,其上可接收声道时钟信号,图8示出了高电平指示左声道,低电平指示右声道。基于该声道控制信号,可以在数据管脚SDA上进行数据采集。例如,在声道控制信号上升沿之后的第二个系统时钟信号上升沿开始采集左声道数据,包括从最高位MSB到最低位1的数据;在声道控制信号下降沿之后的第二个系统时钟信号上升沿开始采集左声道数据,包括从最高位MSB到最低位1的数据。在本发明的实施例中,取决于触觉触发消息的长度和传输方案,其可以仅利用左声道传输,仅利用右声道传输,或者利用左声道和右声道二者传输。In some embodiments, the haptic trigger message may also be received on an I2S (inter-IC sound) interface, and FIG. 8 shows such an embodiment. The I2S interface is an existing interface that was originally used to transmit audio data. As shown in FIG. 8 , the I2S interface includes a channel control pin LRCK on which a channel clock signal can be received. FIG. 8 shows that a high level indicates the left channel, and a low level indicates the right channel. Based on the channel control signal, data acquisition can be performed on the data pin SDA. For example, the second rising edge of the system clock signal after the rising edge of the channel control signal starts to collect the data of the left channel, including data from the highest bit MSB to the lowest bit 1; after the second falling edge of the channel control signal The rising edge of the system clock signal starts to collect the data of the left channel, including the data from the highest bit MSB to the lowest bit 1. In an embodiment of the present invention, depending on the length and transmission scheme of the haptic trigger message, it may be transmitted using only the left channel, only the right channel, or both the left and right channels.
在一些实施例中,I2S接口除了接收触觉触发消息之外,还可以被重用 以接收用于驱动触觉效果输出器件107的驱动信号,其将在后面详细描述。这样,可以进一步节省触觉效果控制装置106的管脚数目,简化结构,便于封装和安装,并且节约成本。In some embodiments, in addition to receiving haptic trigger messages, the I2S interface can also be reused to receive driving signals for driving the haptic effect output device 107, which will be described in detail later. In this way, the number of pins of the tactile effect control device 106 can be further saved, the structure can be simplified, packaging and installation can be facilitated, and cost can be saved.
上面结合图4至图8描述了接收触觉触发消息的各种实施例。可以理解,本发明通过采用触觉模式编码,可以利用少量管脚(最少一个管脚)灵活地指示各种触觉模式,因此能够在基本不增大硬件设计复杂度的情况下,拓展应用各种触觉效果的灵活性。例如,可以针对各种事件定义和应用各种不同的触觉模式,从而改善用户体验。Various embodiments of receiving a haptic trigger message are described above with reference to FIGS. 4-8 . It can be understood that the present invention can use a small number of pins (at least one pin) to flexibly indicate various tactile modes by adopting tactile mode coding, so that various tactile modes can be expanded without increasing the complexity of hardware design. Effect flexibility. For example, various haptic patterns can be defined and applied for various events, thereby improving the user experience.
返回继续参照图2,在步骤S220中,可以对接收到的触觉触发消息进行解码,以确定其中包括的触觉模式编码指示的触觉模式。例如,解码可包括提取触觉触发消息中的预定位置和数量的比特,作为触觉模式编码。进一步在步骤S230中,可以确定与该触觉模式对应的触觉效果。触觉效果可由用于驱动触觉输出器件107例如线性马达的驱动信号来表示,驱动信号可以是例如三角波信号、锯齿波信号、正弦波信号、方波信号、不规则波形信号或者任意上述信号的组合,这些信号的频率和幅度被调制,从而在应用到触觉输出器件107时可以产生期望的触觉效果。多个驱动信号可以预先存储在预定的寄存器地址中,从外界接收到的实时驱动信号也可以被存储到预定的寄存器地址中。可以建立触觉模式编码和驱动信号的寄存器地址之间的映射关系,这种映射关系可以存储在例如查找表中。因此,当在步骤S220中解码了触觉模式编码后,可以使用该触觉模式编码来检索查找表以确定其对应的驱动信号的寄存器地址,从而确定与该触觉模式对应的触觉效果。Referring back to FIG. 2 , in step S220 , the received haptic trigger message may be decoded to determine the haptic mode indicated by the haptic mode code included therein. For example, decoding may include extracting a predetermined location and number of bits in the haptic trigger message as a haptic pattern code. Further in step S230, a haptic effect corresponding to the haptic pattern may be determined. The tactile effect can be represented by a drive signal for driving the tactile output device 107 such as a linear motor, and the drive signal can be, for example, a triangular wave signal, a sawtooth wave signal, a sine wave signal, a square wave signal, an irregular wave signal, or any combination of the above signals, The frequency and amplitude of these signals are modulated so that when applied to the haptic output device 107 a desired haptic effect can be produced. A plurality of driving signals can be pre-stored in a predetermined register address, and a real-time driving signal received from the outside can also be stored in a predetermined register address. A mapping relationship between the tactile pattern code and the register address of the driving signal can be established, and this mapping relationship can be stored in, for example, a look-up table. Therefore, after the haptic mode code is decoded in step S220, the haptic mode code can be used to search a lookup table to determine the register address of the corresponding driving signal, thereby determining the haptic effect corresponding to the haptic mode.
在一些实施例中,触觉效果控制装置106可以从外界接收用于产生期望触觉效果的实时驱动信号。例如,用户在玩游戏或看电影时,与游戏或电影的音频或视频对应的驱动信号可以被实时提供给触觉效果控制装置106以产生与音频或视频相配合的实施触觉效果。如上所述,触觉效果控制装置106可以通过I2C或I2S接口来接收实时驱动信号,并且接收到的实时驱动信号可以存储到寄存器的预定地址。如前所述,通过I2C或I2S接口接收触觉触发信号和驱动信号二者,能够进一步节省驱动芯片的管脚数,简化硬件结构,节省成本。在一些实施例中,可以将接收到的实时驱动信号存储到先入先出(FIFO)寄存器中,并且可以建立与实时驱动信号对应的触觉模式编码和该先入先出(FIFO)寄存器的读取地址之间的映射关系。当在步骤S220中解 码了触觉模式编码后,可以根据该映射关系来确定与实时驱动信号对应的FIFO寄存器地址,从而在后续步骤中使用该地址中暂时存储的实时驱动信号来驱动触觉输出器件107以产生触觉效果输出。可以理解,FIFO寄存器可以以异步模式操作,也就是说,FIFO寄存器的写入端和读取端可以与不同的时钟域相关联,从而数据读取频率可以不同于数据写入频率。因此,FIFO寄存器尤其适合于暂时存储实时驱动信号,使得实时驱动信号的读取频率不受写入频率限制,从而能够应用更灵活的数据读取时钟,提供更丰富的触觉效果输出。In some embodiments, the haptic effect control device 106 may receive a real-time driving signal for generating a desired haptic effect from the outside. For example, when a user is playing a game or watching a movie, a driving signal corresponding to the audio or video of the game or movie may be provided to the haptic effect control device 106 in real time to generate a haptic effect that matches the audio or video. As mentioned above, the haptic effect control device 106 can receive the real-time driving signal through the I2C or I2S interface, and the received real-time driving signal can be stored in the predetermined address of the register. As mentioned above, receiving both the tactile trigger signal and the driving signal through the I2C or I2S interface can further save the number of pins of the driver chip, simplify the hardware structure, and save costs. In some embodiments, the received real-time drive signal can be stored in a first-in-first-out (FIFO) register, and the tactile mode code corresponding to the real-time drive signal and the read address of the first-in-first-out (FIFO) register can be established mapping relationship between them. After the tactile mode code is decoded in step S220, the FIFO register address corresponding to the real-time driving signal can be determined according to the mapping relationship, so that the real-time driving signal temporarily stored in the address is used to drive the tactile output device 107 in subsequent steps To produce haptic effect output. It can be understood that the FIFO register can operate in an asynchronous mode, that is, the writing end and the reading end of the FIFO register can be associated with different clock domains, so that the data reading frequency can be different from the data writing frequency. Therefore, the FIFO register is especially suitable for temporarily storing the real-time driving signal, so that the reading frequency of the real-time driving signal is not limited by the writing frequency, so that a more flexible data reading clock can be applied to provide richer tactile effect output.
上面描述了可以在单个接口例如I2C或I2S接口上接收触觉触发消息和实时驱动信号二者。在一些实施例中,还可以在单个管脚上接收触觉触发消息和实时驱动信号,以进一步减少触觉效果控制装置106的管脚数,图9A至图9D示出了这样的实施例。It has been described above that both haptic trigger messages and real-time drive signals can be received on a single interface, such as an I2C or I2S interface. In some embodiments, the haptic trigger message and the real-time driving signal can also be received on a single pin to further reduce the pin count of the haptic effect control device 106 , such an embodiment is shown in FIGS. 9A to 9D .
首先参照图9A,可以在单个管脚上接收浮动电平,浮动电平的电平值可以在某个范围内浮动。在图9A所示的实施例中,浮动电平可以在第一浮动范围和第二浮动范围内浮动,并且第一浮动范围不同于第二浮动范围。举例而言,当系统提供的信号电平在例如0伏特至5伏特的范围内时,可以将例如0伏特作为闲置电平,将4伏特至5伏特的范围作为第一浮动范围,将大于0伏特且小于4伏特的范围作为第二浮动范围。Referring first to FIG. 9A , a floating level can be received on a single pin, and the level value of the floating level can float within a certain range. In the embodiment shown in FIG. 9A, the floating level can be floating within a first floating range and a second floating range, and the first floating range is different from the second floating range. For example, when the signal level provided by the system is in the range of 0 volts to 5 volts, for example 0 volts can be used as the idle level, and the range of 4 volts to 5 volts can be used as the first floating range, which will be greater than 0 Volts and less than 4 volts as the second floating range.
参照图9B,浮动电平可以由触觉效果控制装置106中的电平检测单元来检测和解码。例如,电平检测单元可以是模数转换器(ADC),其将浮动电平的采样值转换成预定比特数的数字编码。例如,8比特ADC可以将电平值转换成8比特的数字编码,编码值取决于浮动电平的采样值。Referring to FIG. 9B , the floating level may be detected and decoded by the level detection unit in the haptic effect control device 106 . For example, the level detection unit may be an analog-to-digital converter (ADC) that converts a floating-level sampling value into a digital code of a predetermined number of bits. For example, an 8-bit ADC can convert the level value into an 8-bit digital code, and the coded value depends on the sampling value of the floating level.
作为示例,第一浮动范围内的浮动电平可以用于表示在管脚上接收到的信号的报头部分,第二浮动范围内的浮动电平可以用于表示信号的载荷部分。也就是说,当电平检测单元产生的编码值对应于第一浮动范围时,将该编码值识别为报头编码;当电平检测单元产生的编码值对应于第二浮动范围时,将该编码值识别为信号载荷编码。报头部分可以用于指示信号载荷部分的内容,例如指示信号载荷部分包括触觉模式编码还是包括实时驱动信号编码。这样,可以在单个管脚上接收触觉触发消息和实时驱动信号两者。As an example, a floating level within a first floating range may be used to represent a header portion of a signal received on a pin, and a floating level within a second floating range may be used to represent a payload portion of a signal. That is to say, when the coded value produced by the level detection unit corresponds to the first floating range, the coded value is identified as header code; when the coded value produced by the level detection unit corresponds to the second floating range, the coded value The value identifies the encoded payload of the signal. The header portion may be used to indicate the content of the signal payload portion, eg, whether the signal payload portion includes haptic pattern encoding or real-time driving signal encoding. In this way, both haptic trigger messages and real-time drive signals can be received on a single pin.
图9C示出了在触觉效果控制装置106的单个管脚上接收到的信号的示意图。如图9C所示,开始时在该管脚上接收到的可以是闲置电平,然后接 收到的是在第一浮动范围内的电平值,其表示报头部分。接在报头部分后面的是表示信号载荷的编码电平,其在与第一浮动范围不同的第二浮动范围内,从而触觉效果控制装置106可以识别其为信号载荷而非报头。可以理解,触觉效果控制装置106中的电平检测单元可以在每个时间窗口内对编码电平进行一次或多次采样,当进行多次采样时,可以将其中任意一次采样或者多次采样的平均值作为该时间窗内的采样值输出。虽然未示出,但是对报头部分的电平采样也可以在预定时间窗内进行。当编码电平完毕之后,接收信号又变成闲置电平,此时触觉效果控制装置106可以确定该信号已经接收完毕。FIG. 9C shows a schematic diagram of signals received on a single pin of the haptic effect control device 106 . As shown in Figure 9C, initially an idle level may be received on the pin, followed by a level value within a first floating range, which represents the header portion. Following the header portion is an encoding level representing the signal payload, which is within a second floating range different from the first floating range, so that the haptic effect control device 106 can identify it as a signal payload rather than a header. It can be understood that the level detection unit in the haptic effect control device 106 can sample the encoding level once or multiple times in each time window, and when multiple sampling is performed, any one of the samples or the multiple sampling can be The average value is output as a sampled value within this time window. Although not shown, the level sampling of the header part may also be performed within a predetermined time window. After the encoding level is completed, the received signal becomes an idle level again, and at this time, the tactile effect control device 106 can determine that the signal has been received completely.
可以理解,在一些实施例中,报头部分也可以被省略。例如,可以直接对在触觉效果控制装置106的单个管脚上接收到的触觉触发消息进行解码。当触觉触发消息中包括的触觉模式编码指示实时驱动信号时,可以在该触觉触发消息后的预定时段内传输实时驱动信号。图9D示出了报头部分被省略时的消息结构,该消息结构的其他方面与图9C所示的消息类似,这里不再重复描述。It can be understood that in some embodiments, the header part can also be omitted. For example, haptic trigger messages received on a single pin of haptic effect control device 106 may be decoded directly. When the haptic mode code included in the haptic trigger message indicates the real-time driving signal, the real-time driving signal may be transmitted within a predetermined period after the haptic trigger message. FIG. 9D shows the message structure when the header part is omitted. Other aspects of the message structure are similar to the message shown in FIG. 9C , and will not be described again here.
在图9A-图9D的示例中,利用浮动电平,可以在触觉效果控制装置106的单个管脚上接收触觉触发消息和实时驱动信号二者,因此进一步减少了触觉效果控制装置106的管脚数。而且,由于浮动电平的每个采样值可以被解码成多比特编码,因此能以更高的效率传输消息编码。In the example of FIGS. 9A-9D , with floating levels, both the haptic trigger message and the real-time drive signal can be received on a single pin of the haptic effect control device 106, thus further reducing the pin count of the haptic effect control device 106. number. Furthermore, since each sample value of the floating level can be decoded into a multi-bit code, the message code can be transmitted with higher efficiency.
接下来在步骤S240中,可以驱动触觉输出器件107来输出所确定的触觉效果。例如,对于一些触觉模式,其驱动信号波形已经存储在一个或多个寄存器位置中,此时在步骤S240中,可以直接使用这些寄存器位置中的驱动信号数据来驱动触觉输出器件107以输出期望的触觉效果。对于一些模式,可能需要使用外界实时提供的驱动信号来产生触觉效果。例如,一些视频游戏、应用程序或者影音作品可能包括自定义的触觉效果数据(即驱动信号),此时可以将该触觉效果数据提供给触觉效果控制装置106,触觉效果控制装置106可以使用该触觉效果数据驱动触觉输出器件107以即时(real time)输出期望的触觉效果。如前所述,该触觉效果数据可以通过I2C接口连续写入到先入先出(FIFO)寄存器中,从该FIFO寄存器输出的信号被用于驱动触觉输出器件107,从而实现该触觉效果的实时输出。再例如,在一些模式中,例如在播放音乐时,期望随着音乐的旋律和/或幅度产生对应的触觉效果例如振动,此时音频信号可通过I2S接口被提供给触觉效果控制装置106。 触觉效果控制装置106可以用该音频信号驱动触觉输出器件107以产生与音频对应的触觉效果,又或者,触觉效果控制装置106可以先用算法对音频数据进行处理,根据频率、幅度等特征提取其中的特定音频成分,例如鼓点信号,然后用提取的信号来驱动触觉输出器件107以产生与该特定音频成分例如鼓点对应的触觉效果。同样,触觉效果控制装置106也可以将接收到的用于实时驱动触觉输出器件107的音频信号存储在FIFO寄存器中。如前所述,用于接收实时触觉效果数据的I2C接口和/或I2S接口可以重用关于图7和图8描述的用于接收触觉触发消息的I2C接口和/或I2S接口,而不需要单独的接口,因此可以进一步节省触觉效果控制装置106管脚数目,简化其硬件结构,便于封装和安装。Next in step S240, the haptic output device 107 may be driven to output the determined haptic effect. For example, for some tactile modes, the drive signal waveforms have been stored in one or more register positions, at this time, in step S240, the drive signal data in these register positions can be directly used to drive the tactile output device 107 to output the desired tactile effect. For some modes, it may be necessary to use driving signals provided by the outside world in real time to generate haptic effects. For example, some video games, application programs, or audio-visual works may include custom haptic effect data (ie, driving signals), and at this time, the haptic effect data can be provided to the haptic effect control device 106, and the haptic effect control device 106 can use the haptic effect control device 106. The effect data drives the haptic output device 107 to output the desired haptic effect in real time. As mentioned above, the haptic effect data can be continuously written into the first-in-first-out (FIFO) register through the I2C interface, and the signal output from the FIFO register is used to drive the haptic output device 107, thereby realizing the real-time output of the haptic effect . For another example, in some modes, such as when playing music, it is desired to generate a corresponding haptic effect such as vibration along with the melody and/or amplitude of the music, at this time the audio signal can be provided to the haptic effect control device 106 through the I2S interface. The tactile effect control device 106 can use the audio signal to drive the tactile output device 107 to generate a tactile effect corresponding to the audio, or, the tactile effect control device 106 can first process the audio data with an algorithm, and extract the audio data according to characteristics such as frequency and amplitude. specific audio component, such as a drum signal, and then use the extracted signal to drive the haptic output device 107 to generate a haptic effect corresponding to the specific audio component, such as a drum. Likewise, the haptic effect control device 106 may also store the received audio signal for real-time driving of the haptic output device 107 in the FIFO register. As previously mentioned, the I2C interface and/or I2S interface for receiving real-time haptic effect data can reuse the I2C interface and/or I2S interface for receiving haptic trigger messages described with respect to FIGS. 7 and 8 without requiring a separate Therefore, the number of pins of the tactile effect control device 106 can be further saved, its hardware structure can be simplified, and packaging and installation can be facilitated.
上面描述了利用编码来触发和输出触觉效果的过程。可以理解,利用本发明的方案,使用少量管脚即可实现针对许多种事件定义的多种触觉模式和效果,提高用户的使用体验。但是本发明人还意识到,随着触觉模式数量的急剧增多,可能会出现多种模式之间的交叠和冲突。例如,电子设备100可能会同时触发多个触觉模式,因此如何正确、有序地输出这些触觉模式对应的触觉效果,也成为一个问题。针对该问题,本发明一实施例进一步提出一种方案,如图9所示,在步骤S210中接收的触觉触发消息除了包括触觉模式编码之外,还可以包括与该触觉模式相关联的优先级编码,其在图9中示为P比特数据,其中P可以是大于或等于1的正整数。优先级编码可以位于其对应的触觉模式编码后面,也可以位于其前面。以2比特(P=2)的优先级编码为例,“00”可以对应于最低优先级,“11”可以对应于最高优先级。可以根据各种事件的重要性来分配优先级,例如收到语音呼叫的优先级最高,收到短信或者闹钟到期的优先级次之,触碰虚拟键盘的按键的优先级最低等等。应理解,这仅是示例,实际应用时可以对各种事件灵活地定义其对应的优先级。不同的事件可能触发相同或者不同的触觉模式编码,相同的触觉模式编码可能因为被不同的事件触发而可能具有不同的优先级水平。电子设备100的处理器在检测到预定事件时,可以确定对应的触觉模式,并且为该模式灵活分配相应的优先级,该优先级可以反映该事件的紧急和/或重要程度。包括触觉模式编码和优先级编码的触觉触发消息的传输可以如上面参照图4-8描述的那样,这里不再重复描述。The process of triggering and outputting haptic effects using coding is described above. It can be understood that with the solution of the present invention, various tactile modes and effects defined for various events can be realized by using a small number of pins, thereby improving user experience. However, the inventors also realized that with the sharp increase in the number of tactile modes, overlapping and conflicts between multiple modes may occur. For example, the electronic device 100 may trigger multiple haptic modes at the same time, so how to correctly and orderly output the haptic effects corresponding to these haptic modes also becomes a problem. To solve this problem, an embodiment of the present invention further proposes a solution. As shown in FIG. 9 , the tactile trigger message received in step S210 may include not only the tactile mode code, but also the priority associated with the tactile mode. Encoding, which is shown as P-bit data in FIG. 9 , where P can be a positive integer greater than or equal to 1. Priority codes can either follow or precede their corresponding haptic mode codes. Taking 2-bit (P=2) priority encoding as an example, "00" may correspond to the lowest priority, and "11" may correspond to the highest priority. Priorities can be assigned according to the importance of various events, for example, receiving a voice call has the highest priority, receiving a text message or an alarm clock has expired has the second priority, touching a key on the virtual keyboard has the lowest priority, and so on. It should be understood that this is only an example, and the corresponding priorities of various events can be flexibly defined in practical applications. Different events may trigger the same or different haptic pattern codes, and the same haptic pattern code may have different priority levels because it is triggered by different events. When the processor of the electronic device 100 detects a predetermined event, it can determine a corresponding tactile pattern, and flexibly assign a corresponding priority to the pattern, and the priority can reflect the urgency and/or importance of the event. The transmission of the haptic trigger message including the haptic mode code and the priority code can be as described above with reference to FIGS. 4-8 , and the description will not be repeated here.
可以理解,相应地,在图2所示的步骤S220中可以解码该优先级。进 而,在步骤S240之前,方法200还可以包括基于优先级来确定是否输出和如何输出与该优先级相关的触觉效果。例如,当具有低优先级的触觉效果与具有高优先级的触觉效果在时间上重叠时,可以忽略低优先级的触觉效果而仅输出高优先级的触觉效果,或者按优先级从高到低的顺序依次输出这些触觉效果。因此,本发明通过为各个触觉模式分配优先级,能够更灵活地控制各种触觉效果的输出,避免其相互冲突和干扰。关于优先级编码的应用,将在下面的实施例中更详细地进行描述。It can be understood that correspondingly, the priority can be decoded in step S220 shown in FIG. 2 . Furthermore, before step S240, the method 200 may further include determining whether to output and how to output a haptic effect related to the priority based on the priority. For example, when a haptic effect with low priority overlaps with a haptic effect with high priority in time, the haptic effect with low priority can be ignored and only the haptic effect with high priority can be output, or the priority can be changed from high to low The order in which these haptic effects are output sequentially. Therefore, the present invention can more flexibly control the output of various haptic effects by assigning priorities to each haptic mode, and avoid conflict and interference between them. The application of priority coding will be described in more detail in the following embodiments.
图10示出根据本发明一实施例的触觉效果控制装置300的示意性框图。可以理解,触觉效果控制装置300可用作上面描述的电子设备100中的触觉效果控制装置106,并且其功能和操作已经在上面参照图1-9进行了详细描述,因此下面仅简单说明。Fig. 10 shows a schematic block diagram of a haptic effect control device 300 according to an embodiment of the present invention. It can be understood that the haptic effect control device 300 can be used as the haptic effect control device 106 in the electronic device 100 described above, and its function and operation have been described in detail above with reference to FIGS. 1-9 , so only a brief description is given below.
参照图10,触觉效果控制装置300可包括输入单元301、存储器302、解码单元303、触觉效果确定单元304和驱动单元305。Referring to FIG. 10 , the haptic effect control device 300 may include an input unit 301 , a memory 302 , a decoding unit 303 , a haptic effect determining unit 304 and a driving unit 305 .
输入单元301可包括用于接收触觉触发消息的管脚或接口,例如I2C和/或I2S接口。如前所述,其接收的触觉触发消息可包括触觉模式编码和可选的优先级编码,触觉模式编码指示多种预定触觉模式中的一种,优先级编码指示该触觉模式的优先级。The input unit 301 may include pins or interfaces for receiving haptic trigger messages, such as I2C and/or I2S interfaces. As mentioned above, the received haptic trigger message may include a haptic mode code and an optional priority code, the haptic mode code indicates one of various predetermined haptic modes, and the priority code indicates the priority of the haptic mode.
存储器302可用于存储接收到的触觉触发消息中的触觉模式编码和优先级编码,并且还可以用于存储其他数据,包括但不限于正在输出和待输出的触觉效果相关的数据例如触觉模式编码、优先级编码、驱动信号数据,以及触觉模式和触觉效果之间的映射关系等。存储器302还可用于存储与触觉反馈相关的任何其他数据。The memory 302 can be used to store the haptic mode code and priority code in the received haptic trigger message, and can also be used to store other data, including but not limited to data related to the haptic effect being output and to be output such as haptic mode code, Priority encoding, driving signal data, and the mapping relationship between haptic modes and haptic effects, etc. Memory 302 may also be used to store any other data related to haptic feedback.
解码单元303可对接收到的触觉触发消息进行解码以确定其中编码的触觉模式和其对应的优先级。The decoding unit 303 can decode the received haptic trigger message to determine the encoded haptic pattern and its corresponding priority.
触觉效果确定单元304可以确定与解码确定的触觉模式对应的触觉效果。在一些实施例中,当多个触觉模式在时间上交叠或冲突时,触觉效果确定单元304还可以基于各个触觉模式的优先级来确定是否输出该触觉模式的触觉效果。例如,触觉效果确定单元304可以确定输出高优先级的触觉模式,而忽略低优先级的触觉模式。The haptic effect determining unit 304 may determine a haptic effect corresponding to the decoded determined haptic pattern. In some embodiments, when multiple haptic patterns overlap or conflict in time, the haptic effect determining unit 304 may also determine whether to output the haptic effect of the haptic pattern based on the priority of each haptic pattern. For example, the haptic effect determining unit 304 may determine to output a high-priority haptic pattern while ignoring a low-priority haptic pattern.
驱动单元305可以根据所确定的触觉效果来驱动触觉输出器件。触觉效果由相应的驱动信号波形表示,其可以是预先存储在存储器中的驱动信号波 形,也可以是从外界实时收到的驱动信号波形。使用该驱动信号波形来驱动一个或多个触觉输出器件,从而实现期望的触觉效果。在一些实施例中,可以重用用于接收触觉触发消息的接收单元301的管脚或接口例如I2C和/或I2S接口来接收表示触觉效果的驱动信号波形。The driving unit 305 may drive the haptic output device according to the determined haptic effect. The tactile effect is represented by the corresponding driving signal waveform, which can be the driving signal waveform pre-stored in the memory, or the driving signal waveform received in real time from the outside. The driving signal waveform is used to drive one or more tactile output devices, so as to achieve a desired tactile effect. In some embodiments, pins or interfaces of the receiving unit 301 for receiving haptic trigger messages, such as I2C and/or I2S interfaces, can be reused to receive driving signal waveforms representing haptic effects.
如前所述,在一些情况下,电子设备100运行的操作系统可执行多个并行任务,这些并行任务可能会同时或在短时间内触发多个不同的触觉效果,而触觉输出器件107在一时刻只能输出一种预定触觉效果。因此,当触觉效果控制芯片106在短时间内连续收到多个触觉触发消息时,如何适当地处理这些触觉触发消息就成为一个问题。图11示出根据本发明另一实施例的触觉效果控制方法400的流程图。可以理解,图11所示的方法400可以由例如图1所示的电子设备100中的触觉效果控制装置106执行。As mentioned above, in some cases, the operating system running on the electronic device 100 can execute multiple parallel tasks, and these parallel tasks may trigger multiple different haptic effects at the same time or within a short period of time, and the haptic output device 107 operates in one Only one predetermined haptic effect can be output at any time. Therefore, when the haptic effect control chip 106 receives multiple haptic trigger messages continuously within a short period of time, how to properly process these haptic trigger messages becomes a problem. FIG. 11 shows a flowchart of a haptic effect control method 400 according to another embodiment of the present invention. It can be understood that the method 400 shown in FIG. 11 may be executed, for example, by the haptic effect control apparatus 106 in the electronic device 100 shown in FIG. 1 .
参照图11,在步骤S410,触觉效果控制装置106可以接收第一触觉触发消息。如前所述,当处理器101检测到与触觉效果相关联的预定事件时,可以生成并且向触觉效果控制装置106发送触觉触发消息。如前所述,处理器101生成的触觉触发消息可以包括用于标识该消息的报头和用于指示多种预定触觉模式中的一种的触觉模式编码,其中触觉模式对应于特定的触觉效果,即用于驱动触觉输出器件107以产生触觉效果的特定驱动信号。此外,触觉触发消息还可以包括优先级编码,其指示对应的触觉模式的优先级,即输出与该触觉模式对应的触觉效果的优先级。在步骤S410,触觉效果控制装置106接收到的第一触觉触发消息可包括第一触觉模式编码和第一优先级编码。Referring to FIG. 11 , in step S410, the haptic effect control device 106 may receive a first haptic trigger message. As mentioned above, when a predetermined event associated with a haptic effect is detected by the processor 101 , a haptic trigger message may be generated and sent to the haptic effect control device 106 . As mentioned above, the haptic trigger message generated by the processor 101 may include a header for identifying the message and a haptic mode code for indicating one of a plurality of predetermined haptic modes, wherein the haptic mode corresponds to a specific haptic effect, That is, a specific driving signal for driving the tactile output device 107 to generate a tactile effect. In addition, the haptic trigger message may further include a priority code, which indicates the priority of the corresponding haptic mode, that is, the priority of outputting the haptic effect corresponding to the haptic mode. In step S410, the first haptic trigger message received by the haptic effect control device 106 may include a first haptic mode code and a first priority code.
响应于接收到第一触觉触发消息,在步骤S420,触觉效果控制装置106可以启动定时器T。可以理解,在步骤S410中接收到第一触觉触发消息时,定时器T尚未启动。如果在接收到第一触觉触发消息时定时器T已经启动,也就是说在定时器T运行期间收到触觉触发消息,那么对该触觉触发消息的处理可以如下面关于收到第二触觉触发消息所描述的那样。定时器T可以有预设的时长,例如0.1秒、0.5秒、1秒或者2秒等,可以根据具体应用来设定。通过下面的详细描述可以理解,在定时器T的运行期间(即,到期之前)收到的多个触觉触发消息可以被视为同时触发的触觉触发消息。In response to receiving the first haptic trigger message, the haptic effect control device 106 may start the timer T at step S420. It can be understood that when the first haptic trigger message is received in step S410, the timer T has not been started yet. If the timer T has been started when the first haptic trigger message is received, that is to say, the haptic trigger message is received during the running of the timer T, then the processing of the haptic trigger message can be as follows regarding the receipt of the second haptic trigger message as described. The timer T can have a preset duration, such as 0.1 second, 0.5 second, 1 second or 2 seconds, etc., which can be set according to specific applications. As can be understood from the detailed description below, multiple haptic trigger messages received during the running of the timer T (ie, before expiration) can be regarded as simultaneously triggered haptic trigger messages.
继续参照图11,在步骤S430中,在已启动的定时器T到期之前,触觉效果控制装置106接收到第二触觉触发消息,其可包括指示第二触觉模式的 第二触觉模式编码和指示第二触觉模式的优先级的第二优先级编码。可以理解,在定时器T到期之前,触觉效果控制装置106可能会接收到多个触觉触发消息,例如处理器101在该时段期间响应于各种事件而产生的多个触觉触发消息,这些触觉触发消息都可以根据这里关于第二触觉触发消息描述的步骤来进行处理。Continuing to refer to FIG. 11 , in step S430, before the timer T that has been started expires, the haptic effect control device 106 receives a second haptic trigger message, which may include a second haptic mode code indicating the second haptic mode and an indication A second priority encoding for the priority of the second haptic mode. It can be understood that before the timer T expires, the haptic effect control device 106 may receive a plurality of haptic trigger messages, for example, a plurality of haptic trigger messages generated by the processor 101 in response to various events during this period, these haptic Both trigger messages may be processed according to the steps described herein for the second haptic trigger message.
图12示出了在定时器运行期间接收到触觉触发消息的示意图。参照图12,在T1时刻收到第一触觉触发消息,此时响应于第一触觉触发消息启动定时器T,其具有预定时长T timer。在定时器T到期之前的T2和T3时刻(T2-T1<T timer,T3-T1<T timer),分别接收到第二触觉触发消息和第三触觉触发消息。在定时器T到期之后的T4时刻(T4-T1>T timer),接收到第四触觉触发消息。此时,将第一、第二和第三触觉触发消息视为同时收到的触觉触发消息,执行这里描述的操作;而当收到第四触觉触发消息时,其又会重新启动定时器T,也就是说,对第四触觉触发消息的处理与这里关于第一触觉触发消息描述的处理类似。为了简单和描述方便,这里仅关于第一触觉触发消息和第二触觉触发消息描述了相应的处理步骤,但是应理解,在定时器T运行期间接收到的第三触觉触发消息甚至更多触觉触发消息可以同样进行这里描述的处理步骤,其在权利要求定义的本发明的保护范围内。 Fig. 12 shows a schematic diagram of receiving a haptic trigger message during the running of the timer. Referring to FIG. 12 , the first haptic trigger message is received at time T1 , and a timer T is started in response to the first haptic trigger message, which has a predetermined duration T timer . At time T2 and T3 (T2-T1<T timer , T3-T1<T timer ) before the timer T expires, the second haptic trigger message and the third haptic trigger message are respectively received. At time T4 (T4-T1>T timer ) after the timer T expires, a fourth haptic trigger message is received. At this time, the first, second and third haptic trigger messages are regarded as simultaneously received haptic trigger messages, and the operations described here are performed; and when the fourth haptic trigger message is received, it restarts the timer T , that is, the processing of the fourth haptic trigger message is similar to the processing described herein for the first haptic trigger message. For the sake of brevity and convenience of description, only the corresponding processing steps of the first haptic trigger message and the second haptic trigger message are described here, but it should be understood that the third haptic trigger message received during the running of the timer T even more haptic trigger messages Messages can also undergo the processing steps described here, which are within the scope of the invention as defined in the claims.
继续参照图11,在步骤S440中,可以基于在步骤S410中接收到的第一触觉模式和第一优先级以及在步骤S430中接收到的第二触觉模式和第二优先级,确定待输出的触觉模式。可以理解,第一触觉模式和第二触觉模式有可能相同,例如不同的事件对应于相同的触觉效果输出,或者用户在短时间内执行了相同事件多次从而触发多次触觉效果输出。此时,由于彼此相同的第一和第二触觉模式在短时间内同时触发并且对应于相同的触觉效果输出,因此可以仅输出其对应的触觉效果一次。在步骤S440中,可以选择优先级高的触觉模式,而忽略优先级低的触觉模式。当第一触觉模式的第一优先级与第二触觉模式的第二优先级也相同时,可以选择输出第一触觉模式和第二触觉模式中的任一个而忽略另一个,因为二者实质上是完全相同的。Continuing to refer to FIG. 11 , in step S440, based on the first haptic pattern and the first priority received in step S410 and the second haptic pattern and the second priority received in step S430, it may be determined to be output Tactile mode. It can be understood that the first haptic pattern and the second haptic pattern may be the same, for example, different events correspond to the same haptic effect output, or the user executes the same event multiple times in a short time to trigger multiple haptic effect outputs. At this time, since the first and second haptic patterns identical to each other are simultaneously triggered within a short time and correspond to the output of the same haptic effect, their corresponding haptic effects may be output only once. In step S440, a haptic mode with a high priority may be selected, and a haptic mode with a low priority may be ignored. When the first priority of the first haptic mode is also the same as the second priority of the second haptic mode, either one of the first haptic mode and the second haptic mode may be selected to be output while ignoring the other, because both are essentially are exactly the same.
在更一般的情况下,第一触觉模式和第二触觉模式可能并不相同。此时,则可以基于第一优先级和第二优先级,来确定输出哪个或哪些触觉模式,图13示出了这样的过程500的示例。参照图13,在步骤510中,可以通过比较来确定第一优先级是高于、等于还是低于第二优先级。如果第一优先级高 于第二优先级,则执行步骤520,确定所述第一触觉模式为待输出的触觉模式,并且忽略所述第二触觉模式;如果第一优先级低于第二优先级,则执行步骤530,确定第二触觉模式为待输出的触觉模式,并且忽略第一触觉模式;如果第一优先级等于第二优先级,则执行步骤540,确定第一触觉模式和第二触觉模式中的一个为待输出的触觉模式,并且忽略另一个。在步骤540中,例如可以选择先触发的触觉模式,或者选择后触发的触觉模式,这可以根据具体应用来确定。In a more general case, the first haptic pattern and the second haptic pattern may not be the same. At this point, it may be determined which haptic pattern or modes to output based on the first priority and the second priority, and FIG. 13 shows an example of such a process 500 . Referring to FIG. 13, in step 510, it may be determined by comparison whether the first priority is higher than, equal to, or lower than the second priority. If the first priority is higher than the second priority, execute step 520, determine the first haptic pattern as the haptic pattern to be output, and ignore the second haptic pattern; if the first priority is lower than the second priority level, execute step 530, determine the second haptic pattern as the haptic pattern to be output, and ignore the first haptic pattern; if the first priority is equal to the second priority, execute step 540, determine the first haptic pattern and the second One of the haptic patterns is the haptic pattern to be output, and the other is ignored. In step 540, for example, the haptic mode triggered first may be selected, or the haptic mode triggered later may be selected, which may be determined according to specific applications.
本发明人意识到,在图13所示的仅基于第一和第二优先级来选择要输出的触觉模式时,虽然能解决同时触发多个触觉效果引起的混乱或冲突问题,但是在某些特定情况下也可能会有所不足。例如,当都很重要的两个事件例如闹铃到期事件和收到语音呼叫事件被同时触发时,忽略其中任何一个的触觉效果输出可能都是不期望的。因此,在步骤S440中,还可以引入一预定优先级阈值来确定待输出的触觉模式,图14示出了这样的过程600的示例。参照图14,在步骤610中,可以通过比较来确定第一优先级是高于、等于还是低于第二优先级。如果第一优先级高于第二优先级,则在步骤620a中,继续比较第二优先级是否大于或等于一预定阈值。如果第二优先级大于或等于预定阈值,则表明第一触觉模式和第二触觉模式二者都很重要,因此在步骤630中,可以确定第一触觉模式和第二触觉模式都为待输出的触觉模式,并且按优先级顺序确定第一触觉模式和第二触觉模式的输出时序,即第一触觉模式的输出定时在第二触觉模式之前。这样,可以在例如语音呼叫对应的触觉效果输出结束之后,或者在用户完成语音通信之后,再输出与闹钟到期事件对应的触觉效果,以提醒用户闹钟到期,而不会使用户遗漏重要事件。如果第二优先级低于预定阈值,则表明第二触觉模式并不重要,因此在步骤640中,可以确定优先级更高的第一触觉模式为待输出的触觉模式,而忽略第二触觉模式。The inventors have realized that when the haptic patterns to be output are selected based only on the first and second priorities as shown in FIG. It may also be insufficient in certain circumstances. For example, when two events that are both important, such as an alarm expiry event and a voice call received event, are triggered simultaneously, it may not be desirable to ignore the output of a haptic effect for either of them. Therefore, in step S440 , a predetermined priority threshold may also be introduced to determine the tactile pattern to be output, and FIG. 14 shows an example of such a process 600 . Referring to FIG. 14, in step 610, it may be determined by comparison whether the first priority is higher than, equal to, or lower than the second priority. If the first priority is higher than the second priority, then in step 620a, continue to compare whether the second priority is greater than or equal to a predetermined threshold. If the second priority is greater than or equal to the predetermined threshold, it indicates that both the first haptic pattern and the second haptic pattern are important, so in step 630, it can be determined that both the first haptic pattern and the second haptic pattern are to be output haptic mode, and determine the output timing of the first haptic mode and the second haptic mode in order of priority, that is, the output timing of the first haptic mode is before the second haptic mode. In this way, for example, after the output of the haptic effect corresponding to the voice call ends, or after the user completes the voice communication, the haptic effect corresponding to the alarm clock expiration event can be output to remind the user that the alarm clock is due without causing the user to miss important events . If the second priority is lower than the predetermined threshold, it indicates that the second haptic mode is not important, so in step 640, the first haptic mode with higher priority may be determined as the haptic mode to be output, and the second haptic mode is ignored .
类似地,如果第一优先级低于第二优先级,则在步骤620b中,继续比较第一优先级是否大于或等于预定阈值。如果第一优先级大于或等于预定阈值,则表明第一触觉模式和第二触觉模式二者都很重要,因此在步骤650中,可以确定第一触觉模式和第二触觉模式都为待输出的触觉模式,并且按优先级顺序确定第一触觉模式和第二触觉模式的输出时序,即第一触觉模式的输出定时在第二触觉模式之后。如果第一优先级低于预定阈值,则表明第一触 觉模式并不重要,因此在步骤660中,可以确定第二触觉模式为待输出的触觉模式,并且忽略第一触觉模式。Similarly, if the first priority is lower than the second priority, then in step 620b, continue to compare whether the first priority is greater than or equal to a predetermined threshold. If the first priority is greater than or equal to the predetermined threshold, it indicates that both the first haptic pattern and the second haptic pattern are important, so in step 650, it can be determined that both the first haptic pattern and the second haptic pattern are to be output haptic mode, and determine the output timing of the first haptic mode and the second haptic mode in order of priority, that is, the output timing of the first haptic mode is after the second haptic mode. If the first priority is lower than the predetermined threshold, it indicates that the first haptic mode is not important, so in step 660, it may be determined that the second haptic mode is the haptic mode to be output, and the first haptic mode is ignored.
如果第一优先级等于第二优先级,则在步骤620c中,继续比较第一/二优先级是否大于或等于预定阈值。如果两者都大于或等于预定阈值,则在步骤670中可以确定第一触觉模式和第二触觉模式均为待输出的触觉模式,并且可以按例如触发时间顺序确定第一触觉模式和第二触觉模式的输出时序,即第一触觉模式的输出定时在第二触觉模式之前。如果第一优先级和第二优先级两者都低于预定阈值,则在步骤680中可以确定第一触觉模式和第二触觉模式中的任一个为待输出的触觉模式,并且忽略另外一个,或者也可以忽略第一触觉模式和第二触觉模式两者。If the first priority is equal to the second priority, then in step 620c, continue to compare whether the first/second priority is greater than or equal to a predetermined threshold. If both are greater than or equal to the predetermined threshold, then in step 670 it can be determined that both the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the first haptic pattern and the second haptic pattern can be determined in order of, for example, trigger time. The output timing of the modes, that is, the output timing of the first haptic mode is before the second haptic mode. If both the first priority and the second priority are lower than the predetermined threshold, in step 680, either one of the first haptic pattern and the second haptic pattern may be determined to be the haptic pattern to be output, and the other one may be ignored, Alternatively, both the first haptic pattern and the second haptic pattern can be ignored.
继续参照图11,通过上面的步骤,确定了要输出的一个或多个触觉模式。然后在步骤S450,在定时器T到期之后,可以指示触觉输出器件107(见图1)输出所确定的待输出的触觉模式。如前所述,触觉模式对应于存储在预定的寄存器地址中的驱动信号,其可以用于驱动触觉输出器件107以产生期望的触觉效果输出。在步骤S450中,触觉效果控制装置106可以根据触觉模式编码与存储驱动信号的寄存器地址之间的映射关系,确定与待输出的触觉模式对应的驱动信号,并且用其驱动触觉输出器件107以产生期望的触觉效果输出。在一些实施例中,触觉效果控制装置106还可以建立一触觉模式输出列表,将所确定的待输出的触觉模式编码按时序插入到该列表中,从而可以按顺序输出对应的触觉效果。例如,该列表可包括当前正在输出的触觉模式,以及后面按顺序排列的一个或多个待输出的触觉模式。在当前正在输出的触觉模式执行完毕或者被取消时,可以从所述触觉模式输出列表删除该触觉模式,并且执行下一个待输出的触觉模式,直到全部触觉模式都被输出为止。关于触觉模式输出列表,将在下面的实施例中进一步详细描述。Continuing to refer to FIG. 11 , through the above steps, one or more haptic patterns to be output are determined. Then in step S450, after the timer T expires, the haptic output device 107 (see FIG. 1 ) may be instructed to output the determined haptic pattern to be output. As mentioned before, the haptic mode corresponds to the drive signal stored in a predetermined register address, which can be used to drive the haptic output device 107 to produce a desired haptic effect output. In step S450, the haptic effect control device 106 can determine the driving signal corresponding to the haptic pattern to be output according to the mapping relationship between the haptic pattern code and the register address storing the driving signal, and use it to drive the haptic output device 107 to generate Desired haptic effect output. In some embodiments, the haptic effect control device 106 can also create a haptic pattern output list, and insert the determined haptic pattern codes to be output into the list in time sequence, so that the corresponding haptic effects can be output in sequence. For example, the list may include a haptic pattern currently being output, and one or more haptic patterns to be outputted in sequence. When the currently output haptic pattern is finished or canceled, the haptic pattern may be deleted from the haptic pattern output list, and the next haptic pattern to be output is executed until all the haptic patterns are output. Regarding the tactile pattern output list, it will be further described in detail in the following embodiments.
图15示出根据本发明一实施例的触觉效果控制装置700的示意性功能框图。可以理解,图15所示的触觉效果控制装置700中的各个功能模块可以通过软件、硬件或者固件的方式实现,并且可以实施在上面描述的电子设备100中的触觉效果控制装置106中或者作为其一部分。图15所示的触觉效果控制装置700中的各个功能模块的相关功能和操作已经在上面参照图11-14进行了详细的描述,因此下面仅简单说明。FIG. 15 shows a schematic functional block diagram of a haptic effect control device 700 according to an embodiment of the present invention. It can be understood that each functional module in the tactile effect control device 700 shown in FIG. part. The relevant functions and operations of each functional module in the haptic effect control device 700 shown in FIG. 15 have been described in detail above with reference to FIGS. 11-14 , so only a brief description will be given below.
参照图15,触觉效果控制装置700可包括第一接收单元710,用于接收 第一触觉触发消息,所述第一触觉触发消息包括指示第一触觉模式的第一触觉模式编码和指示所述第一触觉模式的第一优先级的第一优先级编码。Referring to FIG. 15 , the haptic effect control device 700 may include a first receiving unit 710 for receiving a first haptic trigger message, the first haptic trigger message including a first haptic mode code indicating a first haptic mode and indicating the first haptic mode code. A first priority code for the first priority of a haptic mode.
触觉效果控制装置700还可包括定时器控制单元720,用于响应于接收到所述第一触觉触发消息,启动定时器。The haptic effect control apparatus 700 may further include a timer control unit 720, configured to start a timer in response to receiving the first haptic trigger message.
触觉效果控制装置700还可包括第二接收单元730,用于在所述定时器到期之前,接收第二触觉触发消息,所述第二触觉触发消息包括指示第二触觉模式的第二触觉模式编码和指示所述第二触觉模式的第二优先级的第二优先级编码。The haptic effect control device 700 may further include a second receiving unit 730, configured to receive a second haptic trigger message before the timer expires, the second haptic trigger message including a second haptic pattern indicating the second haptic pattern A code and a second priority code indicating a second priority of the second haptic mode.
触觉效果控制装置700还可包括确定单元740,用于基于所述第一触觉模式和第一优先级以及所述第二触觉模式和第二优先级,确定待输出的触觉模式。例如,当所述第一触觉模式与所述第二触觉模式相同时,如果所述第一优先级与所述第二优先级相同,则选择所述第一触觉模式和所述第二触觉模式之一并且忽略另一个;如果所述第一优先级与所述第二优先级不同,则选择具有较高优先级的触觉模式,忽略具有较低优先级的触觉模式。当所述第一触觉模式与所述第二触觉模式不同时:如果所述第一优先级高于所述第二优先级,则确定所述第一触觉模式为待输出的触觉模式,并且忽略所述第二触觉模式;如果所述第一优先级低于所述第二优先级,则确定所述第二触觉模式为待输出的触觉模式,并且忽略所述第一触觉模式;或者如果所述第一优先级等于所述第二优先级,则确定所述第一触觉模式和所述第二触觉模式中的一个为待输出的触觉模式,并且忽略所述第一触觉模式和所述第二触觉模式中的另一个。又例如,当所述第一触觉模式与所述第二触觉模式不同时:如果所述第一优先级高于所述第二优先级,并且所述第二优先级高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之前;如果所述第一优先级高于所述第二优先级,并且所述第二优先级低于预定阈值,则确定所述第一触觉模式为待输出的触觉模式,并且忽略所述第二触觉模式;如果所述第一优先级低于所述第二优先级,并且所述第一优先级高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之后;如果所述第一优先级低于所述第二优先级,并且所述第一优先级低于预定阈值,则确定所述第二触觉模式为待输出的触觉模式,并且忽略所述第一触觉模式;如 果所述第一优先级等于所述第二优先级,并且两者都高于或等于预定阈值,则确定所述第一触觉模式和所述第二触觉模式为待输出的触觉模式,并且所述第一触觉模式的输出定时在所述第二触觉模式之前;或者如果所述第一优先级等于所述第二优先级,并且两者都低于预定阈值,则确定所述第一触觉模式和所述第二触觉模式中的一个为待输出的触觉模式,并且忽略所述第一触觉模式和所述第二触觉模式中的另一个。The haptic effect control apparatus 700 may further include a determination unit 740 configured to determine a haptic pattern to be output based on the first haptic pattern and first priority and the second haptic pattern and second priority. For example, when the first haptic mode is the same as the second haptic mode, if the first priority is the same as the second priority, select the first haptic mode and the second haptic mode one and ignore the other; if the first priority is different from the second priority, the haptic mode with the higher priority is selected and the haptic mode with the lower priority is ignored. When the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, determine that the first haptic pattern is the haptic pattern to be output, and ignore the second haptic pattern; if the first priority is lower than the second priority, then determining the second haptic pattern as the haptic pattern to be output and ignoring the first haptic pattern; or if the If the first priority is equal to the second priority, then it is determined that one of the first haptic pattern and the second haptic pattern is the haptic pattern to be output, and the first haptic pattern and the second haptic pattern are ignored. Another of two haptic patterns. For another example, when the first haptic pattern is different from the second haptic pattern: if the first priority is higher than the second priority, and the second priority is higher than or equal to a predetermined threshold, Then determine that the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the output timing of the first haptic pattern is before the second haptic pattern; if the first priority is higher than the second priority, and the second priority is lower than a predetermined threshold, then determine that the first haptic pattern is the haptic pattern to be output, and ignore the second haptic pattern; if the first priority lower than the second priority, and the first priority is higher than or equal to a predetermined threshold, then it is determined that the first haptic pattern and the second haptic pattern are haptic patterns to be output, and the first an output of the haptic pattern is timed after the second haptic pattern; determining the second haptic pattern if the first priority is lower than the second priority and the first priority is lower than a predetermined threshold is the haptic pattern to be output, and ignore the first haptic pattern; if the first priority is equal to the second priority, and both are higher than or equal to a predetermined threshold, then determine the first haptic pattern and the second haptic pattern is the haptic pattern to be output, and the output timing of the first haptic pattern is before the second haptic pattern; or if the first priority is equal to the second priority, and Both are lower than the predetermined threshold, then determine that one of the first haptic pattern and the second haptic pattern is the haptic pattern to be output, and ignore the first haptic pattern and the second haptic pattern another.
触觉效果控制装置700还可包括指示单元750,用于在所述定时器到期之后,指示触觉输出器件输出所确定的待输出的触觉模式。The haptic effect control apparatus 700 may further include an instructing unit 750 configured to instruct the haptic output device to output the determined haptic pattern to be output after the timer expires.
可选地,触觉效果控制装置700还可包括输出列表维护单元760,用于建立一触觉模式输出列表,并且在所述定时器到期之后,将所确定的待输出的触觉模式插入到所述触觉模式输出列表中,以及在所确定的待输出的触觉模式执行完毕或者被取消时,从所述触觉模式输出列表删除该触觉模式。Optionally, the haptic effect control device 700 may further include an output list maintenance unit 760, configured to establish a haptic pattern output list, and insert the determined haptic pattern to be output into the haptic pattern after the timer expires. In the haptic pattern output list, and when the determined haptic pattern to be output is completed or canceled, the haptic pattern is deleted from the haptic pattern output list.
上面关于图11描述的方法400描述了对同时触发的多个触觉触发消息的处理,其可以从同时或短时间内触发的多个触觉触发消息中确定要输出的触觉模式,并且使用相应的驱动信号来驱动触觉输出器件107以产生相应的触觉效果。但是,当触觉效果控制装置106确定了待输出的触觉模式时,触觉输出器件107可能正在输出之前确定的触觉效果。例如,当电子设备100正在播放音乐或视频并且产生对应的触觉效果时,又收到语音呼叫而触发另一触觉效果输出,或者电子设备100正响应于收到语音呼叫而产生一触觉效果时,又响应于另一事件例如闹钟到时而触发另一触觉效果。此时,如何适当地控制触觉输出器件107产生期望的触觉效果输出就成为一个问题。图16示出根据本发明另一实施例的触觉效果控制方法800的流程图。可以理解,图16所示的方法800可以由例如图1所示的电子设备100中的触觉效果控制装置106执行。The method 400 described above with respect to FIG. 11 describes the processing of multiple haptic trigger messages triggered at the same time, which can determine the haptic pattern to be output from the multiple haptic trigger messages triggered at the same time or within a short period of time, and use the corresponding driving Signals are used to drive the tactile output device 107 to generate corresponding tactile effects. However, when the haptic effect control means 106 determines the haptic pattern to be output, the haptic output device 107 may be outputting the previously determined haptic effect. For example, when the electronic device 100 is playing music or video and generates a corresponding haptic effect, another haptic effect output is triggered when a voice call is received, or when the electronic device 100 is generating a haptic effect in response to receiving a voice call, Another haptic effect is triggered in turn in response to another event, such as an alarm clock going off. At this point, how to properly control the haptic output device 107 to generate desired haptic effect output becomes a problem. FIG. 16 shows a flow chart of a haptic effect control method 800 according to another embodiment of the present invention. It can be understood that the method 800 shown in FIG. 16 may be executed, for example, by the haptic effect control apparatus 106 in the electronic device 100 shown in FIG. 1 .
参照图16,在步骤S810,触觉效果控制装置106可以基于接收到的触觉触发消息,确定待输出的第一触觉模式及其对应的第一优先级。如前所述,当处理器101检测到与触觉效果相关联的预定事件时,可以生成并且向触觉效果控制装置106发送触觉触发消息,触觉效果控制装置106可以基于接收到的触觉触发消息来确定第一触觉模式及其对应的第一优先级。如前所述,多个预定事件可以对应于不同或者相同的触觉效果,处理器101在检测到各种预定事件时,可以生成与预定事件对应的触觉触发消息,以触发相应的触 觉效果输出。还应理解,当不同的事件触发相同的触觉效果时,其可以对应于不同的优先级,优先级指示输出该触觉效果的重要性的高低,其一般反应的是处理器101检测到的预定事件的重要性。Referring to FIG. 16 , in step S810 , the haptic effect control device 106 may determine the first haptic pattern to be output and its corresponding first priority based on the received haptic trigger message. As mentioned above, when the processor 101 detects a predetermined event associated with a haptic effect, it can generate and send a haptic trigger message to the haptic effect control device 106, and the haptic effect control device 106 can determine based on the received haptic trigger message A first haptic mode and its corresponding first priority. As mentioned above, multiple predetermined events may correspond to different or the same haptic effects. When detecting various predetermined events, the processor 101 may generate a haptic trigger message corresponding to the predetermined events to trigger the corresponding haptic effect output. It should also be understood that when different events trigger the same haptic effect, they may correspond to different priorities, and the priority indicates the importance of outputting the haptic effect, which generally reflects the predetermined event detected by the processor 101 importance.
继续参照图16,在步骤S820,触觉效果控制装置106可以确定触觉输出器件107当前正在输出的第二触觉模式及其对应的第二优先级。也就是说,触觉效果控制装置106确定当触觉输出器件107正在输出第二触觉模式时,其又收到了输出第一触觉模式的触发消息,从而第一和第二触觉模式在输出时间上彼此抵触或者冲突。应理解,贯穿本申请,“第一”和“第二”等序数词仅用于将不同的对象区别开,而不对其所描述的对象进行任何限制。Continuing to refer to FIG. 16 , in step S820 , the haptic effect control device 106 may determine the second haptic pattern currently being output by the haptic output device 107 and its corresponding second priority. That is to say, the haptic effect control device 106 determines that when the haptic output device 107 is outputting the second haptic pattern, it has received a trigger message to output the first haptic pattern, so that the first and second haptic patterns conflict with each other in terms of output time Or conflict. It should be understood that throughout the present application, ordinal numerals such as "first" and "second" are only used to distinguish different objects, and do not impose any limitation on the described objects.
接下来在步骤S830,触觉效果控制装置106可以基于当前正在输出的第二触觉模式及其对应的第二优先级以及新触发的待输出的第一触觉模式及其对应的第一优先级,来确定用于驱动触觉输出器件107的驱动触觉模式,从而解决多个触觉模式之间彼此抵触或冲突的问题。一般而言,当触觉效果控制装置106确定第一和第二触觉模式在输出时间上彼此冲突时,可以继续输出第二触觉模式而忽略新触发的第一触觉模式,或者可以在第二触觉模式的输出结束之后再输出第一触觉模式,或者可以转而输出新触发的第一触觉模式而终止当前正在输出的第二触觉模式,或者还可以在第一触觉模式结束之后再继续输出第二触觉模式。在步骤S830中,触觉效果控制装置106可以基于第一和第二触觉模式以及第一和第二优先级,来选择期望的触觉模式以供触觉输出器件107输出。Next, in step S830, the haptic effect control device 106 may, based on the currently outputting second haptic pattern and its corresponding second priority, and the newly triggered first haptic pattern to be output and its corresponding first priority, The driving tactile mode for driving the tactile output device 107 is determined, so as to solve the problem of mutual conflict or conflict between multiple tactile modes. Generally speaking, when the haptic effect control device 106 determines that the first and second haptic patterns conflict with each other in terms of output time, it may continue to output the second haptic pattern while ignoring the newly triggered first haptic pattern, or may continue to output the second haptic pattern in the second haptic pattern. Output the first haptic pattern after the end of the output, or switch to output the newly triggered first haptic pattern to terminate the second haptic pattern currently being output, or continue to output the second haptic pattern after the end of the first haptic pattern model. In step S830 , the haptic effect control device 106 may select a desired haptic mode for output by the haptic output device 107 based on the first and second haptic modes and the first and second priorities.
图17示出了根据一实施例的基于第一和第二触觉模式以及第一和第二优先级来确定驱动触觉模式的方法900的流程图。参照图17,触觉效果控制装置106可以首先在步骤910确定第一触觉模式和第二触觉模式是否相同。在有些情况下,第一触觉模式和第二触觉模式可能相同,例如其是响应于先后不同时间发生的相同类型的事件而触发的触觉模式,或者是响应于不同类型的事件触发的相同触觉模式,它们的优先级(第一和第二优先级)可以彼此不同或者相同。在这种情况下,由于第一和第二触觉模式对应于相同的触觉效果,触觉输出器件107可以继续输出当前正在输出的触觉模式,而忽略新触发的相同的触觉模式。因此,在步骤920中,触觉效果控制装置106可以忽略第一触觉模式,确定继续使用第二触觉模式作为驱动触觉输出器件107的驱动触觉模式。FIG. 17 shows a flowchart of a method 900 for determining a driving haptic mode based on first and second haptic modes and first and second priorities according to an embodiment. Referring to FIG. 17 , the haptic effect control device 106 may first determine whether the first haptic pattern and the second haptic pattern are the same at step 910 . In some cases, the first haptic pattern and the second haptic pattern may be the same, for example, they are haptic patterns triggered in response to the same type of events occurring at different times in succession, or the same haptic patterns triggered in response to different types of events , their priorities (first and second priorities) can be different from each other or the same. In this case, since the first and second haptic patterns correspond to the same haptic effect, the haptic output device 107 may continue to output the haptic pattern currently being output, while ignoring the newly triggered same haptic pattern. Therefore, in step 920 , the haptic effect control device 106 may ignore the first haptic mode, and determine to continue to use the second haptic mode as the driving haptic mode for driving the haptic output device 107 .
在另一些情况中,第一触觉模式和第二触觉模式可能彼此不同,例如处理器101响应于不同的事件而触发了不同的触觉模式。在这种情况下,触觉效果控制装置106可以基于优先级来确定用于驱动触觉输出器件107的驱动触觉模式。在步骤930,触觉效果控制装置106可以比较第一触觉模式的第一优先级是否大于第二触觉模式的第二优先级。如果第一优先级大于第二优先级,表明触发第一触觉模式的事件的重要性高于触发第二触觉模式的事件的重要性,因此在步骤940,触觉效果控制装置106可以确定终止触觉输出器件107正在输出的第二触觉模式,转而使用第一触觉模式来驱动触觉输出器件107,或者可以暂停第二触觉模式的输出,而在第一触觉模式的输出结束之后再继续输出第二触觉模式。如果第一优先级等于或低于第二优先级,则表明触发第一触觉模式的事件的重要性等于或低于触发第二触觉模式的事件的重要性,因此在步骤950,触觉效果控制装置106可以确定继续使用第二触觉模式来驱动触觉输出器件107。此时,触觉效果控制装置106可以忽略新触发的第一触觉模式,或者可以在第二触觉模式的输出结束之后,再输出第一触觉模式。In other cases, the first haptic pattern and the second haptic pattern may be different from each other, for example, the processor 101 triggers different haptic patterns in response to different events. In this case, the haptic effect control means 106 may determine the driving haptic mode for driving the haptic output device 107 based on the priority. In step 930, the haptic effect control device 106 may compare whether the first priority of the first haptic pattern is greater than the second priority of the second haptic pattern. If the first priority is greater than the second priority, it indicates that the event triggering the first haptic mode is more important than the event triggering the second haptic mode, so in step 940, the haptic effect control device 106 can determine to terminate the haptic output The device 107 is outputting the second tactile pattern, and then uses the first tactile pattern to drive the tactile output device 107, or may suspend the output of the second tactile pattern, and continue to output the second tactile sensation after the output of the first tactile pattern is finished. model. If the first priority is equal to or lower than the second priority, it indicates that the importance of the event triggering the first haptic mode is equal to or lower than the importance of the event triggering the second haptic mode, so in step 950, the haptic effect control device 106 may determine to continue to use the second haptic mode to drive the haptic output device 107 . At this time, the haptic effect control device 106 may ignore the newly triggered first haptic pattern, or may output the first haptic pattern after the output of the second haptic pattern ends.
上面参照图16-17描述的方法可以从输出时间彼此抵触或冲突的多个触觉模式中选择并按恰当的时序输出期望的触觉模式,从而在提供丰富的触觉效果的同时,避免了不同触觉效果之间的冲突或干扰,改善了用户体验。The method described above with reference to FIGS. 16-17 can select from a plurality of haptic patterns whose output times contradict or conflict with each other and output a desired haptic pattern at an appropriate timing, thereby avoiding different haptic effects while providing rich haptic effects. conflicts or interferences between them, improving the user experience.
在一些实施例中,处理器101可能响应于同时(例如,在足够短的时间内)检测到的多个事件而触发多个待输出的触觉模式,图18示出了这样的实施例的示意图。参照图18,在T1时刻处理器101可响应于第一事件而触发第一触觉模式。此时,处理器101可以启动定时器以监视时间,如果在预定时段T timer内的T2时刻处理器101又响应于第二事件触发了另一例如第三触觉模式,则处理器101可以认为第一和第三触觉模式为同时触发的两个触觉模式。这里,仅以两个触觉模式作为示例,实际上处理器101还可能同时触发更多个例如三个、四个触觉模式。处理器101可以基于所触发的触觉模式的类型及其对应的优先级,而选择性地向触觉效果控制装置106指示预定数量的待输出的触觉模式,例如具有较高优先级的一个或两个彼此不同的触觉模式,而忽略具有较低优先级的一个或多个触觉模式。并且,处理器101可以按照优先级从高到低的顺序向触觉效果控制装置106指示要输出的触觉模式。参照图18,如果在超出预定时段T timer之后(例如,定时器到期之后) 的时刻T3处理器101又响应于一事件而触发一触觉输出模式,则其被视为新的触发,而不是与T1和T2时刻的触发一起被视为同时触发。可以理解,对于新的触发T3,可以按照上面关于触发T1描述的方法进行处理。 In some embodiments, the processor 101 may trigger multiple haptic patterns to be output in response to multiple events detected at the same time (eg, within a sufficiently short time), and FIG. 18 shows a schematic diagram of such an embodiment. . Referring to FIG. 18 , the processor 101 may trigger a first haptic pattern in response to a first event at time T1. At this time, the processor 101 can start a timer to monitor the time, if the processor 101 triggers another, for example, the third haptic pattern in response to the second event at time T2 within the predetermined period T timer , the processor 101 can consider the second The first and third haptic patterns are two haptic patterns that are triggered simultaneously. Here, only two haptic modes are taken as an example, in fact, the processor 101 may trigger more, for example, three or four haptic modes at the same time. The processor 101 may selectively instruct the haptic effect control device 106 a predetermined number of haptic patterns to be output based on the type of the triggered haptic pattern and its corresponding priority, such as one or two with higher priority. Haptic modes that are different from each other, ignoring one or more haptic modes with lower priority. In addition, the processor 101 may indicate to the haptic effect control device 106 the haptic patterns to be output in order of priority from high to low. Referring to FIG. 18, if the processor 101 triggers a haptic output mode in response to an event at time T3 after exceeding a predetermined period of time T timer (for example, after the timer expires), it is regarded as a new trigger instead of Together with the triggers at T1 and T2 times, they are considered as simultaneous triggers. It can be understood that for the new trigger T3, it can be processed according to the method described above for the trigger T1.
上面参照图16-17描述了仅触发第一触觉模式时的处理,下面考虑同时触发第一和第三触觉模式时的情形。即,在步骤S810中,触觉效果控制装置106基于从处理器101接收到的触觉触发消息确定待输出的第一和第三触觉模式及其对应的第一和第三优先级,其中第三触觉模式不同于第一触觉模式,并且第三优先级等于或低于第一优先级,从而第三触觉模式的输出顺序在第一触觉模式之后。输出顺序可以按照优先级从高到低的顺序来确定,当优先级相同时,则可以根据其触发时序来确定。一般而言,在从处理器101发送给触觉效果控制装置106的触觉触发消息中,一个或多个触觉模式可以按照其输出顺序排列。此时,在步骤S830中,可以针对第一触觉模式和第三触觉模式,按照其输出顺序,迭代地执行上面参照图16-17描述的确定用于驱动触觉输出器件107的驱动触觉模式的步骤。“迭代”指的是,如果在上述步骤中确定使用第一触觉模式来驱动触觉输出器件107,而暂停或终止当前正在输出的第二模式,则在利用第三触觉模式执行上述步骤时,所述当前正在输出的驱动触觉模式迭代为第一触觉模式,而不再是原来的第二触觉模式。The processing when only the first haptic mode is triggered is described above with reference to FIGS. 16-17 , and the situation when the first and third haptic modes are simultaneously triggered is considered below. That is, in step S810, the haptic effect control device 106 determines the first and third haptic patterns to be output and their corresponding first and third priorities based on the haptic trigger message received from the processor 101, wherein the third haptic The mode is different from the first haptic mode, and the third priority is equal to or lower than the first priority, so that the output order of the third haptic mode is after the first haptic mode. The output sequence can be determined according to the order of priority from high to low. When the priority is the same, it can be determined according to its trigger timing. In general, in the haptic trigger message sent from the processor 101 to the haptic effect control device 106, one or more haptic patterns may be arranged in the order of their output. At this time, in step S830, the steps of determining the driving haptic mode for driving the haptic output device 107 described above with reference to FIGS. . "Iteration" means that if it is determined in the above steps that the first haptic mode is used to drive the haptic output device 107, and the second mode currently being output is suspended or terminated, then when the above steps are performed using the third haptic mode, the The driving haptic pattern currently being output is iterated into the first haptic pattern instead of the original second haptic pattern.
继续参照图16,可选地,在步骤S840中,还可以用所确定的驱动触觉模式来更新驱动触觉模式的列表。在一些实施例中,触觉效果控制装置106可以维护一驱动触觉模式的列表,图19示出这样的驱动触觉模式列表的示例。参照图19,驱动触觉模式列表可以包括最多预定数量个用于驱动触觉输出器件107的驱动触觉模式,在图19的示例中示为三个,具体而言,可包括其触觉模式编码和优先级编码。这些驱动触觉模式彼此不同,并且可以按照优先级从高到低的顺序排列。其中,第一个触觉模式为触觉输出器件107当前正在输出的触觉模式,接着的是第一待输出的触觉模式,再后面的是第二待输出的触觉模式。当正在输出的触觉模式执行完毕,并且没有触发任何新的触觉模式时,第一待输出的触觉模式成为正在输出的触觉模式,而第二待输出的触觉模式成为第一待输出的触觉模式。Continuing to refer to FIG. 16 , optionally, in step S840 , the list of driving haptic patterns may also be updated with the determined driving haptic patterns. In some embodiments, the haptic effect control device 106 may maintain a list of driving haptic patterns, and FIG. 19 shows an example of such a list of driving haptic patterns. Referring to FIG. 19 , the drive haptic mode list may include up to a predetermined number of drive haptic modes for driving the haptic output device 107, shown as three in the example of FIG. 19 , specifically, may include its haptic mode code and priority coding. These drive haptic modes are different from each other and can be arranged in order of priority from highest to lowest. Wherein, the first tactile pattern is the tactile pattern currently being output by the tactile output device 107 , followed by the first tactile pattern to be output, and the second tactile pattern to be output after that. When the output haptic pattern is finished and no new haptic pattern is triggered, the first output haptic pattern becomes the output haptic pattern, and the second output haptic pattern becomes the first output haptic pattern.
图20至图22示出了用所确定的驱动触觉模式来更新驱动触觉模式列表的一些示例,从这些示例也可以进一步理解上面描述的确定用于驱动触觉输 出器件107的驱动触觉模式的步骤。首先参照图20,在该示例中,触觉触发消息中仅指示具有第一优先级的第一触觉模式,并且当前的驱动触觉模式列表仅包括正在输出的具有第二优先级的第二触觉模式。假设第一触觉模式不同于第二触觉模式,并且第一优先级高于第二优先级,从而在步骤S830中确定使用第一触觉模式来驱动触觉输出器件107,而在第一触觉模式结束之后再继续输出第二触觉模式,则可以在步骤S840中更新驱动触觉模式列表,使第一模式成为当前输出,而使第二模式成为第一待输出的驱动触觉模式。在一些实施例中,如果第二触觉模式被终止,则在更新后的驱动触觉模式列表中可以不包括第二触觉模式。20 to 22 show some examples of updating the driving haptic mode list with the determined driving haptic mode, from which the above-described steps of determining the driving haptic mode for driving the haptic output device 107 can also be further understood. Referring first to FIG. 20 , in this example, only the first haptic pattern with the first priority is indicated in the haptic trigger message, and the current drive haptic pattern list includes only the second haptic pattern with the second priority being output. Assuming that the first haptic mode is different from the second haptic mode, and the first priority is higher than the second priority, so in step S830 it is determined to use the first haptic mode to drive the haptic output device 107, and after the end of the first haptic mode If the second haptic pattern continues to be output, the driving haptic pattern list may be updated in step S840 so that the first pattern becomes the current output and the second pattern becomes the first driving haptic pattern to be output. In some embodiments, if the second haptic mode is terminated, the second haptic mode may not be included in the updated drive haptic mode list.
在图21的示例中,触觉触发消息可指示具有第一优先级的第一触觉模式和具有第三优先级的第三触觉模式,其中第一、第二和第三触觉模式彼此不同,第三优先级低于第一优先级,并且当前的驱动触觉模式列表仅包括正在输出的具有第二优先级的第二触觉模式。假设第一优先级高于第二优先级,第三优先级低于第二优先级,则在步骤S830中确定使用第一触觉模式来驱动触觉输出器件107,在第一触觉模式结束之后再继续输出第二触觉模式;进一步在迭代处理第三触觉模式时确定第三触觉模式在第一触觉模式(现在成为当前正在输出的驱动触觉模式)之后执行,并且基于第三和第二优先级的比较,可以确定第三触觉模式在第二触觉模式之后执行。此时,如图21所示,可以在步骤S840中更新驱动触觉模式列表,使第一模式成为当前输出,第二模式成为第一待输出的驱动触觉模式,第三模式成为第二待输出的驱动触觉模式。在一些实施例中,如果第三优先级高于第二优先级,则可以将图21所示的第二触觉模式和第三触觉模式的输出顺序彼此调换。In the example of FIG. 21 , the haptic trigger message may indicate a first haptic pattern with a first priority and a third haptic pattern with a third priority, wherein the first, second, and third haptic patterns are different from each other, and the third haptic pattern has a third priority. The priority is lower than the first priority, and the current drive haptic pattern list includes only the second haptic pattern with the second priority being output. Assuming that the first priority is higher than the second priority and the third priority is lower than the second priority, then in step S830 it is determined to use the first haptic mode to drive the haptic output device 107, and then continue after the first haptic mode ends Outputting the second haptic pattern; further determining that the third haptic pattern is executed after the first haptic pattern (now becoming the driving haptic pattern currently being output) when iteratively processing the third haptic pattern, and based on the comparison of the third and second priorities , it may be determined that the third haptic pattern is performed after the second haptic pattern. At this time, as shown in FIG. 21 , the driving haptic mode list can be updated in step S840, so that the first mode becomes the current output, the second mode becomes the first driving haptic mode to be output, and the third mode becomes the second outputting mode. Drive Haptic Mode. In some embodiments, if the third priority is higher than the second priority, the output orders of the second haptic pattern and the third haptic pattern shown in FIG. 21 may be exchanged with each other.
在图22的示例中,触觉触发消息可以与图21相同,其指示具有第一优先级的第一触觉模式和具有第三优先级的第三触觉模式。当前的驱动触觉模式列表除了包括具有第二优先级的第二触觉模式之外,还包括具有第四优先级的第四触觉模式,其中第一、第二、第三和第四触觉模式彼此不同,第三优先级低于第一优先级,第四优先级低于第二优先级。假设第一优先级高于第二优先级,则在步骤S830中确定使用第一触觉模式来驱动触觉输出器件107,而在第一触觉模式结束之后再继续输出第二触觉模式;进一步在迭代处理第三触觉模式时,如果第三优先级低于第四优先级,由于驱动触觉模式列表最多容纳三个待输出的驱动触觉模式,因此第三触觉模式会被忽略,更 新后的驱动触觉模式列表依次包括第一触觉模式、第二触觉模式和第四触觉模式。In the example of FIG. 22 , the haptic trigger message may be the same as FIG. 21 , indicating a first haptic pattern with a first priority and a third haptic pattern with a third priority. The current drive haptic mode list includes a fourth haptic mode with a fourth priority in addition to a second haptic mode with a second priority, where the first, second, third, and fourth haptic modes are different from each other , the third priority is lower than the first priority, and the fourth priority is lower than the second priority. Assuming that the first priority is higher than the second priority, it is determined in step S830 to use the first haptic mode to drive the haptic output device 107, and continue to output the second haptic mode after the end of the first haptic mode; further in the iterative process In the third haptic mode, if the third priority is lower than the fourth priority, since the driving haptic mode list can accommodate up to three driving haptic modes to be output, the third haptic mode will be ignored, and the updated driving haptic mode list The first tactile pattern, the second tactile pattern and the fourth tactile pattern are sequentially included.
应理解,上面参照图20-22描述的驱动触觉模式列表的更新方式仅是示例,也可以以其他方式来维护和更新驱动触觉模式的列表。利用驱动触觉模式的列表,可以方便地管理多个待输出的驱动触觉模式,这对于提供丰富触觉反馈的系统而言,是非常有用的。It should be understood that the ways of updating the driving haptic pattern list described above with reference to FIGS. 20-22 are only examples, and the list of driving haptic patterns can also be maintained and updated in other ways. Using the list of driving haptic patterns, multiple driving haptic patterns to be output can be conveniently managed, which is very useful for systems that provide rich haptic feedback.
图23示出根据本发明一实施例的触觉效果控制装置1000的示意性功能框图。可以理解,图23所示的触觉效果控制装置1000中的各个功能模块可以通过软件、硬件或者固件的方式实现,并且可以实施在上面描述的电子设备100中的触觉效果控制装置106中或者作为其一部分。图23所示的触觉效果控制装置1000中的各个功能模块的相关功能和操作已经在上面参照图16-22进行了详细的描述,因此下面仅简单说明。FIG. 23 shows a schematic functional block diagram of a haptic effect control device 1000 according to an embodiment of the present invention. It can be understood that each functional module in the haptic effect control apparatus 1000 shown in FIG. part. The relevant functions and operations of each functional module in the haptic effect control device 1000 shown in FIG. 23 have been described in detail above with reference to FIGS. 16-22 , so only a brief description will be given below.
参照图23,触觉效果控制装置1000可包括:待输出触觉模式确定单元1010,其可配置为基于接收到的触觉触发消息,确定要输出的第一触觉模式和所述第一触觉模式的第一优先级;当前触觉模式确定单元1020,其配置为确定触觉输出器件正在输出的第二触觉模式和所述第二触觉模式的第二优先级;以及驱动触觉模式确定单元1030,配置为基于所述第一触觉模式和第一优先级以及所述第二触觉模式和第二优先级,确定用于驱动所述触觉输出器件的驱动触觉模式。Referring to FIG. 23 , the haptic effect control device 1000 may include: a haptic pattern to be output determining unit 1010 , which may be configured to determine a first haptic pattern to be output and a first haptic pattern of the first haptic pattern based on the received haptic trigger message. priority; a current haptic mode determination unit 1020 configured to determine a second haptic mode that the tactile output device is outputting and a second priority of the second haptic mode; and a drive haptic mode determination unit 1030 configured to determine based on the The first haptic mode and first priority and the second haptic mode and second priority determine a driving haptic mode for driving the haptic output device.
在一些实施例中,驱动触觉模式确定单元1030可配置为当所述第一触觉模式与所述第二触觉模式相同时,忽略所述第一触觉模式,继续用所述第二触觉模式驱动所述触觉输出器件;当所述第一触觉模式与所述第二触觉模式不同时,如果所述第一优先级高于所述第二优先级,则暂停或终止所述第二触觉模式,使用所述第一触觉模式来驱动所述触觉输出器件,如果所述第一优先级等于或低于所述第二优先级,则继续使用所述第二触觉模式驱动所述触觉输出器件,并且忽略所述第一触觉模式或者在所述第二触觉模式结束后使用所述第一触觉模式来驱动所述触觉输出器件。In some embodiments, the driving haptic mode determining unit 1030 may be configured to ignore the first haptic mode and continue to drive the haptic mode with the second haptic mode when the first haptic mode is the same as the second haptic mode. The haptic output device; when the first haptic mode is different from the second haptic mode, if the first priority is higher than the second priority, then suspend or terminate the second haptic mode, using the first haptic mode to drive the haptic output device, if the first priority is equal to or lower than the second priority, continue to use the second haptic mode to drive the haptic output device, and ignore The first haptic mode or the first haptic mode is used to drive the haptic output device after the second haptic mode ends.
在一些实施例中,待输出触觉模式确定单元1010还可配置为基于所述触觉触发消息确定要输出的第三触觉模式和所述第三触觉模式的第三优先级,所述第三触觉模式不同于所述第一触觉模式,所述第三优先级等于或低于所述第一优先级,并且所述第三触觉模式的输出顺序位于所述第一触觉模 式之后。In some embodiments, the to-be-output haptic pattern determination unit 1010 may also be configured to determine a third haptic pattern to be output and a third priority of the third haptic pattern based on the haptic trigger message, the third haptic pattern Different from the first haptic pattern, the third priority is equal to or lower than the first priority, and an output order of the third haptic pattern is after the first haptic pattern.
在一些实施例中,驱动触觉模式确定单元1030可配置为对于所述触觉触发消息指示的第一触觉模式和第三触觉模式,按其输出顺序迭代地执行所述确定用于驱动所述触觉输出器件的驱动触觉模式的步骤。In some embodiments, the driving haptic mode determination unit 1030 may be configured to iteratively perform the determination for driving the haptic output for the first haptic mode and the third haptic mode indicated by the haptic trigger message in the order of their output Steps to drive the haptic pattern of the device.
在一些实施例中,可选地,装置1000还可包括驱动触觉模式列表维护单元1040,其可配置为用所确定的驱动触觉模式更新驱动触觉模式列表,所述驱动触觉模式列表包括最多预定数量个用于驱动所述触觉输出器件的驱动触觉模式以及每个驱动触觉模式的优先级,所述最多预定数量个用于驱动所述触觉输出器件的驱动触觉模式彼此不同并且按照优先级从高到低的顺序排列。In some embodiments, optionally, the device 1000 may also include a driving haptic pattern list maintenance unit 1040, which may be configured to update the driving haptic pattern list with the determined driving haptic pattern, the driving haptic pattern list includes a maximum predetermined number A driving tactile mode for driving the tactile output device and a priority of each driving tactile mode, the maximum predetermined number of driving tactile modes for driving the tactile output device are different from each other and in order of priority from high to high lower order.
上面描述了这样一种情况:当触觉输出器件107正在播放第一驱动信号以输出第一触觉效果时,突然被打断,转而播放第二驱动信号以输出第二触觉效果。例如,当用户正在听音乐时,忽然接到语音来电。此时,与音乐对应的触觉效果被语音来电事件触发的触觉效果打断,因为语音来电事件有更高的优先级,因此触觉效果控制装置106会转而用与语音来电触觉效果应对的第二驱动信号来驱动触觉输出器件107。此时,可以停止播放第一驱动信号,或者当第二驱动信号播放完毕之后,再从第一驱动信号的暂停点开始继续播放第一驱动信号。The above describes such a situation: when the tactile output device 107 is playing the first driving signal to output the first tactile effect, it is suddenly interrupted and plays the second driving signal to output the second tactile effect. For example, when the user is listening to music, he suddenly receives a voice call. At this time, the haptic effect corresponding to the music is interrupted by the haptic effect triggered by the incoming voice call event, because the incoming voice call event has a higher priority, so the haptic effect control device 106 will instead use the second haptic effect corresponding to the incoming voice call event. The driving signal is used to drive the tactile output device 107 . At this time, the playing of the first driving signal can be stopped, or after the playing of the second driving signal is completed, the playing of the first driving signal can be continued from the pause point of the first driving signal.
然而,当触觉输出器件107正在播放与从外界接收的实时驱动信号时,中断后的继续播放则可能会出现问题。例如,当用户收听伴随有实时触觉效果的广播或网络直播节目(音乐和/或视频等)时,实时驱动信号会持续地写入到FIFO寄存器中;当实时触觉效果的输出被打断,转而输出例如与语音呼叫对应的触觉效果时,一方面实时驱动信号继续写入到FIFO寄存器中,可能会导致FIFO寄存器被写满而溢出;另一方面,当与语音呼叫对应的触觉效果输出完毕,转而继续播放实时驱动信号时,由于广播或网络直播节目已经继续进行到下一时刻,因此可能会出现实时驱动信号(即实时触觉效果)与广播或网络直播节目不匹配的情况。However, when the haptic output device 107 is playing the real-time driving signal received from the outside, there may be problems in continuing to play after the interruption. For example, when a user listens to a broadcast or webcast program (music and/or video, etc.) accompanied by real-time haptic effects, the real-time driving signal will be continuously written into the FIFO register; When outputting the haptic effect corresponding to a voice call, on the one hand, the real-time driving signal continues to be written into the FIFO register, which may cause the FIFO register to be filled and overflow; on the other hand, when the haptic effect corresponding to the voice call is output , when the real-time driving signal continues to be played, since the broadcast or webcast program has continued to the next moment, there may be a situation where the real-time driving signal (that is, the real-time haptic effect) does not match the broadcast or webcast program.
针对该问题,本发明一实施例提出一种触觉效果控制方法,如图24所示。该方法可以由例如触觉效果控制装置106来执行,以控制通过触觉输出器件107输出的触觉效果。To solve this problem, an embodiment of the present invention proposes a haptic effect control method, as shown in FIG. 24 . The method can be executed by, for example, the haptic effect control device 106 to control the haptic effect output through the haptic output device 107 .
参照图24,一种触觉效果控制方法1100可包括步骤S1110,播放第一 驱动信号以产生第一触觉效果。第一驱动信号可以是实时驱动信号,如前所述,触觉效果控制装置106可以接收外界提供的实时驱动信号,将其存储在FIFO寄存器中。触觉效果控制装置106还实时地从FIFO寄存器读取实时驱动信号,使用该实时驱动信号驱动触觉输出器件107以产生第一触觉效果输出。Referring to FIG. 24 , a haptic effect control method 1100 may include step S1110, playing a first driving signal to generate a first haptic effect. The first driving signal may be a real-time driving signal. As mentioned above, the haptic effect control device 106 may receive the real-time driving signal provided by the outside and store it in the FIFO register. The haptic effect control device 106 also reads the real-time driving signal from the FIFO register in real time, and uses the real-time driving signal to drive the haptic output device 107 to generate the first haptic effect output.
图25示出了FIFO寄存器的示意图。如图25所示,FIFO寄存器具有预定的地址范围,即从起始地址到末尾地址。触觉效果控制装置106可以连续的将通过I2C或I2S接口接收到的实时驱动信号写入到FIFO寄存器中,并且从FIFO读取地址处读取实时驱动信号,以用于驱动触觉输出器件107产生触觉效果输出。可以设置写入计数器和读取计数器来监视FIFO寄存器的读写状态。当FIFO不为空时,触觉效果控制装置106读取并播放其中存储的实时驱动信号;当FIFO为空时,则停止实时驱动信号的播放。Figure 25 shows a schematic diagram of a FIFO register. As shown in FIG. 25, the FIFO register has a predetermined address range, that is, from a start address to an end address. The haptic effect control device 106 can continuously write the real-time driving signal received through the I2C or I2S interface into the FIFO register, and read the real-time driving signal from the FIFO read address to drive the haptic output device 107 to generate tactile sensation Effect output. You can set the write counter and read counter to monitor the read and write status of the FIFO register. When the FIFO is not empty, the haptic effect control device 106 reads and plays the real-time driving signal stored therein; when the FIFO is empty, stops playing the real-time driving signal.
继续参照图24,在步骤S1120,响应于触发事件,触觉效果控制装置106可中断第一驱动信号例如实时驱动信号的播放,转而播放第二驱动信号以输出第二触觉效果。例如,当正在播放实时驱动信号时,电子设备100接收到语音呼叫,因此转而播放语音呼叫事件触发的第二驱动信号以产生第二触觉效果。这里,第二驱动信号可以是和第一驱动信号不同类型的驱动信号,例如第一驱动信号是从外界实时接收的实时驱动信号,第二驱动信号是预先存储在非易失性存储器中的驱动信号,例如WAV波形信号。Continuing to refer to FIG. 24 , in step S1120 , in response to a trigger event, the haptic effect control device 106 may interrupt the playing of the first driving signal, such as a real-time driving signal, and instead play the second driving signal to output the second haptic effect. For example, when the real-time driving signal is being played, the electronic device 100 receives a voice call, so it turns to play the second driving signal triggered by the voice call event to generate the second haptic effect. Here, the second driving signal may be a different type of driving signal from the first driving signal. For example, the first driving signal is a real-time driving signal received from the outside in real time, and the second driving signal is a driving signal pre-stored in a non-volatile memory. Signals, such as WAV waveform signals.
在步骤S1130中,在播放第二驱动信号的同时,执行第一驱动信号的虚拟播放。例如,在播放第二驱动信号的同时,触觉效果控制装置106可以继续接收和向FIFO寄存器中写入第一驱动信号,并且从FIFO寄存器读出第一驱动信号。但是,读出的第一驱动信号并不用于驱动触觉输出器件107,而是可以丢弃掉,因为触觉效果控制装置106正在使用第二驱动信号驱动触觉输出器件107以输出第二触觉效果。这样,通过第一驱动信号的虚拟播放,可以实现诸多优点。首先,可以避免触觉效果控制装置106接收的实时驱动信号占据整个FIFO寄存器的存储空间,甚至产生溢出;此外,可以确保第一驱动信号与对应的事件例如广播或网络直播节目保持匹配,而不会因为第一驱动信号的暂停播放而产生实时触觉效果的延迟。In step S1130, while playing the second driving signal, perform virtual playing of the first driving signal. For example, while playing the second driving signal, the haptic effect control device 106 may continue to receive and write the first driving signal into the FIFO register, and read the first driving signal from the FIFO register. However, the read first drive signal is not used to drive the tactile output device 107, but can be discarded, because the tactile effect control device 106 is using the second drive signal to drive the tactile output device 107 to output the second tactile effect. In this way, through the virtual playback of the first driving signal, many advantages can be realized. First, it can avoid that the real-time driving signal received by the haptic effect control device 106 occupies the storage space of the entire FIFO register, or even overflows; in addition, it can ensure that the first driving signal keeps matching with the corresponding event, such as a broadcast or webcast program, without A delay in the real-time haptic effect is generated due to the paused playback of the first drive signal.
继续参照图24,在步骤S1140,当第二驱动信号播放完毕之后,可以从第一驱动信号的当前虚拟播放位置开始,继续播放第一驱动信号以产生对应 的触觉效果。此时,触觉效果控制装置106只需要简单地将从FIFO寄存器中读取的第一驱动信号提供给触觉输出器件107即可。Continuing to refer to FIG. 24 , in step S1140, after the second driving signal is played, the first driving signal can be played continuously from the current virtual playing position of the first driving signal to generate a corresponding haptic effect. At this time, the haptic effect control device 106 only needs to simply provide the first driving signal read from the FIFO register to the haptic output device 107 .
在一些实施例中,在第一驱动信号的虚拟播放期间,例如当用户接听语音呼叫而花费较长时间,导致触发第一驱动信号的事件例如广播或网络直播节目已经停止时,那么当在步骤S1140中恢复播放第一驱动信号时,触觉效果控制装置106会发现FIFO寄存器为空,因为第一驱动信号在虚拟播放期间已经被全部读出,此时触觉效果控制装置106可以确定第一驱动信号已经播放完毕,转而播放后续事件触发的驱动信号。In some embodiments, during the virtual play of the first drive signal, for example, when the user takes a long time to answer the voice call, the event that triggers the first drive signal, such as a broadcast or webcast program, has stopped, then when in step When resuming to play the first driving signal in S1140, the haptic effect control device 106 will find that the FIFO register is empty, because the first driving signal has been read out completely during the virtual playback period, at this time the haptic effect control device 106 can determine the first driving signal The playback has been completed, and the driving signal triggered by the subsequent event is played instead.
如上所述,在实时驱动信号的虚拟播放期间,触觉效果控制装置106可以正常地接收、存储和读出实时驱动信号,从而可以确保实时驱动信号与对应的事件例如广播或网络直播节目之间保持匹配,不会因为实时驱动信号的暂停播放而导致实时触觉效果的延迟,并且通过从FIFO寄存器中读出实时驱动信号,可以避免实时驱动信号写满FIFO寄存器并导致溢出。As mentioned above, during the virtual play of the real-time driving signal, the haptic effect control device 106 can normally receive, store and read out the real-time driving signal, so as to ensure that the real-time driving signal and the corresponding event such as broadcasting or webcast program are maintained. Matching will not cause the delay of the real-time haptic effect due to the pause of the real-time driving signal, and by reading the real-time driving signal from the FIFO register, it can prevent the real-time driving signal from filling the FIFO register and causing overflow.
以上结合具体实施例描述了本申请的基本原理,但是,需要指出的是,在本申请中提及的优点、优势、效果等仅是示例而非限制,不能认为这些优点、优势、效果等是本申请的各个实施例必须具备的。另外,上述公开的具体细节仅是为了示例的作用和便于理解的作用,而非限制,上述细节并不限制本申请为必须采用上述具体的细节来实现。The basic principles of the present application have been described above in conjunction with specific embodiments, but it should be pointed out that the advantages, advantages, effects, etc. mentioned in the application are only examples rather than limitations, and these advantages, advantages, effects, etc. Various embodiments of this application must have. In addition, the specific details disclosed above are only for the purpose of illustration and understanding, rather than limitation, and the above details do not limit the application to be implemented by using the above specific details.
本申请中涉及的器件、装置、设备、系统的方框图仅作为例示性的例子并且不意图要求或暗示必须按照方框图示出的方式进行连接、布置、配置。如本领域技术人员将认识到的,可以按任意方式连接、布置、配置这些器件、装置、设备、系统。诸如“包括”、“包含”、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“诸如但不限于”,且可与其互换使用。The block diagrams of devices, devices, devices, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, devices, systems may be connected, arranged, configured in any manner. Words such as "including", "comprising", "having" and the like are open-ended words meaning "including but not limited to" and may be used interchangeably therewith. As used herein, the words "or" and "and" refer to the word "and/or" and are used interchangeably therewith, unless the context clearly dictates otherwise. As used herein, the word "such as" refers to the phrase "such as but not limited to" and can be used interchangeably therewith.
还需要指出的是,在本申请的装置、设备和方法中,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本申请的等效方案。It should also be pointed out that in the devices, equipment and methods of the present application, each component or each step can be decomposed and/or reassembled. These decompositions and/or recombinations should be considered equivalents of this application.
提供所公开的方面的以上描述以使本领域的任何技术人员能够做出或者使用本申请。对这些方面的各种修改对于本领域技术人员而言是非常显而易见的,并且在此定义的一般原理可以应用于其他方面而不脱离本申请的范 围。因此,本申请不意图被限制到在此示出的方面,而是按照与在此公开的原理和新颖的特征一致的最宽范围。The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
为了例示和描述的目的已经给出了以上描述。此外,此描述不意图将本申请的实施例限制到在此公开的形式。尽管以上已经讨论了多个示例方面和实施例,但是本领域技术人员将认识到其某些变型、修改、改变、添加和子组合。The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the application to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims (20)

  1. 一种在触觉效果控制芯片中执行的触觉效果控制方法,包括:A haptic effect control method implemented in a haptic effect control chip, comprising:
    接收触觉触发消息,所述触觉触发消息至少包括触觉模式编码,所述触觉模式编码指示多种预定触觉模式中的一种,其中所述多种预定触觉模式与多种触觉效果相对应,所述触觉效果由用于驱动触觉输出器件的驱动信号表示;receiving a haptic trigger message, the haptic trigger message including at least a haptic pattern code indicating one of a plurality of predetermined haptic patterns, wherein the plurality of predetermined haptic patterns correspond to a plurality of haptic effects, the The haptic effect is represented by a drive signal for driving the haptic output device;
    解码所述触觉触发消息以确定所述触觉模式编码指示的触觉模式;decoding the haptic trigger message to determine a haptic pattern indicated by the haptic pattern encoding;
    根据触觉模式编码与存储对应的驱动信号的寄存器地址之间的映射关系,确定与所述触觉模式编码对应的驱动信号的寄存器地址,从而确定与所述触觉模式对应的触觉效果;以及According to the mapping relationship between the tactile mode code and the register address storing the corresponding drive signal, determine the register address of the drive signal corresponding to the tactile mode code, so as to determine the haptic effect corresponding to the tactile mode; and
    使用所述寄存器地址中存储的驱动信号来驱动所述触觉输出器件,以输出所述触觉效果。The tactile output device is driven by using the drive signal stored in the address of the register to output the tactile effect.
  2. 如权利要求1所述的方法,其中,所述触觉触发消息还包括报头,所述报头用于识别所述触觉触发消息。The method of claim 1, wherein the haptic trigger message further includes a header for identifying the haptic trigger message.
  3. 如权利要求1所述的方法,其中,所述触觉触发消息还包括与所述触觉模式编码相关联的优先级编码,所述优先级编码指示所述触觉模式编码指示的触觉模式的优先级。The method of claim 1 , wherein the haptic trigger message further includes a priority code associated with the haptic mode code, the priority code indicating a priority of the haptic mode indicated by the haptic mode code.
  4. 如权利要求3所述的方法,其中,解码所述触觉触发消息还包括确定所述优先级编码指示的优先级,并且所述方法还包括基于所述优先级来确定是否输出所述触觉效果。The method of claim 3, wherein decoding the haptic trigger message further comprises determining a priority indicated by the priority code, and the method further comprises determining whether to output the haptic effect based on the priority.
  5. 如权利要求1所述的方法,其中,所述触觉触发消息是在多个管脚上接收的,所述多个管脚包括一个控制管脚以及一个或多个数据管脚,当所述控制管脚被激活时,在所述一个或多个数据管脚上接收所述触觉触发消息。The method of claim 1, wherein the haptic trigger message is received on a plurality of pins, the plurality of pins including a control pin and one or more data pins, when the control The haptic trigger message is received on the one or more data pins when the pin is activated.
  6. 如权利要求1所述的方法,其中,所述触觉触发消息是在I2C或I2S接口上接收的,所述驱动信号包括在所述I2C或I2S接口上接收的实时驱动信号,通过所述I2C或I2S接口接收到的实时驱动信号被写入到先入先出寄存器,从而当解码所述触觉触发消息获得的触觉模式编码被映射到所述先入先出寄存器中用于存储所述实时驱动信号的寄存器地址时,使用所述寄存器地址中的所述实时驱动信号来驱动所述触觉输出器件,以实现所述触觉效果的实时输出。The method according to claim 1, wherein the haptic trigger message is received on an I2C or I2S interface, and the driving signal includes a real-time driving signal received on the I2C or I2S interface, through the I2C or I2S interface The real-time driving signal received by the I2S interface is written into the first-in-first-out register, so that the tactile pattern code obtained when decoding the tactile trigger message is mapped to the first-in-first-out register for storing the real-time driving signal. address, use the real-time driving signal in the address of the register to drive the tactile output device, so as to realize the real-time output of the tactile effect.
  7. 如权利要求1所述的方法,其中,所述触觉触发消息是在I2C或I2S接口上接收的,所述驱动信号包括在所述I2C或I2S接口上接收的实时驱动信号,通过所述I2C或I2S接口接收到的实时驱动信号被写入到先入先出寄存器,从而当解码所述触觉触发消息获得的触觉模式编码被映射到所述先入先出寄存器中用于存储所述实时驱动信号的寄存器地址时,使用所述寄存器地址中的所述实时驱动信号来驱动所述触觉输出器件,以实现所述触觉效果的实时输出。The method according to claim 1, wherein the haptic trigger message is received on an I2C or I2S interface, and the driving signal includes a real-time driving signal received on the I2C or I2S interface, through the I2C or I2S interface The real-time driving signal received by the I2S interface is written into the first-in-first-out register, so that the tactile pattern code obtained when decoding the tactile trigger message is mapped to the first-in-first-out register for storing the real-time driving signal. address, use the real-time driving signal in the address of the register to drive the tactile output device, so as to realize the real-time output of the tactile effect.
  8. 如权利要求1所述的方法,其中,所述驱动信号包括实时驱动信号,所述实时驱动信号和所述触觉触发消息通过所述触觉效果控制芯片的单个管脚被接收。The method of claim 1, wherein the driving signal comprises a real-time driving signal, and the real-time driving signal and the haptic trigger message are received through a single pin of the haptic effect control chip.
  9. 如权利要求8所述的方法,其中,所述实时驱动信号和所述触觉触发消息由浮动电平表示,所述浮动电平由所述触觉效果控制芯片中的电平检测单元进行检测和解码。The method according to claim 8, wherein the real-time driving signal and the haptic trigger message are represented by a floating level, and the floating level is detected and decoded by a level detection unit in the haptic effect control chip .
  10. 如权利要求9所述的方法,其中,所述浮动电平包括与报头部分对应的第一电平范围和与信号载荷部分对应的第二电平范围,所述第一电平范围不同于所述第二电平范围,所述报头部分用于指示所述信号载荷部分包括触觉模式编码或实时驱动信号。The method according to claim 9, wherein the floating level includes a first level range corresponding to the header part and a second level range corresponding to the signal payload part, and the first level range is different from the In the second level range, the header part is used to indicate that the signal payload part includes a tactile mode code or a real-time driving signal.
  11. 一种触觉效果控制芯片,包括:A haptic effect control chip, comprising:
    输入单元,配置为接收触觉触发消息,所述触觉触发消息至少包括触觉模式编码,所述触觉模式编码指示多种预定触觉模式中的一种,其中所述多种预定触觉模式与多种触觉效果相对应,所述触觉效果由用于驱动触觉输出器件的驱动信号表示;An input unit configured to receive a tactile trigger message, the tactile trigger message at least including a tactile mode code, the tactile mode code indicating one of a plurality of predetermined tactile modes, wherein the plurality of predetermined tactile modes are associated with a plurality of haptic effects Correspondingly, the tactile effect is represented by a driving signal for driving a tactile output device;
    解码单元,配置为解码所述触觉触发消息以确定所述触觉模式编码指示的触觉模式;a decoding unit configured to decode the haptic trigger message to determine the haptic mode indicated by the haptic mode code;
    触觉效果确定单元,配置为根据触觉模式编码与存储对应的驱动信号的寄存器地址之间的映射关系,确定与所述触觉模式编码对应的驱动信号的寄存器地址,从而确定与所述触觉模式对应的触觉效果;以及The tactile effect determination unit is configured to determine the register address of the driving signal corresponding to the tactile mode code according to the mapping relationship between the tactile mode code and the register address storing the corresponding driving signal, so as to determine the corresponding tactile mode haptic effects; and
    驱动单元,配置为使用所述寄存器地址中存储的驱动信号来驱动所述触觉输出器件,以输出所述触觉效果。A driving unit configured to use the driving signal stored in the address of the register to drive the tactile output device to output the tactile effect.
  12. 如权利要求11所述的触觉效果控制芯片,其中,所述触觉触发消息还包括报头,所述报头用于识别所述触觉触发消息。The haptic effect control chip according to claim 11, wherein the haptic trigger message further includes a header for identifying the haptic trigger message.
  13. 如权利要求11所述的触觉效果控制芯片,其中,所述触觉触发消息还包括与所述触觉模式编码相关联的优先级编码,所述优先级编码指示所述触觉模式编码指示的触觉模式的优先级。The haptic effect control chip according to claim 11, wherein the haptic trigger message further includes a priority code associated with the haptic mode code, the priority code indicating the haptic mode indicated by the haptic mode code. priority.
  14. 如权利要求13所述的触觉效果控制芯片,其中,所述解码单元在解码所述触觉触发消息时还确定所述优先级编码指示的优先级,并且所述触觉效果确定单元还配置为基于所述优先级来确定是否输出所述触觉效果。The haptic effect control chip according to claim 13, wherein the decoding unit further determines the priority indicated by the priority code when decoding the haptic trigger message, and the haptic effect determining unit is further configured to The priority is used to determine whether to output the haptic effect.
  15. 如权利要求11所述的触觉效果控制芯片,其中,所述输入单元从多个管脚接收所述触觉触发消息,所述多个管脚包括一个控制管脚以及一个或多个数据管脚,当所述控制管脚被激活时,在所述一个或多个数据管脚上接收所述触觉触发消息。The haptic effect control chip according to claim 11, wherein the input unit receives the haptic trigger message from multiple pins, the multiple pins include a control pin and one or more data pins, The haptic trigger message is received on the one or more data pins when the control pin is activated.
  16. 如权利要求11所述的触觉效果控制芯片,其中,所述输入单元包括I2C或I2S接口,所述触觉触发消息是在所述I2C或I2S接口上接收的,所述驱动信号包括在所述I2C或I2S接口上接收的实时驱动信号,通过所述I2C或I2S接口接收到的实时驱动信号被写入到先入先出寄存器,从而当解码所述触觉触发消息获得的触觉模式编码被映射到所述先入先出寄存器中用于存储所述实时驱动信号的寄存器地址时,使用所述寄存器地址中的所述实时驱动信号来驱动所述触觉输出器件,以实现所述触觉效果的实时输出。The haptic effect control chip according to claim 11, wherein the input unit includes an I2C or I2S interface, the haptic trigger message is received on the I2C or I2S interface, and the driving signal is included in the I2C Or the real-time driving signal received on the I2S interface, the real-time driving signal received through the I2C or I2S interface is written into the first-in-first-out register, so that the tactile pattern code obtained when decoding the tactile trigger message is mapped to the When the register address of the real-time driving signal is stored in the first-in-first-out register, the real-time driving signal in the register address is used to drive the haptic output device, so as to realize the real-time output of the haptic effect.
  17. 如权利要求11所述的触觉效果控制芯片,其中,所述驱动信号包括实时驱动信号,所述实时驱动信号和所述触觉触发消息通过所述触觉效果控制芯片的单个管脚被接收。The haptic effect control chip according to claim 11, wherein the driving signal comprises a real-time driving signal, and the real-time driving signal and the haptic trigger message are received through a single pin of the haptic effect control chip.
  18. 如权利要求17所述的触觉效果控制芯片,其中,所述实时驱动信号和所述触觉触发消息由浮动电平表示,所述浮动电平由所述触觉效果控制芯片中的电平检测单元进行检测和解码。The haptic effect control chip according to claim 17, wherein the real-time driving signal and the haptic trigger message are represented by a floating level, and the floating level is determined by a level detection unit in the haptic effect control chip detection and decoding.
  19. 如权利要求18所述的触觉效果控制芯片,其中,所述浮动电平具有与报头部分对应的第一电平范围和与信号载荷部分对应的第二电平范围,所述第一电平范围不同于所述第二电平范围,所述报头部分用于指示所述信号载荷部分包括触觉模式编码或实时驱动信号。The haptic effect control chip according to claim 18, wherein the floating level has a first level range corresponding to the header part and a second level range corresponding to the signal load part, and the first level range Different from the second level range, the header part is used to indicate that the signal payload part includes a tactile mode code or a real-time driving signal.
  20. 一种移动电子设备,包括:A mobile electronic device comprising:
    至少一个触觉输出器件;以及at least one tactile output device; and
    权利要求11-19中的任一项所述的触觉效果控制芯片,用于响应于接收到的触觉触发消息,控制所述至少一个触觉输出器件输出相应的触觉效果。The haptic effect control chip according to any one of claims 11-19, configured to control the at least one haptic output device to output a corresponding haptic effect in response to the received haptic trigger message.
PCT/CN2022/094245 2021-06-10 2022-05-20 Haptic effect control method and apparatus, and electronic device WO2022257737A1 (en)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN202110647049.6A CN113296638A (en) 2021-06-10 2021-06-10 Method and device for controlling tactile feedback and electronic equipment comprising device
CN202110647060.2 2021-06-10
CN202110647057.0 2021-06-10
CN202110647060.2A CN113253848A (en) 2021-06-10 2021-06-10 Method and device for controlling tactile feedback and electronic equipment comprising device
CN202110647049.6 2021-06-10
CN202110647057.0A CN113110748B (en) 2021-06-10 2021-06-10 Haptic effect control method and device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2022257737A1 true WO2022257737A1 (en) 2022-12-15

Family

ID=84425748

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/094245 WO2022257737A1 (en) 2021-06-10 2022-05-20 Haptic effect control method and apparatus, and electronic device

Country Status (1)

Country Link
WO (1) WO2022257737A1 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101272554A (en) * 2006-12-21 2008-09-24 三星电子株式会社 Haptic generation method and system for mobile phone
US20120229401A1 (en) * 2012-05-16 2012-09-13 Immersion Corporation System and method for display of multiple data channels on a single haptic display
CN105183145A (en) * 2014-06-09 2015-12-23 伊默森公司 Haptic Devices And Methods For Providing Haptic Effects Via Audio Tracks
US20160310844A1 (en) * 2015-04-21 2016-10-27 Nintendo Co., Ltd. Storage medium having stored therein vibration signal generation program, vibration signal generation system, vibration signal generation apparatus, vibration signal generation method, and storage medium having stored therein data output program
CN110073315A (en) * 2017-01-13 2019-07-30 英特尔公司 The device and method that tactile for modifying haptic apparatus exports
CN111158465A (en) * 2019-12-09 2020-05-15 瑞声科技(新加坡)有限公司 Force touch vibration feedback method and system
CN111312281A (en) * 2020-05-09 2020-06-19 北京小米移动软件有限公司 Touch vibration implementation method
CN113110748A (en) * 2021-06-10 2021-07-13 武汉市聚芯微电子有限责任公司 Haptic effect control method and device and electronic equipment
CN113253848A (en) * 2021-06-10 2021-08-13 武汉市聚芯微电子有限责任公司 Method and device for controlling tactile feedback and electronic equipment comprising device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101272554A (en) * 2006-12-21 2008-09-24 三星电子株式会社 Haptic generation method and system for mobile phone
US20120229401A1 (en) * 2012-05-16 2012-09-13 Immersion Corporation System and method for display of multiple data channels on a single haptic display
CN105183145A (en) * 2014-06-09 2015-12-23 伊默森公司 Haptic Devices And Methods For Providing Haptic Effects Via Audio Tracks
US20160310844A1 (en) * 2015-04-21 2016-10-27 Nintendo Co., Ltd. Storage medium having stored therein vibration signal generation program, vibration signal generation system, vibration signal generation apparatus, vibration signal generation method, and storage medium having stored therein data output program
CN110073315A (en) * 2017-01-13 2019-07-30 英特尔公司 The device and method that tactile for modifying haptic apparatus exports
CN111158465A (en) * 2019-12-09 2020-05-15 瑞声科技(新加坡)有限公司 Force touch vibration feedback method and system
CN111312281A (en) * 2020-05-09 2020-06-19 北京小米移动软件有限公司 Touch vibration implementation method
CN113110748A (en) * 2021-06-10 2021-07-13 武汉市聚芯微电子有限责任公司 Haptic effect control method and device and electronic equipment
CN113253848A (en) * 2021-06-10 2021-08-13 武汉市聚芯微电子有限责任公司 Method and device for controlling tactile feedback and electronic equipment comprising device

Similar Documents

Publication Publication Date Title
US10656718B2 (en) Device and method for outputting a series of haptic effects defined in a timeline effect definition
JP2019185011A (en) Processing method for waking up application program, apparatus, and storage medium
CN107256707B (en) Voice recognition method, system and terminal equipment
CN113110748B (en) Haptic effect control method and device and electronic equipment
US7050046B1 (en) Device and method for recognizing characters input through a touch screen
CN114518817B (en) Display method, electronic device and storage medium
CN104252226A (en) Information processing method and electronic equipment
JP7258932B2 (en) NOISE REDUCTION METHOD, APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM BASED ON IN-VEHICLE MULTI-RANGE
US20140286137A1 (en) Method of controlling alarm function and electronic device supporting the same
US20180166073A1 (en) Speech Recognition Without Interrupting The Playback Audio
TW201520896A (en) A method for operating a program and a device thereof
CN111343344B (en) Voice abnormity detection method and device, storage medium and electronic equipment
US20070079015A1 (en) Methods and arrangements to interface a data storage device
EP3629184A1 (en) Method and apparatus for cache access mode selection
WO2022161244A1 (en) Multi-host arbitration method and apparatus, and readable storage medium
WO2022257737A1 (en) Haptic effect control method and apparatus, and electronic device
CN109686372B (en) Resource playing control method and device
US20230379873A1 (en) Notification message reminder method, notification message reminder apparatus, and electronic device
CN113253848A (en) Method and device for controlling tactile feedback and electronic equipment comprising device
CN101075379A (en) Timing interdynamic studying method
JPWO2018138798A1 (en) Computer apparatus, task activation method, and task activation program
JP4328703B2 (en) Display device, mode determination device and mode determination method thereof
CN108181988B (en) Control method and device for LRA motor driving chip
JP2001216131A (en) Information processor, its method and program storage medium
CN113296638A (en) Method and device for controlling tactile feedback and electronic equipment comprising device

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: 22819335

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE