Patent ID: 12189859

DESCRIPTION OF EMBODIMENTS

The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. It is appreciated that, the described embodiments are only some of the embodiments of the present disclosure, but not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present disclosure.

Embodiment 1

Referring toFIG.1, this embodiment of the present disclosure provides a method for driving vibration based on micro-touch, applied to touch electronic terminals, such as a mobile phone or a tablet computer. The method includes the following steps.

In S1, according to a given input of a touch interface, a plurality of node coordinates Pn of a dynamic effect model corresponding to the given input and a total duration dur of the plurality of node coordinates Pn are acquired, where n is a positive integer greater than 1.

The given input may be a dynamic effect within an APP, an internal operating system of the electronic terminal, or the like.

In this step, the type of the dynamic effect model is not limited herein, which may be a third-order Bezier curve animation model, an RK4 animation model, a DHO animation model, or the like. In this embodiment, the following detailed description is based on an example in which the dynamic effect model is the third-order Bezier curve animation model. The number of the acquired node coordinates of the dynamic effect model corresponding to the given input is 4, but is not limited to 4.

In S2, a dynamic effect curve is generated according to the plurality of node coordinates and the total duration.

This step S2includes the following sub-steps.

In S21, Bezier curve trajectory coordinates (i.e., dynamic effect curve trajectory coordinates) corresponding to a time t are generated according to the plurality of node coordinates Pn=(xn, yn) and the total duration dur, and a Bezier curve trajectory (i.e., a dynamic effect curve trajectory) is obtained according to the Bezier curve trajectory coordinates, where n is a positive integer greater than 1.

For example, 4 node coordinates are provided. That is, the acquired node coordinates are P1=(x1, y1), P2=(x2, y2), P3=(x3, y3), and P4=(x4, y4).

In S22, first-order derivation is performed on the Bezier curve trajectory to obtain x-direction velocities and y-direction velocities, so as to obtain the time t of the Bezier curve trajectory and an x-direction velocity Xvel(t) and the y-direction velocity Yvel(t) of the Bezier curve trajectory corresponding to the time t and then generate the Bezier curve (i.e., the dynamic effect curve).

In S3, a vibration characteristic curve is obtained from the dynamic effect curve according to a preset mapping rule.

This step S3includes the following sub-steps.

In S31, an x-direction time-velocity curve and a y-direction time-velocity curve corresponding to the time t are generated according to the Bezier curve (i.e., the dynamic effect curve).

In S32, according to the x-direction velocity Xvel(t) and a preset relative frequency interval [f_min, f_max], the x-direction velocity Xvel(t) is caused to maintain its own velocity trend based on the x-direction time-velocity curve and to be simultaneously mapped to the preset relative frequency interval [f_min, f_max], so that a maximum value of the x-direction velocity Xvel(t) is mapped to f_max, a minimum value of the x-direction velocity Xvel(t) is mapped to f_min. The corresponding mapping function is a monotonic function, the function form includes linear mapping and nonlinear mapping, and a vibration time-frequency curve is finally generated.

In S33, according to the y-direction velocity Yvel(t) and a preset relative intensity interval [0, 1], the y-direction velocity Yvel(t) is mapped to the preset relative intensity interval [0, 1], so that a maximum value of the y-direction velocity Yvel(t) is mapped to 1, and a minimum value of the y-direction velocity Yvel(t) is mapped to 0. Weighting is performed on this basis to increase volatility, a corresponding mapping function is a monotonic function, the function form includes linear mapping and nonlinear mapping, and a vibration time-intensity curve is finally generated.

It is to be noted that S32and S33are interchangeable in their orders.

In S34, a vibration time-frequency curve and a vibration time-intensity curve are taken as the vibration characteristic curve.

In S4, a vibration driving file is generated according to the vibration characteristic curve, the vibration driving file is used to drive a vibrating motor to vibrate.

This step S4includes: generating event node information according to the vibration characteristic curve, and writing the event node information into a readable vibration format file, so as to generate the vibration driving file.

For example, the method in this embodiment is applied to a mobile phone. Micro-interaction between the “micro-touch” vibration manner and the APP or operating system in the mobile phone realized in the above method is to combine various animation models and touches in the operating system or APP of the mobile phone to establish a mapping relationship between touch effects and animation models, and to realize a combination of micro-animations by modifying various animation models and also modifying touch vibration effects. Appropriate touch effects are added to special interaction scenes and gestures to guide user interaction, thereby effectively enriching user experience. For example, animation models and touch effects are mapped and bound by switching left and right cards, delete, or like, so that animation parameters are set for an interface interactive control, and an appropriate touch effect can also be automatically generated according to set animation model parameters, which achieves deep animation-touch binding.

