Motor driving method, electronic device and readable medium
By using at least two motors in electronic devices, local vibration control is achieved, and the problem of single motor vibration driving the vibration of the overall equipment is solved, and diverse vibration sensing feedback is provided to meet the needs of different application scenarios.
Patent Information
- Application Number
- CN202310518825.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2024-11-12
AI Technical Summary
Vibration of a single motor in existing electronic devices is easy to drive the overall equipment to vibrate, and it is difficult to meet the diverse needs of vibration tactile feedback in different application scenarios.
Using a driving method of at least two motors, the operating parameters are obtained by detecting the trigger event, the drive motor operates in a specific mode to achieve local vibration, avoid overall vibration, and achieve diversified vibration inductive feedback through a variety of vibration modes and parameter combinations.
It effectively avoids the overall equipment vibration caused by the vibration of a single motor, meets the diverse needs of vibration strength and distribution modes in different application scenarios, and provides a richer vibration feedback experience.
Smart Images

Figure CN118945247A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor technology, and in particular to a motor driving method, electronic equipment, computer program product, and computer-readable storage medium. Background Art
[0002] The motor is set in an electronic device such as a mobile phone, and is used to make the electronic device output a vibration through vibration. In different scenarios of the electronic device, the motor can be controlled to vibrate so that the user can feel the vibration to prompt the user or provide feedback on the user's operation.
[0003] An electronic device is equipped with a motor to provide tactile vibration, but the vibration intensity distribution pattern provided by a motor is relatively simple, which is difficult to meet the needs of users for tactile vibration feedback in different application scenarios. Therefore, some electronic devices are equipped with two motors, which are placed in different areas of the electronic device, and the electronic device controls the two motors to vibrate separately. However, the vibration of a single motor will cause the entire electronic device to vibrate. Summary of the invention
[0004] The present application provides a motor driving method, electronic device, computer program product and computer readable storage medium, the purpose of which is to avoid driving a single motor to vibrate and causing the entire electronic device to vibrate.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] In a first aspect, the present application provides a motor driving method, which can be applied to an electronic device having at least two motors, and the at least two motors of the electronic device can be operated simultaneously or individually to provide a vibration sense to the user. The motor driving method includes: detecting a triggering event of the electronic device generating motor vibration, obtaining event information of the triggering event of the motor vibration; using the event information of the triggering event of the motor vibration to obtain operating parameters of at least two motors; driving at least two motors to operate with the operating parameters to output a vibration sense that meets the vibration requirements of a local area of the electronic device.
[0007] It can be seen from the above content that the trigger event of motor vibration is generated when the electronic device detects the need to drive the motor to run. Therefore, the electronic device detects that the trigger event of motor vibration is generated, indicating that the motor needs to be driven to output vibration. The electronic device obtains the event information of the trigger event of motor vibration, uses the event information of the trigger event of motor vibration to obtain the operating parameters of at least two motors, and drives at least two motors to run with the operating parameters so that the motor output meets the vibration requirements of the local area of the electronic device. This can avoid the overall vibration of the electronic device caused by the electronic device driving a single motor to run.
[0008] In one possible implementation, at least two motors of an electronic device usually correspond to a variety of operating parameters, and at least two motors can output a whole-machine vibration quantity distribution when operating under a certain operating parameter, that is, the user can feel the vibration in an area of the electronic device. The method for generating one operating parameter of at least two motors is: constructing a structural model for the electronic device, setting a target vibration quantity distribution for the structural model, calculating the whole-machine vibration quantity distribution of at least two motors operating under different operating parameters, and using the operating parameters of at least the motor under the whole-machine vibration quantity distribution corresponding to the target vibration quantity distribution as the operating parameters of the motor corresponding to the target vibration quantity distribution. Among them, the event information of the triggering event of the motor vibration can represent a target vibration quantity distribution.
[0009] In one possible implementation, the operating parameters of at least two motors are obtained using event information of a triggering event of motor vibration, including: using event information of a triggering event of motor vibration to determine one vibration mode of a plurality of vibration modes of the motor, one vibration mode of the motor corresponding to vibration in a local area of the electronic device achieved by superposition and offset of vibrations of at least two motors; and obtaining the operating parameters of at least two motors corresponding to the determined vibration mode.
[0010] In this possible implementation, the motor of the electronic device is configured with multiple vibration modes, each vibration mode corresponds to the operating parameters of the motor, and one vibration mode of the motor corresponds to the superposition and offset of at least two motor vibrations to achieve vibration in a local area of the electronic device, that is, when the motor is running in one vibration mode, the superposition and offset of at least two motor vibrations can be achieved to achieve vibration in a local area of the electronic device. In this way, event information for the triggering event of motor vibration can be realized, and at least two motors can be driven to operate to bring about vibration in a local area of the electronic device, rather than overall vibration.
[0011] In some embodiments, the electronic device is configured with a correspondence between event information of a motor vibration triggering event and a vibration mode of the motor. The electronic device can determine a vibration mode of the motor from the correspondence through the event information of the motor vibration triggering event, and then obtain operating parameters of the motor under the vibration mode.
[0012] In a possible implementation, the operating parameters of the at least two motors include: the vibration amplitude, phase and vibration frequency of each of the at least two motors, or the vibration amplitude ratio, phase difference and vibration frequency of the at least two motors.
[0013] In one possible embodiment, the operating parameters of at least two motors further include: a vibration waveform, a driving duration or an excitation duration of each of the at least two motors, and / or a vibration amplitude amplification factor of each of the at least two motors.
[0014] In the above possible implementations, the vibration waveform, driving duration or excitation duration of the motor can determine the duration of the motor operation, and thus determine the strength of the motor vibration. The vibration amplitude amplification factor of the motor can adjust the vibration amplitude of the motor to achieve the strength of a vibration during the motor vibration process.
[0015] In one possible implementation, detecting that an electronic device generates a trigger event for motor vibration, and obtaining event information of the trigger event for motor vibration include: detecting that an application of the electronic device generates a trigger event for motor vibration, and obtaining event information of the trigger event for motor vibration; during the operation of the application of the electronic device, the application detects that the application meets the trigger condition for motor vibration, and generates a trigger event for motor vibration.
[0016] In the above possible implementation manner, the application of the electronic device generates a trigger event of motor vibration. The electronic device uses the event information of the trigger event of motor vibration to obtain operating parameters of at least two motors, and drives at least two motors to operate with the operating parameters. This can realize the response of driving the motor to vibrate to remind the user in response to the application needs of the electronic device.
[0017] In one possible implementation, detecting that an application of an electronic device generates a trigger event of motor vibration, and obtaining event information of the trigger event of motor vibration include: detecting that a game application of the electronic device generates a key event, and obtaining information of the key event, wherein a response method of the key event is to trigger motor vibration to provide a vibration sensation to a user, or the key event is a state change event of an object.
[0018] In the above possible implementation, the electronic device detects that a game application generates an event that needs to trigger motor vibration to provide a vibration sensation to the user, or an object state change event, the electronic device obtains information about the event, and uses the information about the event to obtain operating parameters of at least two motors, and drives at least two motors to operate with the operating parameters. This allows the electronic device to respond to key events generated by the game application and drive the motor to provide the user with a vibration sensation in a local area of the electronic device.
[0019] In one application scenario, when a game application is running, a bomb on the left side of an object explodes, and the game application generates a trigger event for motor vibration. The electronic device uses the information of the trigger event to obtain the operating parameters of at least two motors, and drives at least two motors to operate with the operating parameters, so as to achieve vibration of the left area of the electronic device.
[0020] In a possible implementation, the key event response method is to trigger a motor to vibrate to provide a vibration sensation to the user, and the key event information includes the location of the key event; the key event is a state change event of an object, and the key event information includes the type of the key event.
[0021] In one possible implementation, the key event response method is to trigger motor vibration to provide a vibration sensation to the user, and the key event information also includes: the distance between the key event and the object and the type of the key event; wherein, the event information of the triggering event of motor vibration is used to obtain the operating parameters of at least two motors, including: using the orientation of the key event to obtain the vibration amplitude, phase and vibration frequency of each of the at least two motors, or the vibration amplitude ratio, phase difference and vibration frequency of at least two motors; using the distance between the key event and the object to obtain the vibration amplitude amplification factor of each of the at least two motors; using the type of the key event to obtain the vibration waveform, driving duration or excitation duration of each of the at least two motors.
[0022] In one possible implementation, the key event is a state change event of an object, and the information of the key event also includes: description information of the key event; wherein, the event information of the motor vibration trigger event is used to obtain the operating parameters of at least two motors, including: using the type of the key event to obtain the vibration amplitude, phase and vibration frequency of each of the at least two motors, or the vibration amplitude ratio, phase difference and vibration frequency of at least two motors; using the description information of the key event to obtain the vibration amplitude amplification factor of each of the at least two motors, as well as the vibration waveform, driving duration or excitation duration of each of the at least two motors.
[0023] In one possible implementation, the electronic device includes at least three motors, and detecting that an application of the electronic device generates a trigger event for motor vibration, and obtaining event information of the trigger event for motor vibration includes: detecting that a navigation application of the electronic device generates a key event, and obtaining information about the key event, wherein the information about the key event includes: the front end direction of the electronic device, and the navigation direction in the navigation track generated by the navigation application.
[0024] In the above possible implementation, the electronic device detects that a game application generates an event that needs to trigger motor vibration to provide a vibration sensation to the user, or an object state change event, the electronic device obtains information about the event, and uses the information about the event to obtain operating parameters of at least two motors, and drives at least two motors to operate with the operating parameters. This allows the electronic device to respond to key events generated by the game application and drive the motor to provide the user with a vibration sensation in a local area of the electronic device.
[0025] In one application scenario, when a game application is running, a bomb on the left side of an object explodes, and the game application generates a trigger event for motor vibration. The electronic device uses the information of the trigger event to obtain the operating parameters of at least two motors, and drives at least two motors to operate with the operating parameters, so as to achieve vibration of the left area of the electronic device.
[0026] In one possible implementation, the information of the key event also includes: the distance between the current position of the electronic device and the next direction adjustment point; the next direction adjustment point is a direction adjustment point in the navigation trajectory that is adjacent to the current position of the electronic device, wherein the event information of the motor vibration triggering event is used to obtain the operating parameters of at least two motors, including: using the angle between the front end direction of the electronic device and the navigation direction to obtain the vibration amplitude, phase and vibration frequency of each of at least three motors, or the vibration amplitude ratio, phase difference and vibration frequency of at least three motors; using the distance between the current position of the electronic device and the next direction adjustment point to obtain the vibration waveform, driving duration or excitation duration of each of at least three motors.
[0027] In a possible implementation, the method further includes: detecting that the user deviates from the navigation direction, obtaining operating parameters of at least three motors corresponding to a vibration mode without a directional pointing attribute, wherein the operating parameters of the vibration mode without a directional pointing attribute include: the vibration amplitude, phase and vibration frequency of each of the at least three motors, or the vibration amplitude ratio, phase difference and vibration frequency of at least three motors; and driving the at least three motors to operate with the operating parameters of the vibration mode without a directional pointing attribute.
[0028] In one application scenario, the compass of the electronic device is malfunctioning, and the pointer of the navigation application may point to a moving direction opposite to the next direction adjustment point. The navigation application confirms that the user is moving in the direction guided by the vibration-assisted navigation (i.e., the direction of the pointer of the navigation application), but the actual situation is that the location of the electronic device is getting farther and farther away from the next direction adjustment point, which means that the user has deviated from the navigation direction by 180°. In this scenario, if the user of the electronic device deviates from the navigation direction, the electronic device can drive the motor to operate through the operating parameters of the vibration mode that does not have directional pointing properties, and provide the user with a non-directional vibration to remind the user that the navigation direction has deviated.
[0029] In one possible implementation, after driving at least three motors to operate with operating parameters of a vibration mode that does not have a directional pointing attribute, it also includes: using the angle between the front end direction of the electronic device and the navigation direction to obtain operating parameters of at least three motors, the operating parameters of at least three motors including: the vibration amplitude, phase and vibration frequency of each of the at least three motors, or the vibration amplitude ratio, phase difference and vibration frequency of at least three motors; driving at least three motors to operate with the operating parameters of at least three motors to output a vibration sensation that meets the vibration requirements of a local area of the electronic device.
[0030] In one possible implementation, before detecting a triggering event in which an electronic device generates motor vibration and obtaining event information of the triggering event for the motor vibration, the method further includes: displaying a variety of local vibration reminder options on the interface of the application of the electronic device in response to a user's operation on an application of the electronic device; and receiving a user's operation on the variety of local vibration reminder options, and the operation is used to start the variety of local vibration reminder function of the application.
[0031] In a second aspect, the present application provides an electronic device comprising: one or more processors, a memory, and at least two motors; the memory and the at least two motors are coupled to one or more of the processors, the memory is used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the motor driving method as described in any one of the first aspects.
[0032] In a third aspect, the present application provides a computer-readable storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the motor driving method as described in any one of the first aspects.
[0033] In a fourth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute a motor driving method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 Three application scenarios of motor vibration provided in the embodiments of the present application;
[0035] Figure 2 A diagram showing an electronic device provided in an embodiment of the present application having two motors;
[0036] Figure 3 A diagram showing the vibration amount of the entire housing of the electronic device provided in an embodiment of the present application;
[0037] Figure 4 A flow chart of a method for generating a multi-motor drive solution provided in an embodiment of the present application;
[0038] Figure 5 Another diagram showing the vibration amount of the entire housing of the electronic device provided in an embodiment of the present application;
[0039] Figure 6 A diagram showing an electronic device provided in an embodiment of the present application having three motors;
[0040] Figure 7 Another diagram showing the vibration amount of the entire housing of the electronic device provided in an embodiment of the present application;
[0041] Figures 8 to 10 Several display diagrams of the vibration amount of the entire housing of the electronic device provided in the embodiments of the present application;
[0042] Fig.11 A hardware structure diagram of an electronic device provided in an embodiment of the present application;
[0043] Fig.12 A software framework diagram of an electronic device provided in an embodiment of the present application;
[0044] Fig.13 A signaling diagram of a motor driving method provided in an embodiment of the present application;
[0045] Fig.14 A display diagram of the entrance of the "diversified local vibration reminder" of the motor in the game application provided in the embodiment of the present application;
[0046] Fig.15 A corresponding diagram of motor vibration and navigation direction of an electronic device provided in an embodiment of the present application;
[0047] Fig.16 A signaling diagram of another motor driving method provided in an embodiment of the present application;
[0048] Fig.17 A display diagram of the entrance of the "diversified local vibration reminder" of the motor in the navigation application provided in the embodiment of the present application;
[0049] Fig.18 A schematic diagram of the motor setting position of a foldable electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0051] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0052] The multiple involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first", "second", etc. are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.
[0053] The motor is set in the electronic device and is used to make the electronic device output vibration through vibration. In different scenarios of the electronic device, the motor can be controlled to vibrate so that the user can feel the vibration to prompt the user or provide feedback on the user's operation. For example, in application scenarios such as incoming calls and alarm clocks, the electronic device needs to vibrate the motor in the electronic device to make the user feel the vibration of the electronic device to serve as a reminder. In addition, in text input and specific game scenarios, users also need the vibration of the motor of the electronic device to provide tactile feedback.
[0054] For example, Figure 1 Three application scenarios of motor vibration are demonstrated.
[0055] Figure 1 (a) shows the application scenario of incoming phone calls. Figure 1 As shown in (a), when a call comes in on the mobile phone, the motor is driven to vibrate to remind the user of the incoming call.
[0056] Figure 1 (b) shows an application scenario where a user inputs an operation instruction to unlock an electronic device. Figure 1 As shown in (b), the user inputs a touch operation in the fingerprint recognition area on the display screen of the electronic device, the user's fingerprint is verified, and the electronic device is unlocked when the verification is passed. In this application scenario, when the user's finger touches the display screen, the motor is driven to provide tactile feedback to the user, and the user can feel the vibration output by the motor through the finger performing the touch operation.
[0057] Figure 1 (c) shows the game scene. Figure 1As shown in (c), in the game scene, the bomb on the left side of the character explodes and the motor is driven to vibrate.
[0058] Mobile phones and other electronic devices are equipped with a motor to provide tactile vibration, but the vibration intensity distribution pattern provided by a motor is relatively simple, which is difficult to meet the needs of users for tactile vibration feedback in different application scenarios. Therefore, some electronic devices are equipped with two motors, which are placed in different areas of the electronic device, and the electronic device can control the vibration of the two motors separately. However, the vibration of a single motor will cause the entire electronic device to vibrate.
[0059] For example, Figure 2 As shown in the figure, a motor is configured on each side of the electronic device. Ten vibration measurement points are evenly arranged on the housing of the electronic device, and the ten vibration measurement points are used to describe the vibration distribution of the entire housing. Figure 3 As shown in (a) and (b), the target vibration area A of the electronic device housing needs to generate local vibration, and only the motor 1 can be driven to work. Figure 3 (c) and (d) show the vibration of the whole machine shell calculated by dynamic simulation. Figure 3 As shown in (c) and (d), the non-target vibration area B where the vibration measuring points 5 and 6 are located also has large vibrations.
[0060] Based on this, the electronic device stores a plurality of multi-motor drive schemes corresponding to local vibration modes, each local vibration mode is used to indicate the area where the vibration sense provided by the motor vibration is located (also called the target vibration area), and the multi-motor drive scheme corresponding to each local vibration mode includes the operating parameters of the motor of the electronic device. The electronic device uses the multi-motor drive scheme to drive the motor of the electronic device to operate, which can achieve a strong vibration sense in the target vibration area and a weak vibration sense or even no vibration sense in the non-target vibration area.
[0061] The multi-motor drive scheme can be obtained by using the method provided in the following content. Terminals, servers and other devices can generate multi-motor drive schemes by using the method for generating multi-motor drive schemes.
[0062] like Figure 4 As shown, the method for generating a multi-motor drive solution includes:
[0063] S401. Establish a structural model of the electronic device.
[0064] The structural model of an electronic device is used to simulate the electronic device, and usually includes the hardware components of the electronic device and the material parameters of each hardware component. Since the electronic device is equipped with at least two motors for providing vibration tactile sensation, the structural model of the electronic device also includes at least two motors.
[0065] S402: Simplify the structural model of the electronic device according to the influence of the structural components of the electronic device on the vibration transmission of the motor.
[0066] The structural model of the electronic device is used as a simulated electronic device to perform various task tests instead of the electronic device. The vibration distribution of the motor vibration can be understood as a test task. Usually, the structural model of the electronic device constructed in step S401 belongs to the complete structural model of the electronic device. The structural model of the electronic device performs the test of the vibration distribution of the motor vibration, and some hardware components in the structural model of the electronic device do not need to run. Therefore, the structural model of the electronic device can be simplified.
[0067] In some embodiments, an implementation method of simplifying the structural model of an electronic device is: screening out a portion of devices in the structural model of the electronic device. The devices may have a complex internal structure design, containing a variety of metal and non-metal materials to serve their functional characteristics. A portion of the devices can be equivalent to a structure composed of a certain material, and the material parameters can be determined based on the vibration transfer characteristics without establishing the detailed internal structure of the device.
[0068] It should be noted that step S402 may not be performed, and the following steps may be performed with the complete structural model of the electronic device.
[0069] S403: Setting a target vibration distribution for the structural model of the electronic device.
[0070] A target vibration amount distribution is set for the structural model of the electronic device. The target vibration amount distribution may also be called a local vibration mode, or simply a vibration mode, and is used to indicate a target vibration area of the electronic device. For example, the target vibration amount distribution is set to Figure 2 The target vibration area A in the measurement is vibrating, that is, the vibration amounts of measuring points 1 and 10 are the largest, and the vibration amounts of measuring points 5 and 6 are the smallest.
[0071] S404, calculating the whole machine vibration quantity distribution corresponding to different operating parameters of at least two motors, and comparing the whole machine vibration quantity distribution with the target vibration quantity distribution, the operating parameters at least include vibration amplitude, vibration phase and vibration frequency.
[0072] In step S403, after a target vibration quantity distribution is set for the structural model of the electronic device, the whole machine vibration quantity distribution corresponding to the operation of the motor of the structural model of the electronic device under various operating parameters can be obtained by dynamic simulation calculation. The operating parameters of the motor may include vibration amplitude, vibration phase, vibration frequency, etc. Afterwards, the calculated multiple whole machine vibration quantity distributions are respectively compared with the target vibration quantity distribution to screen out the whole machine vibration quantity distribution that is the same as or closest to the target vibration quantity distribution among the multiple whole machine vibration quantity distributions.
[0073] S405, screening out operating parameters of at least two motors that meet the target vibration distribution requirements.
[0074] Meeting the target vibration distribution requirement can be understood as being the same as or closest to the target vibration distribution. The operating parameters of at least two motors corresponding to the whole machine vibration distribution meeting the target vibration distribution requirement can be used as the operating parameters of the motor corresponding to the target vibration distribution.
[0075] It should be noted that by performing the aforementioned steps S403 to S405 multiple times, the operating parameters of the motors corresponding to the multiple target vibration quantity distributions can be obtained. The operating parameters of the motors corresponding to each target vibration quantity distribution can be called a multi-motor drive scheme. In some embodiments, the multi-motor drive scheme corresponding to each target vibration quantity distribution may include: the vibration amplitude, vibration phase and vibration frequency of each motor in the multiple motors, and may also include the vibration amplitude ratio, phase difference and vibration frequency of each motor. In the following embodiments, the multi-motor drive scheme corresponding to each target vibration quantity distribution includes the vibration amplitude ratio, phase difference and vibration frequency of multiple motors as an example for introduction.
[0076] Continuing with the above example, for Figure 2 The target vibration amount distribution of the target vibration area A is shown, and the motor 1 and the motor 2 in the electronic device are as shown in FIG. Figure 5 As shown in (a) and (b), the operating parameters are: the vibration phase of motor 1 and motor 2 is the same, and the vibration amplitude is different. Motor 1 and motor 2 are driven to vibrate, and the vibration distribution of the electronic device can be shown as Figure 5 As shown in (c) and (d), the vibration amount of the non-target vibration area B where the vibration measurement points 5 and 6 of the electronic device are located is almost zero.
[0077] The electronic device is equipped with two motors, which can produce two local vibration effects: "left vibration" and "right vibration". The diversity of local vibration is small, and it is difficult to meet the user's demand for diverse vibration tactile feedback in some scenes. The space in the middle of the housing of the electronic device is usually limited, and the number of motors that can be arranged is limited. Therefore, a vibration control method is needed to generate as many local vibration modes as possible with as few motors as possible.
[0078] Figure 6 The electronics on display include three motors. Figure 6 As shown, motor 1 and motor 2 are arranged on one side of the electronic device, and motor 3 is arranged on the other side of the electronic device. The 10 vibration measuring points on the housing of the electronic device are used to detect the vibration distribution of the whole device.
[0079] For the three motors of the electronic device, you can also use Figure 4The generation method presented here can obtain a variety of multi-motor drive schemes. The three motors run the multi-motor drive scheme, and by controlling the superposition and cancellation of the vibrations of the three motors, a local vibration mode with a vibration amount far exceeding that of other areas in a local area of the electronic device is superimposed, thereby providing users with a variety of local vibration tactile feedback experiences.
[0080] The local vibration area can be a continuous area on the electronic device, such as an area near a certain edge of the electronic device, or it can be two discrete areas on the electronic device, such as opposite sides and diagonals of the electronic device. Correspondingly, the non-target vibration area can be an area near a certain edge of the electronic device, or it can be an area in the middle of the electronic device. Based on this, by superimposing the vibrations of three motors using a multi-motor drive scheme, the electronic device can generate a variety of local vibration modes, which can improve the situation where the vibration feedback form of the electronic device is relatively single. In addition, the three motors of the electronic device vibrate using a multi-motor drive scheme, which can also enhance the vibration touch of the target area and weaken the vibration touch of the non-target area, avoiding the problem that the motor vibration drives the vibration of the target area while the non-target area also has a large vibration response.
[0081] For example, Figure 7 As shown in (a), the vibration amplitudes of motor 1, motor 2 and motor 3 are different, but the vibration phases are the same. Motor 1, motor 2 and motor 3 are driven to vibrate. The overall vibration distribution of the electronic device can be shown as follows: Figure 7 As shown in (b) and (c), the vibration sense on the "right side" of the electronic device's shell is strong, and the vibration sense on the "left side" is weak. The vibration sense at vibration measuring points 6 to 10 is relatively large, and the vibration sense at vibration measuring points 1 to 5 is almost zero.
[0082] For example, Figure 8 The figure shows a vibration distribution pattern of the whole machine when motor 1, motor 2 and motor 3 of the electronic device are operated separately, in which the vibration sense of the motor and its diagonal position is strong (dark area in the figure).
[0083] Fig. 9 and Fig.10 It shows that motors 1, 2 and 3 of the electronic device are operated using a multi-motor drive scheme, and several local vibration modes are obtained by superimposing vibrations of multiple motors.
[0084] like Fig. 9 As shown, motors 1, 2 and 3 of the electronic device are running, and the housing of the electronic device exhibits local vibrations at four corners and local vibrations at four sides.
[0085] Fig.10 The figure shows the local vibration modes of four discrete area vibrations obtained when the motor 1, motor 2 and motor 3 of the electronic device are operated by other multi-motor driving schemes. Fig.10As shown, the vibration sense in the two discrete areas on the left and right, and the two discrete areas on the top and bottom of the electronic device is stronger than that in the two relative diagonal positions.
[0086] The three motors of the electronic device are operated by a multi-motor drive solution, and the vibration distribution of the whole machine can also be realized for other local vibrations, which is not limited to Figures 8 to 10 shown.
[0087] The motor driving method provided in the embodiment of the present application can be applicable to electronic devices such as mobile phones, game controllers, tablet computers, personal digital assistants (PDA), desktops, laptops, notebook computers, ultra-mobile personal computers (UMPC), handheld computers, netbooks and wearable devices.
[0088] Take mobile phones as an example. Fig.11 This is an example of the composition of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device 100 may include a processor 110, an internal memory 120, a camera 130, a display screen 140, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, and the like.
[0089] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0090] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a smart sensor hub and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0091] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0092] The internal memory 120 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120. The internal memory 120 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120, and / or the instructions stored in the memory provided in the processor.
[0093] In some embodiments, the internal memory 120 stores instructions for executing a method for driving a motor. The processor 110 can control the motor by executing the instructions stored in the internal memory 120 .
[0094] In some embodiments, the internal memory 120 stores a multi-motor driving scheme for a plurality of local vibration modes.
[0095] The electronic device implements the display function through a GPU, a display screen 140, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 140 and the application processor. The GPU is used for image rendering by performing mathematical and geometric calculations. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0096] The display screen 140 is used to display images, video interfaces, etc. The display screen 140 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oled, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 140, where N is a positive integer greater than 1.
[0097] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0098] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0099] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 110 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0100] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 150 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0101] The electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0102] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0103] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device can listen to music or listen to a hands-free call through the speaker 170A.
[0104] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0105] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device can be provided with at least one microphone 170C. In other embodiments, the electronic device can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, and directional recording function, etc.
[0106] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0107] In the sensor module 180, the acceleration sensor 180A can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes). When the electronic device is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0108] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0109] The pressure sensor 180C is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180C can be set on the display screen 140. There are many types of pressure sensors 180C, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180C, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 140, the electronic device detects the intensity of the touch operation based on the pressure sensor 180C. The electronic device can also calculate the position of the touch based on the detection signal of the pressure sensor 180C.
[0110] The touch sensor 180D is also called a "touch control device". The touch sensor 180D can be arranged on the display screen 140, and the touch sensor 180D and the display screen 140 form a touch screen, also called a "touch control screen". The touch sensor 180D is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 140. In other embodiments, the touch sensor 180D can also be arranged on the surface of the electronic device, which is different from the position of the display screen 140.
[0111] Motor 190 can generate vibration prompts. Motor 190 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the flexible screen 140, motor 190 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving information, alarm clocks, games, navigation, etc.) can also correspond to different vibration feedback effects.
[0112] In addition, the electronic device runs an operating system on top of the above components. operating system, operating system, Operating system, etc. Application programs can be installed and run on the operating system.
[0113] Fig.12 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.
[0114] The layered architecture divides the operating system of the electronic device into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system of the electronic device is the Android system. The Android system can be divided into five layers, from top to bottom, namely the application (APP) layer, the application framework layer (abbreviated as FWK), the system library, the hardware abstraction layer (HAL) and the kernel layer.
[0115] The application layer can include a series of application packages. Fig.12 As shown, the application package may include applications such as gallery, map, calendar, call, camera, navigation application and game application.
[0116] In some embodiments, during the operation of the game application, the game application can use a multi-motor drive solution to achieve local vibration of the electronic device, thereby playing a role in vibration position identification and assisting the user in locating the direction of the attack. For specific methods of driving the motor to operate the game application, please refer to Fig.13 The corresponding content.
[0117] In some embodiments, the motor can also be used in navigation scenarios. Fig.16 As shown, during the operation of the navigation application, the motor uses a multi-motor drive solution to realize the vibration of the left side, right side, left front, left rear, right front, right rear, front side, and rear side of the electronic device, which can prompt eight different movement directions. For the specific operation method of the navigation application driving motor, please refer to Fig.16 The corresponding content.
[0118] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0119] like Fig.12 As shown, the application framework layer may include a window management service, a content provider, a phone manager, a view system, a resource manager, a vibration service module, a location service module, and a sensor service module, etc.
[0120] The window management service is used to manage window programs. The window management service can implement window addition, deletion, display and hiding control, etc. The content provider is used to store and obtain data and make the data accessible to applications. The data can include video, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc. The phone manager is used to provide communication functions for electronic devices. For example, the management of call status (including connected, hung up, etc.). The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0121] The vibration service module can provide the underlying modules with the basic data that the game application and the navigation application need to call the motor runtime, and can also provide the game application and the navigation application with the motor vibration playback results.
[0122] The sensor service module can provide angle data or acceleration data collected by a gyroscope sensor or an acceleration sensor for navigation applications to determine the deviation angle of the front direction of the electronic device.
[0123] The location service module can obtain the current location positioning information based on GNSS on the electronic device.
[0124] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system. In some embodiments of the present application, the application cold start will run in the Android runtime, and the Android runtime will obtain the optimized file status parameters of the application. Then, the Android runtime can determine whether the optimized file is outdated due to system upgrades based on the optimized file status parameters, and return the judgment result to the application management module.
[0125] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0126] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0127] The system library may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).
[0128] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of multiple common audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.
[0129] HAL is located between the kernel layer and the application framework layer, playing a connecting role.
[0130] In some embodiments, the HAL layer includes a vibration and tactile feedback generator (haptic). The vibration library is used for the electronic device to determine the local vibration mode to be triggered when the electronic device meets the vibration triggering condition, and obtain the corresponding multi-motor driving scheme based on the local vibration mode to be triggered. The specific working content of the vibration library can be found in the following Fig.13 and Fig.16The tactile feedback generator is used to report vibration feedback results to the application through the vibration service module, and is also used to send information to the lower-level modules.
[0131] The kernel layer is a layer between hardware and software. The kernel layer includes at least display driver, sensor driver and motor driver. In some embodiments, the display driver is used to control the display screen to display images. The sensor driver is used to control the operation of multiple sensors, such as controlling the operation of pressure sensors and touch sensors. The motor driver is used to control the motor of the electronic device to operate according to the operating parameters.
[0132] Under the above five-layer architecture, the electronic device is also provided with a hardware layer, which may include the above-mentioned electronic device hardware components. Fig.12 The display and motor are shown.
[0133] It should be noted that although the embodiments of the present application are based on The system is used as an example, but the basic principles are also applicable to Electronic devices with other operating systems.
[0134] The technical solutions involved in the following embodiments can all be implemented in electronic devices having the above-mentioned hardware architecture and software architecture.
[0135] During the operation of an application in the application layer of an electronic device, the application will generate an event that triggers the operation of a motor, which is referred to as a motor vibration trigger event. After the electronic device detects the motor vibration trigger event generated by the application, it will use the event information of the trigger event to generate operating parameters of the motor in the electronic device, and drive the motor to operate in a local vibration mode with the operating parameters, so that the user can feel the vibration brought by the motor vibration in a local area of the electronic device.
[0136] The following combination Fig.12 The modules in the software framework of the electronic device are displayed. Taking the game application as an example, the operation process of the application drive motor in the application layer is introduced.
[0137] Fig.13 The signaling diagram of the game application driving the motor operation is shown. During the operation of the game application mentioned in this embodiment, the motor of the electronic device can be driven to vibrate, and the vibration of the motor can be superimposed to enable the user to feel the vibration locally in the electronic device. The game application can refer to a native game application or a third-party game application.
[0138] like Fig.13 As shown, the motor driving method provided in this embodiment includes:
[0139] S1301. The game application displays various local vibration reminder options.
[0140] In some embodiments, the user can manually turn on or off the "varied local vibration reminder" function of the game application regarding the motor. Fig.14 Describes the entry for the game application's "varied local vibration reminders" regarding motors.
[0141] The user starts the game application, and the display screen of the electronic device shows Fig.14 The main interface of the game application shown in (a) of FIG. 1 is shown. The user clicks the setting button 1401 on the main interface of the game application. The electronic device responds to the user's click operation and displays the following Fig.14 The setting interface of the game application shown in (b) of FIG. The setting interface of the game application includes a diversified local vibration reminder function option 1402. The user can click on the diversified local vibration reminder function option 1402 to turn on or off the "diversified local vibration reminder" function of the game application regarding the motor.
[0142] In some other embodiments, the diversified local vibration reminder options can also be displayed in the form of a pop-up window on the main interface, setting interface or other interface of the game application. The pop-up window of the diversified local vibration reminder options may include: a button to turn on or off the "diversified local vibration reminder" function of the game application regarding the motor, and the user can click the button to turn on or off the "diversified local vibration reminder" function of the game application regarding the motor.
[0143] The above two embodiments provide two implementation methods for a game application to display various local vibration reminder options, and the method for a game application to display various local vibration reminder options is not limited thereto.
[0144] The user activates the "diversified local vibration reminder" function of the motor in the game application. During the running of the game application, the motor can be driven to operate in the local vibration mode, that is, the user can feel the vibration locally in the electronic device through the superposition of the motor's vibration.
[0145] During the running of the game application, various events may be generated that require the motor to vibrate. These events are collectively referred to as key events, which are triggering events for motor vibration. The following steps S1302a to S1308a are used to show the process of the game application driving the motor to run according to the associated events of motor vibration, and the following steps S1302b to S1308b are used to show the process of the game application driving the motor to run according to the state change event of the object.
[0146] It is known that the following steps S1302a and S1302b are not restricted in order. Fig.13 It is shown that step S1302a is executed first and step S1302b is executed later, but the running process of the game application is not limited by this execution order.
[0147] S1302a: The game application responds to the user's operation and detects a key event. The user's operation is used to activate a diversified local vibration reminder function. The key event is an event associated with motor vibration.
[0148] As in the aforementioned step S1301, after the game application displays the diversified local vibration reminder options, the user inputs an operation to start the diversified local vibration reminder function.
[0149] During the running process of the game application, the game application can detect the events generated by the game application and send the event information to the lower layer module. For example, when the game application detects a sound event, the sound event information can be sent to the audio module through the lower layer module, and the audio module drives the speaker to sound according to the sound event information.
[0150] The "diversified local vibration reminder" function of the game application regarding the motor is turned on. The game application monitors the associated events of the motor vibration during operation. After the game application monitors the associated events of the motor vibration, the game application needs to drive the motor to run through the lower-level module to provide vibration to the user. The associated events of motor vibration can be called key events, and key events can be understood as events that need to be responded to by triggering motor vibration to provide vibration to the user. For example, the game application is a confrontational game application, and the bomb explosion event is a key event.
[0151] It should be noted that if the user's operation is to turn off or not turn on the diversified local vibration reminder function, the game application will not interact with the vibration service module according to key events in response to the user's operation, or only call a single motor for interaction through the vibration service module.
[0152] S1303a. The game application sends key event information to the vibration service module. The key event information includes the direction of the key event, the distance from the object, and the type.
[0153] After the game application detects a key event, it obtains information about the key event. The information about the key event includes the direction of the key event, the distance between the key event and the object, and the type of the key event. The object can be understood as the role played by the user in the game. The type of the key event can be understood as the type of the key event. For example, if the key event is a bomb explosion, the direction of the key event is the direction of the bomb explosion, the distance between the key event and the object refers to the distance between the bomb and the character, and the type of the key event is the type of explosion.
[0154] The vibration service module is a functional module of the application framework layer, such as the content of the software structure of the aforementioned electronic device. The game application calls the ringtone vibration interface of the vibration service module to send key event information to the vibration service module.
[0155] S1304a. The vibration service module sends key event information to the vibration sensing library.
[0156] The vibration service module receives the information of the key event, calls the interface of the vibration sensing library, and sends the information of the key event to the vibration sensing library.
[0157] S1305a, the vibration library uses the orientation of the key event to obtain the vibration amplitude ratio and phase difference of multiple motors and the vibration frequency of each motor, and uses the distance between the key event and the object to obtain the vibration amplitude amplification factor of multiple motors; and uses the type of the key event to obtain the vibration waveforms of multiple motors.
[0158] The vibration library is the content of the software structure of the aforementioned electronic device, and is a functional module of the hardware abstraction layer. The vibration library receives information about key events, and the location of the key event is used to indicate the location where the motor provides vibration. Therefore, the vibration library uses the location of the key event to screen out the corresponding multi-motor drive scheme from the multi-motor drive schemes corresponding to multiple local vibration modes stored in the electronic device. Of course, the target vibration area indicated by the local vibration mode corresponding to the multi-motor drive scheme screened out by the vibration library is the same as the location of the key event.
[0159] The multi-motor vibration scheme includes the vibration amplitude ratio and phase difference of multiple motors, as well as the vibration frequency of each motor. Therefore, the vibration sensing library uses the orientation of key events to obtain the vibration amplitude ratio and phase difference of multiple motors, as well as the vibration frequency of each motor.
[0160] In some embodiments, if the multi-motor vibration scheme includes the vibration amplitude, vibration phase and vibration frequency of each motor in the multiple motors, the vibration sensing library can also screen out the vibration amplitude, vibration phase and vibration frequency of each motor in the multiple motors according to the orientation of the key event.
[0161] The distance between the key event and the object is different, and the strength of the vibration provided by the motor may also be different. In this way, the strength of the vibration provided by the motor can reflect the distance between the key event and the object. Generally, the closer the distance between the key event and the object, the stronger the vibration provided by the motor. Based on this, in some embodiments, the vibration library uses the distance between the key event and the object to determine the vibration amplitude amplification factor of each motor in the multiple motors. The principle that the vibration library uses the distance between the key event and the object to determine the vibration amplitude amplification factor of each motor in the multiple motors is: the closer the distance between the key event and the object, the greater the vibration amplitude amplification factor of each motor in the multiple motors, and vice versa.
[0162] The duration of the vibration provided by the motor may be different depending on the type of key event. In this way, the duration of the vibration provided by the motor can reflect the level of the key event. A key event is a high-level event, and the motor provides a long vibration output, otherwise it provides a short vibration output. Based on this, in some embodiments, the vibration library uses the type of key event to determine the vibration waveform of each motor in a plurality of motors. Of course, the length of the vibration waveform represents the duration of the vibration provided by the motor. The type of key event reflects that the key event is a high-level event, and the vibration waveform of each motor determined by the vibration library is long, otherwise it is short.
[0163] In some other embodiments, the vibration library may also use the type of key event to determine the driving duration or excitation duration of each of the multiple motors. If the type of key event reflects that the key event is a high-level event, the driving duration or excitation duration of each motor determined by the vibration library is long, otherwise it is short.
[0164] For example, when the key event is an ordinary bomb explosion, the vibration waveform of each motor determined by the vibration sensing library is a standard waveform, or the driving duration or excitation duration of each motor determined is a unit duration; when the key event is a high-power bomb explosion, the vibration waveform of each motor determined by the vibration sensing library is several multiples of the standard waveform, or the driving duration or excitation duration of each motor determined is a multiple of the unit duration.
[0165] S1306a. The vibration library sends instructions to the motor driver through the tactile feedback generator. The instructions may carry the vibration amplitude ratio and phase difference of multiple motors, the vibration frequency of each motor, the vibration amplitude amplification factor, and the vibration waveform.
[0166] The tactile feedback generator is a functional module of the hardware abstraction layer, such as the content of the software structure of the aforementioned electronic device, and is used to exchange information with the upper and lower modules. Therefore, the vibration amplitude ratio and phase difference of the motor, the vibration frequency of each motor, the vibration amplitude amplification factor, the vibration waveform and other operating parameters obtained by the vibration library need to be sent to the motor driver by the tactile feedback generator.
[0167] In some embodiments, the motor driver can drive the motor to operate by sending instructions carrying operating parameters to the motor. Based on this, the vibration library can send instructions carrying the operating parameters of the motor to the motor driver through the tactile feedback generator, so that the motor driver drives the motor to operate in the form of instructions. It can be seen that the operating parameters such as the vibration amplitude ratio and phase difference of multiple motors, the vibration frequency of each motor, the vibration amplitude amplification factor, and the vibration waveform in the instructions sent by the vibration library should exist in the form of electrical signals. For example, the vibration amplitude of the motor should be the voltage amplitude.
[0168] It should be noted that, as described in the aforementioned step S1305a, the vibration waveform of the motor is also replaced by the driving duration or excitation duration of the motor.
[0169] In some embodiments, the motor driver can also drive the motor to run by sending a driving waveform to the motor. Based on this, the vibration library uses the vibration amplitude ratio and phase difference of the multiple motors obtained in the aforementioned step S1305a, the vibration frequency, vibration amplitude magnification factor and vibration waveform of each motor to generate the driving waveforms of the multiple motors. The vibration library sends the driving waveform of each motor to the motor driver through the tactile feedback generator to control the motor driver to drive the motor to run in the form of the motor's driving waveform. Alternatively, the vibration library uses the vibration amplitude, vibration phase, vibration frequency, vibration amplitude magnification factor and vibration waveform of each motor to generate the driving waveforms of the multiple motors. The vibration library sends the driving waveform of each motor to the motor driver through the tactile feedback generator to control the motor driver to drive the motor to run in the form of the motor's driving waveform.
[0170] The vibration library generates driving waveforms for multiple motors, which can be understood as: adjusting the vibration waveform of each motor so that the vibration amplitude, vibration phase, vibration amplitude amplification factor and vibration frequency of the vibration waveform of the adjusted motor correspond to the values obtained by the vibration library in step S1305a.
[0171] It should be noted that in the operating parameters of the motor obtained by the vibration library, the vibration waveform of the motor is replaced by the driving duration or excitation duration of the motor. The vibration library generates driving waveforms of multiple motors, which can be understood as follows: the vibration library generates a driving waveform of the motor, the amplitude of the driving waveform is the value of the vibration amplitude of the vibration waveform of the motor after the vibration amplitude amplification factor is applied, the phase of the driving waveform is the phase of the vibration waveform of the motor, the vibration frequency of the driving waveform is the vibration frequency of the vibration waveform of the motor, and the duration of the driving waveform is the driving duration or excitation duration of the motor.
[0172] S1307a, the motor drive controls multiple motors to operate according to the information carried by the instructions.
[0173] Multiple motors of an electronic device can operate with the vibration amplitude ratio and phase difference, vibration frequency, vibration amplitude amplification factor and vibration waveform of the multiple motors carried by the instructions, and can provide vibration sensations to users at the locations of key events. The strength and duration of the vibration sensations match the distance and type of the key events and roles.
[0174] S1308a: The motor driver returns the vibration playback result to the game application through the tactile feedback generator and the vibration service mode.
[0175] After the motor driver controls the motor to run, the motor driver needs to report the vibration playback result to the game application to assist the game application in knowing the motor vibration result. Based on this, the kernel driver layer returns the motor vibration playback result to the tactile feedback generator of the hardware abstraction layer, and the tactile feedback generator reports the vibration playback result to the game application through the vibration service module. The vibration playback result is used to characterize whether the motor vibrates. In some embodiments, the vibration playback result may also include operating parameters for driving multiple motors to vibrate.
[0176] S1302b: The game application responds to the user's operation and detects a key event. The user's operation is used to enable a diversified local vibration reminder function. The key event is a state change event of an object.
[0177] As described in the above step S1302a, the user input operation starts the diversified local vibration reminder function. The game application can generate an object state change event during operation. For the object state change event, the game application can output a vibration sense through motor vibration to remind the user.
[0178] The object is the character played by the user in the game. When the character is attacked, the state changes such as "low blood volume", accelerated heartbeat, or even near death. The game application generates an object state change event when the character is attacked and the state changes. In order to remind the user that the character's state has changed, the game application will detect the state change event of the object. The game application detects the state change event of the object and obtains the information of the event. The state change event of the object can also be called a key event.
[0179] The information of the key event obtained by the game application includes the type of the key event and the description information of the key event. The type of the key event can be understood as the category to which the key event belongs. The description information of the key event is used to describe the characteristics of the key event. For example, the key event is the character's heartbeat acceleration event, the type of the key event is heartbeat acceleration, and the description information of the key event includes the frequency and strength of the heartbeat.
[0180] S1303b: The game application sends key event information to the vibration service module, where the key event information includes the key event type and description information of the key event.
[0181] The game application calls the ringtone vibration interface of the vibration service module to send key event information to the vibration service module.
[0182] S1304b: The vibration service module sends key event information to the vibration sensing library.
[0183] The vibration service module receives the information of the key event, calls the interface of the vibration sensing library, and sends the information of the key event to the vibration sensing library.
[0184] S1305b. The vibration sensing library determines the vibration mode corresponding to the key event type, and obtains the vibration amplitude amplification factor and vibration waveform of multiple motors using the description information of the key event.
[0185] The vibration sensing library receives the information of the key event, and uses the type of the key event in the information of the key event to screen out a corresponding local vibration pattern from multiple local vibration patterns stored in the electronic device.
[0186] The local vibration mode corresponds to a multi-motor vibration scheme, and the multi-motor vibration scheme includes the vibration amplitude ratio, phase difference and vibration frequency of multiple motors. Therefore, the vibration sensing library uses the type of key events to obtain the vibration amplitude ratio, phase difference and vibration frequency of multiple motors.
[0187] If the multi-motor vibration solution includes the vibration amplitude, vibration phase and vibration frequency of each of the multiple motors, the vibration sensing library can also screen out the vibration amplitude, vibration phase and vibration frequency of each of the multiple motors according to the type of key events.
[0188] In some embodiments, the state change event of the object may correspond to a local vibration pattern that is not directional, such as a local vibration pattern corresponding to simultaneous vibration of left and right sides of an electronic device held by a user.
[0189] The description information of the key event is used to describe the characteristics of the key event, and the characteristics of the key event can indicate the degree of change in the character's state. Based on this, in some embodiments, the vibration library can use the description information of the key event to determine the vibration amplitude amplification factor and vibration waveform of each of the multiple motors. Because the different vibration amplitudes and vibration waveforms of the multiple motors can determine the strength of the motor vibration, the strength of the vibration provided by the motor can be achieved, reflecting the degree of change in the character's state.
[0190] Generally speaking, the greater the degree of change in the character's state indicated by the description information of the key event, the greater the vibration amplitude amplification factor of each motor among the multiple motors that the vibration library can determine, and the longer the duration of the vibration wavelength. Conversely, the smaller the vibration amplitude amplification factor of the motor, the shorter the duration of the vibration wavelength.
[0191] In some embodiments, the driving duration or excitation duration of the motor may also determine the strength of the motor vibration. Therefore, the vibration library may also use the description information of the key events to determine the vibration amplitude amplification factor of each motor in the multiple motors, as well as the driving duration or excitation duration.
[0192] Continuing with the above example, the description information of the key event includes the frequency and strength of the heartbeat. The vibration library uses the frequency of the heartbeat to match the corresponding vibration waveform. Usually, the heartbeat frequency corresponds to the frequency of the energy peak of the vibration waveform. The vibration library uses the strength of the heartbeat to match the corresponding vibration amplitude amplification factor. The heartbeat and the vibration amplitude amplification factor are usually negatively correlated, that is, the stronger the heartbeat, the smaller the vibration amplitude amplification factor, and the weaker the heartbeat, the larger the vibration amplitude amplification factor.
[0193] S1306b. The vibration library sends an instruction to the motor driver through the tactile feedback generator. The instruction carries the vibration amplitude ratio and phase difference, vibration frequency, vibration amplitude amplification factor and vibration waveform of multiple motors corresponding to the vibration mode.
[0194] As in the above step S1306a, the vibration library can also generate a driving waveform for each motor by using the vibration amplitude ratio and phase difference of multiple motors, the vibration frequency of each motor, the vibration amplitude amplification factor, and the vibration waveform and other operating parameters. The vibration library sends the driving waveform of each motor to the motor driver through the tactile feedback generator to control the motor driver to drive the motor to operate in the form of the motor's driving waveform. The specific implementation method of the vibration library can be found in the above step S1306a, which will not be repeated here.
[0195] S1307b, the motor drive controls multiple motors to operate according to the information carried by the instructions.
[0196] The multiple motors of the electronic device operate with the vibration amplitude ratio and phase difference, vibration frequency, vibration amplitude amplification factor and vibration waveform of the multiple motors carried by the instructions, which can provide the user with a vibration feeling. The strength and duration of the vibration feeling and the degree of character change reflected by key events.
[0197] S1308b: The motor driver returns the vibration playback result to the game application through the tactile feedback generator and the vibration service mode.
[0198] After the motor driver controls the motor to run, the motor driver needs to report the vibration playback result to the game application to assist the game application in knowing the motor vibration result. Based on this, the motor driver reports the vibration playback result to the tactile feedback generator, the tactile feedback generator reports the vibration playback result to the vibration service module, and the vibration service module reports the vibration playback result to the game application. The vibration playback result is used to characterize whether the motor vibrates. In some embodiments, the vibration playback result may also include operating parameters for driving multiple motors to vibrate.
[0199] The motor driving method provided in the embodiment of the present application can also be applied to navigation scenarios.
[0200] The navigation function of electronic devices plays an important role in people's travel. During walking navigation, users need to keep looking down at the route or listening to the navigation voice. The former easily distracts the user's attention and poses certain safety risks, and is not user-friendly to blind users; the latter affects the use on noisy roads and is not user-friendly to the deaf and dumb. Electronic devices use motor vibration to provide users with tactile assisted navigation, which allows users to accurately perceive the navigation direction without looking at the navigation interface or listening to the navigation voice.
[0201] In an embodiment of the present application, the electronic device utilizes a motor driving method to drive multiple motors to operate, and the multiple motors can generate eight types of vibrations to prompt the user in eight different moving directions.
[0202] According to the above correspondence Figures 8 to 10 It can be seen from the content that the electronic device includes three motors, and the motor driving method provided in the embodiment of the present application is used to drive the motors to operate. The local vibrations generated by the three motors can exceed eight types. Therefore, the embodiment of the present application realizes walking navigation in eight directions using a limited number of motors.
[0203] like Fig.15 As shown, the motor of the electronic device can generate multiple local vibrations, including at least: left vibration, right vibration, left front vibration, left rear vibration, right front vibration, right rear vibration, front vibration, and rear vibration, for indicating eight moving directions.
[0204] The following combination Fig.12 The modules in the software framework of the electronic device on display introduce the operation process of the navigation application drive motor.
[0205] Fig.16 The signaling diagram of the navigation application driving the motor operation is shown. During operation, the navigation application mentioned in this embodiment can drive the motor of the electronic device to vibrate, and through the superposition of the vibration of the motor, the user can feel the vibration locally in the electronic device to provide the user with the direction of movement. The navigation application can refer to a native navigation application or a third-party navigation application.
[0206] like Fig.16 As shown, the driving method of the motor includes:
[0207] S1601. The navigation application displays various local vibration reminder options.
[0208] In some embodiments, the user can manually turn on or off the navigation application's "varied local vibration reminder" function for the motor. Fig.17 Describes the entry for the navigation application's "diversified local vibration reminders" regarding motors.
[0209] The user starts the navigation application, and the display screen of the electronic device shows Fig.17 The main interface of the navigation application shown in (a) of FIG. 1 is shown. The user clicks the My button 1701 on the main interface of the navigation application. The electronic device responds to the user's click operation and displays the following information: Fig.17 The user interface shown in (b) of FIG. 1 is a user interface of the navigation application. The user clicks the setting button 1702. The electronic device responds to the user's click operation and displays the following Fig.17 The setting interface of the navigation application shown in (c) of FIG. The setting interface of the navigation application includes a diversified local vibration reminder function option 1703. The user can click on the diversified local vibration reminder function option 1703 to turn on or off the "diversified local vibration reminder" function of the navigation application regarding the motor.
[0210] In some other embodiments, the diversified local vibration reminder option can also be displayed in the form of a pop-up window on the main interface, setting interface or other interface of the application. The pop-up window of the diversified local vibration reminder option may include: a button to turn on or off the "diversified local vibration reminder" function of the navigation application regarding the motor, and the user can click the button to turn on or off the "diversified local vibration reminder" function of the navigation application regarding the motor.
[0211] When the user activates the "diversified local vibration reminder" function of the motor in the navigation application, the motor can be driven to operate in local vibration mode during walking navigation (hereinafter referred to as navigation). The vibration of the motor can be superimposed to remind the user to move in eight directions.
[0212] The above two embodiments provide two implementations of a navigation application displaying various local vibration reminder options, and the manner in which a navigation application displays various local vibration reminder options is not limited thereto.
[0213] S1602: The navigation application starts a motor vibration reminder function during the navigation process in response to the user's operation.
[0214] As described in the aforementioned step S1602, the navigation application displays various local vibration reminder options, and the user inputs an operation to enable the motor vibration reminder function of the navigation application during walking navigation.
[0215] It should be noted that the user's operation is to turn off or not turn on the diversified local vibration reminder function, and the navigation application responds to the user's operation and executes the normal process.
[0216] S1603: The navigation application responds to the user's operation, performs navigation initialization operations and generates a navigation track based on the navigation destination, and controls the start of navigation.
[0217] After the user input operation starts the motor vibration reminder function during navigation, the user can enter the destination on the main interface of the navigation application, select the walking navigation mode, and click the start navigation button to put the electronic device into the navigation mode.
[0218] In some embodiments, the navigation initialization operation includes:
[0219] The navigation application registers a location information listener with the location service module of the application framework layer and requests the positioning information of the current location. The location service module receives the request and returns the positioning information of the current location to the navigation application. Among them, the location service module can obtain the positioning information of the current location based on the system positioning capability of the electronic device such as GNSS. The location information listener can monitor the data used to determine the positioning information of the current location of the electronic device, such as GNSS data.
[0220] The navigation application registers the electronic device front direction information listener with the sensor service module of the application framework layer. The listener can monitor the sensor data used to determine the front direction of the electronic device, and the sensor data can be the angular velocity data collected by the gyroscope sensor and the acceleration data collected by the acceleration sensor.
[0221] In some embodiments, the navigation application generates a navigation track based on the current location positioning information and the destination. The navigation application can control the start of navigation in response to the user clicking the start navigation button. The navigation track includes the positioning information of the current location and the positioning information of each direction adjustment point between the destination. At the initial moment of navigation, the positioning information of the current location refers to the positioning information of the starting point of navigation.
[0222] S1604: The navigation application uses the data reported by the sensor service module to update the front direction of the electronic device during the navigation process.
[0223] During the navigation process, the user moves the electronic device, which can adjust the direction of the front end of the electronic device.
[0224] The sensor service module detects that the data related to the front end direction of the electronic device has changed, and notifies the registered electronic device front end direction information listener. Among them, the data related to the front end direction of the electronic device can be angular velocity data collected by the gyroscope sensor and acceleration data collected by the acceleration sensor. The sensor service module sends the collected data related to the front end direction of the electronic device to the navigation application. The navigation application can determine the front end direction of the electronic device based on the data related to the front end direction of the electronic device reported by the sensor service module.
[0225] S1605: The navigation application uses the data reported by the location service module to update the current location during the navigation process.
[0226] During navigation, the user moves the electronic device and the current location of the electronic device changes. The location service module uses the data monitored by the location information listener to detect whether the current location of the electronic device has changed. When the location service module detects that the current location of the electronic device has changed, the location service module reports the updated location information to the navigation application.
[0227] The navigation application receives the updated location information reported by the location service module and can update the location information of the current location of the electronic device during navigation. In some embodiments, the navigation application uses the updated location information reported by the location service module to continuously adjust the location information of the current location in the navigation track.
[0228] S1606: The navigation application uses the navigation track during the navigation process to calculate the distance from the current position to the next direction adjustment point.
[0229] As mentioned above, the navigation track includes the positioning information of the current position of the electronic device and the positioning information of each direction adjustment point between the destination. The navigation application can use the positioning information of the current position and the positioning information of the next direction adjustment point in the navigation track to calculate the distance between the current position and the next direction adjustment point.
[0230] At the initial moment of navigation, the current position is the starting point of navigation, and the navigation application can calculate the distance between the starting point of navigation and the next direction adjustment point of the starting point. As in step S1604, the positioning information of the current position changes in real time, and the navigation application calculates the distance between the current position and the next direction adjustment point of the current position after the positioning information of the current position changes.
[0231] S1607: The navigation application sends the front end direction, navigation direction, and the distance from the current position to the next direction adjustment point to the vibration sensing library through the vibration service module.
[0232] The vibration service module is a functional module of the application framework layer, such as the content of the software structure of the aforementioned electronic device. The navigation application calls the ringtone vibration interface of the vibration service module to send the front direction, navigation direction, and the distance from the current position to the next direction adjustment point to the vibration service module. The vibration service module calls the interface of the vibration sense library to send the front direction, navigation direction, and the distance from the current position to the next direction adjustment point to the vibration sense library.
[0233] The front end direction refers to the front end direction of the electronic device mentioned in the above content.
[0234] The navigation application may calculate the navigation direction using the location information of the current position and the location information of the next direction adjustment point in the navigation track. In some embodiments, the navigation track may also include the navigation direction corresponding to the current position and each direction adjustment point.
[0235] In some embodiments, the navigation application may send the front direction of the electronic device, the navigation direction, and the distance from the current position to a direction adjustment to the vibration sensing library through the vibration service module based on a preset period. It is understandable that the navigation application obtains the current direction of the electronic device and the distance between the current position of the electronic device and the next direction adjustment point once at an interval. The navigation application obtains the current direction of the electronic device and the distance between the current position of the electronic device and the next direction adjustment point, and then sends the front direction of the electronic device, the navigation direction, and the distance from the current position to the next direction adjustment point to the vibration sensing library through the vibration service module.
[0236] In other embodiments, the navigation application calculates the distance between the current position of the electronic device and the next direction adjustment point. When the distance is less than a certain threshold, the navigation application may determine that it is necessary to use motor vibration to remind the user to adjust the direction of movement. Therefore, when the distance is less than a certain threshold, the navigation application may send the front-end direction, navigation direction, and the distance from the current position to the next direction adjustment point to the vibration sensing library through the vibration service module.
[0237] The navigation application obtains the current direction of the electronic device and the distance between the current position of the electronic device and the next direction adjustment point. This can be understood as the navigation application generating a key event. The key event is an event that drives the motor to vibrate in response, and is also an event that triggers motor vibration. The information of the key event includes: the current direction of the electronic device, the navigation direction, and the distance between the current position of the electronic device and the next direction adjustment point.
[0238] S1608. The vibration sensing library calculates the angle between the front end direction and the navigation direction, and determines the vibration mode corresponding to the angle.
[0239] The vibration sensing library calculates the angle between the front end direction of the electronic device and the navigation direction, and determines the vibration mode corresponding to the angle between the front end direction of the electronic device and the navigation direction.
[0240] The electronic device may store the corresponding relationship between the angle between the front direction of the electronic device and the navigation direction and the vibration mode. The vibration library calculates the angle between the front direction of the electronic device and the navigation direction, and uses the angle to screen the vibration mode in the corresponding relationship.
[0241] In some embodiments, the corresponding relationship between the angle between the front direction of the electronic device and the navigation direction and the vibration mode can be defined as follows: taking the front direction of the electronic device as a reference, the angle between the navigation direction and the reference is divided into 0°, (0°, 90°), 90°, (90°, 180°), 180°, (-180°, -90°), -90° and (-90°, 0°). Among them: 0° corresponds to the vibration mode of front vibration, (0°, 90°) corresponds to the vibration mode of left front vibration, 90° corresponds to the vibration mode of left vibration, (90°, 180°) corresponds to the vibration mode of left rear vibration, 180° corresponds to the vibration mode of rear vibration, (-180°, -90°) corresponds to the vibration mode of right rear vibration, -90° corresponds to the vibration mode of right vibration, and (-90°, 0°) corresponds to the vibration mode of right front vibration.
[0242] It is understandable that 0°, 90°, 180° and -90° may also include a certain error range. Correspondingly, the values within the error range should be deleted in the other intervals. Exemplarily, [-10°, 10°] belongs to the error range of 0°, that is, the angle between the front direction of the electronic device and the navigation direction is [-10°, 10°], and the vibration mode corresponding to the angle is front vibration. Correspondingly, (0°, 90°) should be more like (10°, 90°), and (-90°, 0°) should be more like (-90°, -10°).
[0243] If the distance between the current position of the electronic device and the next direction adjustment point is less than a certain threshold, it can be indicated that the electronic device is close to the next direction adjustment point and needs to drive the motor to vibrate to remind the user of the moving direction. In this way, the vibration library can execute this step, step S1609 and step S1610 when the distance between the current position and the next direction adjustment point is less than a certain threshold, so that when the user is near the direction adjustment point, the electronic device drives the motor to vibrate to remind the user of the moving direction, which also avoids the interference of the electronic device frequently driving the motor to vibrate to the user to a certain extent, and avoids the waste of resources of the electronic device.
[0244] S1609. The vibration sensing library determines the vibration amplitude ratio, phase difference and vibration frequency of multiple motors corresponding to the vibration mode, and obtains the vibration waveforms of the multiple motors according to the distance.
[0245] As described in step S405 of the above embodiment, the electronic device stores motor drive schemes corresponding to multiple vibration modes, and the motor drive schemes include vibration amplitude ratios, phase differences, and vibration frequencies of multiple motors. Therefore, after the vibration library determines the vibration mode, the vibration amplitude ratios, phase differences, and vibration frequencies of multiple motors in the motor drive scheme corresponding to the vibration mode can be obtained.
[0246] In some embodiments, the motor driving scheme corresponding to each vibration mode includes the vibration amplitude, vibration phase and vibration frequency of each motor in the multiple motors. In this way, after the vibration sensing library determines the vibration mode, the vibration amplitude, vibration phase and vibration frequency of each motor in the multiple motors in the motor driving scheme corresponding to the vibration mode can also be obtained.
[0247] The vibration sensing library receives the distance from the current position of the electronic device to the next direction adjustment point sent by the vibration service module, and uses the distance to obtain the vibration waveform of each of the multiple motors.
[0248] The vibration waveform of the motor is used to control the duration of driving the motor, and the length of the vibration waveform represents the duration of the vibration provided by the motor. In some embodiments, the distance from the current position of the electronic device to the next direction adjustment point and the vibration waveform of the motor are negatively correlated. It is understandable that the shorter the distance from the current position of the electronic device to the next direction adjustment point, the longer the vibration waveform of each motor in the multiple motors, and vice versa.
[0249] In other embodiments, the distance from the current position of the electronic device to the next direction adjustment point and the vibration waveform of the motor are positively correlated. It is understandable that the longer the distance from the current position of the electronic device to the next direction adjustment point, the longer the vibration waveform of each of the multiple motors, and vice versa.
[0250] In some embodiments, the vibration library may also use the distance from the current position of the electronic device to the next direction adjustment point to obtain the driving duration or excitation duration of each of the multiple motors.
[0251] In one implementation, the distance from the current position of the electronic device to the next direction adjustment point and the driving duration or excitation duration of the motor are negatively correlated. It is understandable that the shorter the distance from the current position of the electronic device to the next direction adjustment point, the longer the driving duration or excitation duration of each of the multiple motors, and vice versa.
[0252] In another implementation, the distance from the current position of the electronic device to the next direction adjustment point and the driving duration or excitation duration of the motor are positively correlated. The longer the distance from the current position of the electronic device to the next direction adjustment point, the longer the driving duration or excitation duration of each of the multiple motors, and vice versa.
[0253] S1610. The vibration library sends an instruction to the motor driver through the tactile feedback generator. The instruction carries the vibration amplitude ratio, phase difference, vibration frequency and vibration waveform of multiple motors.
[0254] As described in step S1305a in the above embodiment, the motor driver can drive the motor to operate by sending a command carrying operating parameters to the motor. Based on this, the vibration library can send a command carrying the operating parameters of the motor to the motor driver through the tactile feedback generator, so that the motor driver drives the motor to operate in the form of a command.
[0255] The motor drive can also drive the motor to run by sending a driving waveform to the motor. Based on this, the vibration library uses the vibration amplitude ratio and phase difference of multiple motors, the vibration frequency and vibration waveform of each motor to generate the driving waveforms of multiple motors. The vibration library sends the driving waveform of each motor to the motor drive through the tactile feedback generator to control the motor drive to drive the motor to run in the form of the motor's driving waveform. Alternatively, the vibration library generates the driving waveforms of multiple motors by using the vibration amplitude, vibration phase, vibration frequency and vibration waveform of each motor. The vibration library sends the driving waveform of each motor to the motor drive through the tactile feedback generator to control the motor drive to drive the motor to run in the form of the motor's driving waveform.
[0256] S1611, the motor drive controls multiple motors to operate according to the information carried by the instructions.
[0257] The multiple motors of the electronic device operate according to the vibration amplitude ratio, phase difference, vibration frequency and vibration waveform of the multiple motors carried by the instructions, and can provide the user with a vibration sense to prompt the moving direction.
[0258] The duration of the vibration may be related to the distance between the current position of the electronic device and the next direction adjustment point.
[0259] In some embodiments, the shorter the distance between the current position of the electronic device and the next direction adjustment point, that is, the closer the electronic device is to the direction adjustment point, the longer the vibration provided by the motor lasts, and the stronger the reminder to the user.
[0260] In other embodiments, the distance between the current position of the electronic device and the next direction adjustment point is long, and the duration of the vibration provided by the motor is long; the distance between the current position of the electronic device and the next direction adjustment point is short, and the duration of the vibration provided by the motor is short. The user can know the length of the distance between the next direction adjustment point and his current position based on the duration of the vibration provided by the motor.
[0261] S1612: The navigation application uses the data reported by the location service module to determine whether the user has deviated from the navigation direction.
[0262] In actual navigation scenarios, due to reasons such as malfunction of the electronic device's compass, the pointer of the navigation application may point to the opposite direction of the next direction adjustment point. Through the data reported by the sensor service module, the navigation application confirms that the user moves in the direction guided by the vibration-assisted navigation (i.e., the direction of the navigation application's pointer), but the actual situation is that the electronic device is located farther and farther away from the next direction adjustment point, which means that the user has deviated from the navigation direction by 180°. The electronic device can output vibrations through the motor to remind the user that the navigation direction has deviated.
[0263] S1613: The navigation application sends, via the vibration service module, information indicating that the user has deviated from the navigation direction to the vibration sensing library.
[0264] The navigation application calls the ringtone vibration interface of the vibration service module to send the indication information that the user deviates from the navigation direction to the vibration service module. The vibration service module calls the interface of the vibration sense library to send the indication information that the user deviates from the navigation direction to the vibration sense library.
[0265] S1614. The vibration sensing library determines the vibration mode corresponding to the indication information, and determines the vibration amplitude ratio, phase difference and vibration frequency of multiple motors corresponding to the vibration mode.
[0266] The vibration library receives the indication information to clarify that the user has deviated from the navigation direction. The vibration library needs to determine the vibration mode corresponding to the indication information. In some embodiments, the electronic device stores the indication information indicating that the user has deviated from the navigation direction, and the corresponding vibration mode is a vibration mode without a directional pointing attribute. Exemplarily, the vibration mode without a directional pointing attribute is: the left and right sides of the screen vibrate simultaneously, etc.
[0267] After the vibration sensing library determines the vibration mode, a multi-motor driving scheme of multiple motors corresponding to the vibration mode is obtained, and the multi-motor driving scheme includes the vibration amplitude ratio, phase difference and vibration frequency of the multiple motors.
[0268] In some embodiments, the multi-motor driving scheme corresponding to the vibration mode may also include the vibration amplitude, vibration phase and vibration frequency of each of the multiple motors. Therefore, the vibration sensing library can determine the vibration amplitude, vibration phase and vibration frequency of each of the multiple motors corresponding to the vibration mode.
[0269] Typically, in the vibration mode corresponding to the indication information indicating the user's deviation from the navigation direction, the vibration waveform of each of the multiple motors may be a standard waveform, or the driving duration or excitation duration of each of the multiple motors may be a standard duration.
[0270] S1615. The vibration library sends an instruction to the motor driver through the tactile feedback generator. The instruction carries the vibration amplitude ratio, phase difference and vibration frequency of multiple motors.
[0271] In this step, the vibration amplitude ratio, phase difference and vibration frequency of the multiple motors carried by the instruction are: the vibration amplitude ratio, phase difference and vibration frequency of the multiple motors corresponding to the vibration mode without directional pointing attribute in step S1613.
[0272] In some embodiments, the vibration library may also utilize the vibration amplitude ratio, phase difference, and vibration frequency of multiple motors to generate a motor driving waveform, and then send the motor driving waveform to the motor driver through the tactile feedback generator.
[0273] S1616, the motor drive controls multiple motors to operate according to the information carried by the instructions.
[0274] The motor drive controls multiple motors to operate with a vibration amplitude ratio, phase difference and vibration frequency of multiple motors corresponding to a vibration mode that does not have a directional pointing attribute. The multiple motors output a vibration sense that does not have a directional attribute, which can remind the user that the moving direction has deviated from the navigation direction.
[0275] S1617. The vibration sensing library calculates the angle between the front end direction and the navigation direction, and determines the vibration mode corresponding to the angle.
[0276] After the vibration library receives the indication information indicating that the user has deviated from the navigation direction, it can also use the front end direction and navigation direction of the electronic device currently stored in the vibration library to calculate the angle between the front end direction of the electronic device and the navigation direction, and determine the vibration pattern corresponding to the angle, so as to provide the user with a second reminder of the navigation direction.
[0277] The vibration library calculates the angle between the front end direction of the electronic device and the navigation direction, and determines the specific implementation method of the vibration mode corresponding to the angle. Please refer to the content of the aforementioned step S1608, which will not be repeated here.
[0278] Due to reasons such as malfunction of the compass of the electronic device, the pointer of the navigation application may point to a moving direction opposite to the next direction adjustment point. If the user moves in the direction pointed by the pointer of the navigation application, the user will deviate from the navigation direction by 180°. Exemplarily, the pointer of the navigation application points to the front direction of the electronic device, and through the judgment of S1612, it is known that the correct moving direction is the rear direction of the electronic device, then the pointer of the navigation application points to the front direction of the electronic device again, and the electronic device calculates through step S1617 that the vibration mode should be the vibration mode for controlling the vibration of the rear end of the electronic device, so as to provide the user with the correct navigation direction.
[0279] S1618. The vibration sensing library determines the vibration amplitude ratio, phase difference, and vibration frequency of multiple motors corresponding to the vibration mode, and obtains the vibration waveforms of the multiple motors based on the distance.
[0280] The implementation method of the vibration sensing library performing this step can be found in the content of the aforementioned step S1609, which will not be repeated here.
[0281] S1619. The vibration library sends an instruction to the motor driver through the tactile feedback generator. The instruction carries the vibration amplitude ratio and phase difference of multiple motors, as well as the vibration waveform.
[0282] The vibration library sends an instruction to the motor driver through the tactile feedback generator, and the instruction carries the vibration amplitude ratio and phase difference, vibration frequency and vibration waveform of the multiple motors obtained in the aforementioned step S1618. In some embodiments, the instruction may also carry the vibration amplitude and vibration phase, vibration frequency and vibration waveform of each motor in the multiple motors. The vibration waveform may also be replaced by the driving duration or excitation duration of the motor.
[0283] The vibration library can also use the vibration amplitude ratio and phase difference of multiple motors, as well as operating parameters such as vibration waveforms, to generate a motor drive waveform. The vibration library then sends the motor drive waveform to the motor driver through the tactile feedback generator.
[0284] S1620, the motor drive controls multiple motors to operate according to the information carried by the instructions.
[0285] It should be noted that in the aforementioned embodiment, in step S1608 and step S1609, after the vibration library calculates the angle between the front end direction of the electronic device and the navigation direction, it first determines the vibration mode, and then determines the vibration amplitude ratio, phase difference and vibration frequency of multiple motors corresponding to the vibration mode. In some embodiments, after the vibration library calculates the angle between the front end direction of the electronic device and the navigation direction, the vibration amplitude ratio, phase difference and vibration frequency of multiple motors can also be directly obtained using the angle.
[0286] Similarly, in step S1613, the vibration library can also use the indication information to directly obtain the vibration amplitude ratio, phase difference and vibration frequency of multiple motors.
[0287] Similarly, in step S1617 and step S1618, after the vibration library calculates the angle between the front end direction of the electronic device and the navigation direction, the vibration amplitude ratio, phase difference and vibration frequency of multiple motors can be directly obtained using the angle.
[0288] It should also be noted that, in some embodiments, steps S1608 and S1609, step 1614, step S1617 and step S1618 may also be executed in whole or in part by the navigation application. In this way, the navigation application may not execute all or part of steps S1607 and S1613. The navigation application may send the calculated operating parameters such as the vibration amplitude ratio, phase difference, vibration frequency and vibration waveform of the multiple motors to the vibration library through the vibration service module.
[0289] It should also be noted that in some embodiments, after the motor driver controls the motor to run, the vibration playback result can be fed back to the navigation application through the tactile feedback generator and the vibration service module. The vibration playback result is used to indicate whether the motor vibrates. In some embodiments, the vibration playback result can also include operating parameters for driving multiple motors to vibrate.
[0290] The solution provided by the above embodiment is applied to the scenario of a foldable electronic device. The partial diagram of the foldable electronic device with three motors can be as follows: Fig.18 shown.
[0291] The layout of the motors in the electronic device is different in the folded state and the unfolded state. Therefore, for a certain local vibration mode, the solution provided in this application adopts the following methods for the electronic device in the folded state and the unfolded state: Figure 4 The method for generating a multi-motor drive scheme proposed in the corresponding embodiment generates a corresponding multi-motor drive scheme.
[0292] In application scenarios such as gaming and navigation, foldable electronic devices can also determine the multi-motor operation scheme for the corresponding local vibration mode based on the posture of the foldable electronic device to avoid the vibration corresponding to the local vibration mode being difficult to stimulate due to the posture factors of the foldable electronic device.
[0293] Another embodiment of the present application further provides a computer-readable storage medium, which stores instructions, and when the computer-readable storage medium is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0294] The computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0295] Another embodiment of the present application further provides a computer program product including instructions. When the computer program product is run on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
Claims
1. A method for driving a motor, characterized in that: Applied to an electronic device having at least two motors, the method comprises: Detecting a triggering event of motor vibration generated by the electronic device, and acquiring event information of the triggering event of the motor vibration; Using the event information of the triggering event of the motor vibration, obtaining the operating parameters of the at least two motors; The at least two motors are driven to operate with the operating parameters to output a vibration sensation that meets the vibration requirement of a local area of the electronic device.
2. The method for driving a motor according to claim 1, characterized in that: The obtaining the operating parameters of the at least two motors by using the event information of the triggering event of the motor vibration includes: Determine one vibration mode of the motor from among multiple vibration modes of the motor using event information of the triggering event of the motor vibration, wherein the one vibration mode of the motor corresponds to vibration in a local area of the electronic device achieved by superposition and cancellation of the vibrations of the at least two motors; The operating parameters of the at least two motors corresponding to the determined vibration mode are obtained.
3. The method for driving a motor according to claim 1 or 2, characterized in that: The operating parameters of the at least two motors include: the vibration amplitude, phase and vibration frequency of each of the at least two motors, or the vibration amplitude ratio, phase difference and vibration frequency of the at least two motors.
4. The method for driving a motor according to claim 3, characterized in that: The operating parameters of the at least two motors also include: the vibration waveform, driving duration or excitation duration of each of the at least two motors, and / or the vibration amplitude amplification factor of each of the at least two motors.
5. The method for driving a motor according to any one of claims 1 to 4, characterized in that: The detecting that the electronic device generates a triggering event of motor vibration and acquiring event information of the triggering event of the motor vibration includes: It is detected that an application of the electronic device generates a trigger event of motor vibration, and event information of the trigger event of motor vibration is obtained. During the operation of the application, the application detects that the application meets the trigger condition of motor vibration and generates a trigger event of motor vibration.
6. The method for driving a motor according to claim 5, characterized in that: The detecting that an application of the electronic device generates a triggering event of motor vibration, and acquiring event information of the triggering event of the motor vibration includes: It is detected that the game application of the electronic device generates a key event, and information of the key event is obtained. The response method of the key event is to trigger a motor to vibrate to provide a vibration sensation to the user, or the key event is a state change event of an object.
7. The method for driving a motor according to claim 6, characterized in that: The key event response method is to trigger a motor to vibrate to provide a vibration sensation to the user, and the key event information includes the direction of the key event; The key event is a state change event of an object, and the information of the key event includes the type of the key event.
8. The method for driving a motor according to claim 7, characterized in that: The key event response mode is to trigger the motor to vibrate to provide a vibration sensation to the user, and the key event information also includes: the distance between the key event and the object and the type of the key event; Wherein, obtaining the operating parameters of the at least two motors by using the event information of the triggering event of the motor vibration includes: Using the orientation of the key event, obtaining the vibration amplitude, phase and vibration frequency of each of the at least two motors, or the vibration amplitude ratio, phase difference and vibration frequency of the at least two motors; Obtaining a vibration amplitude magnification factor of each of the at least two motors using the distance between the key event and the object; The vibration waveform, driving duration or excitation duration of each of the at least two motors is obtained by using the type of the key event.
9. The method for driving a motor according to claim 7, characterized in that: The key event is a state change event of an object, and the information of the key event further includes: description information of the key event; Wherein, obtaining the operating parameters of the at least two motors by using the event information of the triggering event of the motor vibration includes: Using the type of the key event, obtaining the vibration amplitude, phase and vibration frequency of each of the at least two motors, or the vibration amplitude ratio, phase difference and vibration frequency of the at least two motors; Using the description information of the key event, the vibration amplitude magnification factor of each of the at least two motors, as well as the vibration waveform, driving duration or excitation duration of each of the at least two motors are obtained.
10. The method for driving a motor according to claim 5, characterized in that: The electronic device includes at least three motors, and the detecting that an application of the electronic device generates a triggering event of motor vibration, and acquiring event information of the triggering event of the motor vibration includes: It is detected that the navigation application of the electronic device generates a key event, and information of the key event is obtained, where the information of the key event includes: the front direction of the electronic device, and the navigation direction in the navigation track generated by the navigation application.
11. The method for driving a motor according to claim 10, characterized in that: The information of the key event also includes: the distance between the current position of the electronic device and the next direction adjustment point; the next direction adjustment point is a direction adjustment point in the navigation track that is adjacent to the current position of the electronic device, wherein the event information of the triggering event of the motor vibration is used to obtain the operating parameters of the at least two motors, including: Obtaining the vibration amplitude, phase and vibration frequency of each of the at least three motors, or the vibration amplitude ratio, phase difference and vibration frequency of the at least three motors by using the angle between the front end direction of the electronic device and the navigation direction; The vibration waveform, driving duration or excitation duration of each of the at least three motors is obtained by using the distance between the current position of the electronic device and the next direction adjustment point.
12. The method for driving a motor according to claim 10, characterized in that: Also includes: Detecting that the user deviates from the navigation direction, obtaining operating parameters of the at least three motors corresponding to the vibration mode without the direction pointing attribute, wherein the operating parameters of the vibration mode without the direction pointing attribute include: the vibration amplitude, phase and vibration frequency of each of the at least three motors, or the vibration amplitude ratio, phase difference and vibration frequency of the at least three motors; The at least three motors are driven to operate with operating parameters of the vibration mode without directional pointing attributes.
13. The method for driving a motor according to claim 12, characterized in that: After driving the at least three motors to operate with the operating parameters of the vibration mode without directional orientation attribute, the method further includes: Using the angle between the front end direction of the electronic device and the navigation direction, the operating parameters of the at least three motors are obtained, and the operating parameters of the at least three motors include: the vibration amplitude, phase and vibration frequency of each of the at least three motors, or the vibration amplitude ratio, phase difference and vibration frequency of the at least three motors; The at least three motors are driven to operate with operating parameters of the at least three motors to output a vibration sense that meets the vibration requirement of a local area of the electronic device.
14. The method for driving a motor according to any one of claims 5 to 13, characterized in that: Before the detecting that the electronic device generates a triggering event of motor vibration and acquiring event information of the triggering event of motor vibration, the method further includes: In response to a user's operation on an application of the electronic device, displaying a variety of local vibration reminder options on an interface of the application of the electronic device; An operation of a user on the diversified local vibration reminder option is received, where the operation is used to start the diversified local vibration reminder function of the application.
15. An electronic device, characterized in that: include: one or more processors, memory, and at least two motors; The memory and the at least two motors are coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, when the one or more processors execute the computer instructions, the electronic device executes the motor driving method as described in any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the motor driving method as described in any one of claims 1 to 14.