Compared with the related art, in the method for driving vibration based on micro-touch in the present disclosure, dynamic effect models of APPs and application scenes are read, dynamic effect curves thereof are obtained, and the dynamic effect curves and touch effects are mapped and bound in conjunction with the preset mapping rule, thereby generating vibration driving files corresponding to different dynamic effect models and achieving different driving effects, which realizes an interaction mode of binding and combining animations and touches, and sets animation parameters of the dynamic effect models, which can also automatically generate appropriate tactile effects according to set parameters of the dynamic effect models (that is, touches are combined with various dynamic effect models (such as the third-order Bezier curve model, the RK4 animation model, and the DHO animation model) to provide users with new experience, and new touch interaction is performed through animation model-tactile parameter mapping), thereby effectively improving user experience.

Embodiment 2

Referring toFIG.2, an embodiment of the present disclosure further provides an apparatus for driving vibration200, including: an acquisition module201, a dynamic effect curve generation module202, a vibration characteristic curve generation module203, and a vibration file generation module204.

The acquisition module201is configured to acquire, according to a given input of a touch interface, a plurality of node coordinates of a dynamic effect model corresponding to the given input and a total duration of the plurality of node coordinates.

The dynamic effect curve generation module202is configured to generate a dynamic effect curve according to the plurality of node coordinates and the total duration.

The type of the dynamic effect model is not limited herein, which may be a third-order Bezier curve animation model, an RK4 animation model, a DHO animation model, or the like. In this embodiment, the following detailed description is based on an example in which the dynamic effect model is the third-order Bezier curve animation model. The number of the acquired node coordinates of the dynamic effect model corresponding to the given input is 4, but is not limited to 4.

The dynamic effect curve generation module202generates Bezier curve trajectory coordinates (i.e., dynamic effect curve trajectory coordinates) corresponding to a time t according to the plurality of node coordinates Pn=(xn, yn) and the total duration dur, and obtains a Bezier curve trajectory (i.e., a dynamic effect curve trajectory) according to the Bezier curve trajectory coordinates; where n is a positive integer greater than 1. For example, 4 node coordinates are provided. That is, the acquired node coordinates are P1=(x1, y1), P2=(x2, y2), P3=(x3, y3), and P4=(x4, y4). Then, the dynamic effect curve generation module202performs first-order derivation on the Bezier curve trajectory to obtain x-direction velocities and y-direction velocities, so as to obtain the time t of the Bezier curve trajectory and an x-direction velocity Xvel(t) and the y-direction velocity Yvel(t) of the Bezier curve trajectory corresponding to the time t and then generate the Bezier curve (i.e., the dynamic effect curve).

The vibration characteristic curve generation module203is configured to obtain a vibration characteristic curve from the dynamic effect curve according to a preset mapping rule.

Firstly, the vibration characteristic curve generation module203generates, according to the Bezier curve (i.e., the dynamic effect curve), an x-direction time-velocity curve and a y-direction time-velocity curve corresponding to the time t. Then, the vibration characteristic curve generation module203causes, according to the x-direction velocity Xvel(t) and a preset relative frequency interval [f_min, f_max], the x-direction velocity Xvel(t) to maintain its own velocity trend based on the x-direction time-velocity curve and to be simultaneously mapped to the preset relative frequency interval [f_min, f_max], so that a maximum value of the x-direction velocity Xvel(t) is mapped to f_max, a minimum value of the x-direction velocity Xvel(t) is mapped to f_min. The corresponding mapping function is a monotonic function, and the function form includes linear mapping and nonlinear mapping, and finally a vibration time-frequency curve is generated. At the same time, the vibration characteristic curve generation module203maps, according to the y-direction velocity Yvel(t) and a preset relative intensity interval [0, 1], the y-direction velocity Yvel(t) is mapped to the preset relative intensity interval [0, 1], so that a maximum value of the y-direction velocity Yvel(t) is mapped to 1, and a minimum value of the y-direction velocity Yvel(t) is mapped to 0, and performs weighting on this basis to increase volatility. The corresponding mapping function is a monotonic function, and the function form includes linear mapping and nonlinear mapping, and finally a vibration time-intensity curve is generated. Finally, the characteristic curve generation module203takes a vibration time-frequency curve and a vibration time-intensity curve as the vibration characteristic curve.

The vibration file generation module204is configured to generate a vibration driving file according to the vibration characteristic curve. The vibration driving file is used to drive a vibrating motor to vibrate. The vibration file generation module204generates event node information according to the vibration characteristic curve, and writes the event node information into a readable vibration format file, so as to generate the vibration driving file.

In this embodiment, the technical effect achieved by the apparatus for driving vibration200is the same as that achieved by the method for driving vibration based on micro-touch provided above in the present disclosure. Details are not described herein again.

Embodiment 3

An embodiment of the present disclosure further provides an electronic device300, including a processor301, a memory302, and a vibration driving program stored in the memory302and executable by the processor301. When the vibration driving program is executed by the processor301, steps in the method for driving vibration based on micro-touch as provided above in the present disclosure are implemented.

According to a given input of a touch interface, a plurality of node coordinates Pn of a dynamic effect model corresponding to the given input and a total duration dur of the plurality of node coordinates Pn are acquired, where n is a positive integer greater than 1.

A dynamic effect curve is generated according to the plurality of node coordinates and the total duration. Bezier curve trajectory coordinates (i.e., dynamic effect curve trajectory coordinates) corresponding to a time t are generated according to the plurality of node coordinates Pn=(xn, yn) and the total duration dur, and a Bezier curve trajectory (i.e., a dynamic effect curve trajectory) is obtained according to the Bezier curve trajectory coordinates; where n is a positive integer greater than 1. For example, 4 node coordinates are provided. That is, the acquired node coordinates are P1=(x1, y1), P2=(x2, y2), P3=(x3, y3), and P4=(x4, y4). Then, first-order derivation is performed on the Bezier curve trajectory to obtain x-direction velocities and y-direction velocities, so as to obtain the time t of the Bezier curve trajectory and an x-direction velocity Xvel(t) and the y-direction velocity Yvel(t) of the Bezier curve trajectory corresponding to the time t and then generate the Bezier curve (i.e., the dynamic effect curve).

A vibration characteristic curve is obtained from the dynamic effect curve according to a preset mapping rule. Specifically, according to the Bezier curve (i.e., the dynamic effect curve), an x-direction time-velocity curve and a y-direction time-velocity curve corresponding to the time t are first generated. Then, according to the x-direction velocity Xvel(t) and a preset relative frequency interval [f_min, f_max], the x-direction velocity Xvel(t) is caused to maintain its own velocity trend based on the x-direction time-velocity curve and to be simultaneously mapped to the preset relative frequency interval [f_min, f_max], so that a maximum value of the x-direction velocity Xvel(t) is mapped to f_max, a minimum value of the x-direction velocity Xvel(t) is mapped to f_min. The corresponding mapping function is a monotonic function, and the function form includes linear mapping and nonlinear mapping, and a vibration time-frequency curve is finally generated. According to the y-direction velocity Yvel(t) and a preset relative intensity interval [0, 1], the y-direction velocity Yvel(t) is mapped to the preset relative intensity interval [0, 1], so that a maximum value of the y-direction velocity Yvel(t) is mapped to 1, and a minimum value of the y-direction velocity Yvel(t) is mapped to 0. Weighting is performed on this basis to increase volatility. The corresponding mapping function is a monotonic function, and the function form includes linear mapping and nonlinear mapping, and a vibration time-intensity curve is finally generated. Finally, a vibration time-frequency curve and a vibration time-intensity curve are taken as the vibration characteristic curve.

A vibration driving file is generated according to the vibration characteristic curve. The vibration driving file is used to drive a vibrating motor to vibrate.

It is to be noted that the electronic device300further includes a vibrating motor303. When the vibration driving program is executed by the processor301, according to the vibration driving file generated by mapping of the dynamic effect model of the given input, the processor301directly drives the vibrating motor303to achieve animation-touch interaction. In other words, in use, the electronic device300can achieve the technical effect achieved by the method for driving vibration based on micro-touch as described above. Please refer to the description of the method for driving vibration based on micro-touch above for details, which are not described herein again.

Embodiment 4

An embodiment of the present disclosure further provides a computer-readable storage medium. The computer-readable storage medium stores a vibration driving program. When the vibration driving program is executed by the processor, steps in the method for driving vibration based on micro-touch as provided above in the present disclosure are implemented. Therefore, the technical effect achieved is the same as that achieved by the method for driving vibration based on micro-touch. Details are not described herein again.

The above are merely the embodiments of the present disclosure. It should be noted herein that, for those of ordinary skill in the art, improvements can be made without departing from the creative concept of the present disclosure, but these all fall within the protection scope of the present disclosure.