Motor driving method, electronic equipment and readable storage medium

By using multiple motors in electronic devices to detect and drive the operating parameters of key frames and intermediate frames, the problem that a single motor vibration cannot transmit vibration sensation is solved, and the vibration sensation is transmitted along the vibration path over time is realized, which improves the user experience and feedback effects.

CN118945248APending Publication Date: 2024-11-12HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310521359.2
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

Technical Problem

The vibration of a single motor in existing electronic devices cannot show the effect of the vibration sensation being transmitted along the vibration path over time, and it is difficult to meet the needs of vibration tactile feedback in different application scenarios.

Method used

Provide a motor driving method, by detecting trigger events, obtaining operating parameters of key frames and intermediate frames, and driving the motor in timestamp order to output mobility vibration sensation and realize vibration sensation vibration along time. Passing of paths.

Benefits of technology

The coordinated operation of multiple motors in electronic devices is realized, showing the effect of vibration sensation being transmitted along the vibration path over time, enhancing the user experience and meeting the diverse vibration tactile feedback needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945248A_ABST
    Figure CN118945248A_ABST
Patent Text Reader

Abstract

The invention provides a motor driving method, an electronic device, a computer program product and a computer readable storage medium, and the electronic device detects that a trigger event of motor vibration is generated, which indicates that the motor needs to be driven to operate to output vibration to the outside. The electronic equipment obtains event information of the trigger event, and motor operation parameters corresponding to the multiple key frames and motor operation parameters corresponding to a middle frame between every two key frames are obtained; the operation parameters of the motor corresponding to the key frame and the middle frame are configured with timestamps; the at least three motors of the electronic equipment run according to the running parameters of the motor corresponding to the key frame and the running parameters of the motor corresponding to the middle frame, and vibration sense of the local area of the electronic equipment can be provided, so that the at least three motors are driven to run according to the running parameters of the motor corresponding to the key frame and the middle frame according to the sequence of the timestamps; the mobile vibration sense can be output through operation of the at least three motors, namely the effect that the vibration sense is transmitted along a vibration path along with time is presented.
Need to check novelty before this filing date? Find Prior Art

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] Currently, electronic devices can be 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 cannot show the effect of the vibration being transmitted along the vibration path over time. Summary of the invention

[0004] The present application provides a motor driving method, electronic equipment, computer program product and computer-readable storage medium, the purpose of which is to present the effect of vibration transmission along the vibration path over time through motor vibration.

[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 is applied to an electronic device with at least three motors, the method comprising: detecting a trigger event of the electronic device generating motor vibration, and obtaining event information of the trigger event of the motor vibration; using the event information of the trigger event of the motor vibration to obtain operating parameters of the motor corresponding to multiple key frames of vibration transmission, and operating parameters of the motor corresponding to the intermediate frames between every two key frames; the operating parameters of the motor corresponding to the key frames and the intermediate frames are configured with timestamps; driving at least three motors to operate in the order of the timestamps with the operating parameters of the motor corresponding to the key frames and the intermediate frames to output a sense of mobility vibration.

[0007] It can be seen from the above content that the trigger event of motor vibration is generated when the electronic device detects the scene where the motor needs to be driven to run. Therefore, the trigger event of motor vibration detected by the electronic device is generated, indicating that the motor needs to be driven to run to output vibration. The electronic device obtains the event information of the trigger event of motor vibration, obtains the operating parameters of the motor corresponding to multiple key frames of vibration transmission, and the operating parameters of the motor corresponding to the intermediate frame between every two key frames; the operating parameters of the motor corresponding to the key frames and the intermediate frames are configured with timestamps; at least three motors of the electronic device are operated with the operating parameters of the motor corresponding to the key frames and the operating parameters of the motor corresponding to the intermediate frames, which can provide vibration in the local area of ​​the electronic device. In this way, driving at least three motors to run according to the order of timestamps with the operating parameters of the motor corresponding to the key frames and the intermediate frames can output mobile vibration through the operation of at least three motors, that is, presenting the effect of vibration transmission along the vibration path over time.

[0008] In one possible implementation, the event information of the triggering event of the motor vibration is used to obtain the operating parameters of the motor corresponding to multiple key frames of vibration transmission and the operating parameters of the motor corresponding to the intermediate frame between every two key frames, including: taking the vibration starting point, vibration end point and nodes in the vibration transmission path in the event information as a key frame respectively, and obtaining the operating parameters of the motor corresponding to each key frame, the vibration area indicated by the operating parameters of the motor corresponding to each key frame is the same as the position of the key frame; determining the intermediate frame between every two key frames, and obtaining the operating parameters of the motor corresponding to the intermediate frame between every two key frames.

[0009] In the above possible implementation, in the event information of the triggering event, the vibration starting point, the node in the transmission path, and the vibration end point are all a vibration point, indicating the position where the motor provides the vibration. By obtaining the motor operation parameters corresponding to the vibration starting point, the vibration end point, and the node in the vibration transmission path, the motor can be operated in sequence with the motor operation parameters corresponding to the vibration point, and the mobile vibration can be output externally. Furthermore, by determining multiple intermediate frames between two key frames and obtaining the motor operation parameters corresponding to each intermediate frame, the motor can provide a smooth vibration between two key frames.

[0010] In one possible implementation, obtaining the operating parameters of the motor corresponding to the intermediate frame between every two key frames includes: calculating the operating parameters of the motor corresponding to the intermediate frame between every two key frames according to the operating parameters of the motor corresponding to every two key frames. In some embodiments, for the operating parameters of a motor corresponding to the intermediate frame, a weighted sum of the operating parameters of the motor corresponding to the two key frames may be calculated as the operating parameters of the motor corresponding to the intermediate frame.

[0011] In one possible implementation, after obtaining the operating parameters of the motor corresponding to multiple key frames of vibration transmission using the event information of the motor vibration triggering event, it also includes: adjusting the operating parameters of the motor corresponding to some or all of the key frames so that the difference in peak vibration amounts indicated by the adjusted operating parameters of the motor corresponding to the multiple key frames is less than a preset value.

[0012] In this possible implementation, adjusting the operating parameters of the motor corresponding to some or all of the key frames can optimize the vibration tactile experience and avoid an abnormal increase in the vibration amount during the vibration transmission process.

[0013] 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, obtaining event information of the trigger event for motor vibration, and when the application is running, the application detects that the application meets the trigger condition for motor vibration, and generates a trigger event for motor vibration.

[0014] In the above possible implementation manner, the application of the electronic device generates a trigger event for motor vibration. The electronic device uses the event information of the trigger event for motor vibration to obtain the operating parameters of the motor corresponding to the key frames and the operating parameters of the motor corresponding to the intermediate frames between every two key frames, and drives at least three motors to operate with the operating parameters. This can realize the application requirement of the electronic device to drive the motor to vibrate to remind the user of mobility vibration.

[0015] In one possible implementation, detecting that an application of an electronic device generates a trigger event for motor vibration, and obtaining event information of the trigger event for motor vibration, includes: detecting that a game application of the electronic device generates a trigger event for motor vibration, and obtaining information of the trigger event for motor vibration.

[0016] 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 user with a sense of mobility, the electronic device obtains information about the event, and uses the information about the event to obtain operating parameters of at least three motors corresponding to key frames and intermediate frames, and drives at least three motors to operate with the operating parameters. This allows the electronic device to respond to the trigger event generated by the game application and drive the motor to operate to provide the user with a sense of mobility.

[0017] In an application scenario, the game application is a competitive game application, and a character in the game launches a big move from one direction to another, or the game application is a driving type application, and a car moves from one direction to another. The game application will generate a trigger event. The electronic device uses the event information of the trigger event to obtain the operating parameters of the motor corresponding to multiple key frames of vibration transmission, and the operating parameters of the motor corresponding to the intermediate frames between every two key frames, and drives the at least three motors to operate in the order of the timestamps with the operating parameters of the motors corresponding to the key frames and the intermediate frames, so as to output a mobile vibration in the same direction as the big move launched by the game character or the same direction as the movement of the car.

[0018] In one possible implementation, detecting that an application of an electronic device generates a trigger event for motor vibration, and obtaining event information of the trigger event for motor vibration, includes: detecting that a video application of the electronic device generates a trigger event for motor vibration when a trigger condition for motor vibration is met, and obtaining event information of the trigger event for motor vibration, wherein the trigger condition for motor vibration includes: during the process of the video application playing a video, the picture of the video application playing the video does not match the display requirements of the video.

[0019] In one possible implementation, detecting that an application of an electronic device generates a trigger event for motor vibration, and obtaining event information of the trigger event for motor vibration, includes: detecting that a video application of the electronic device generates a trigger event for motor vibration when a trigger condition for motor vibration is met, and obtaining event information of the trigger event for motor vibration, wherein the trigger condition for motor vibration includes: before the video application plays the video, the display posture of the electronic device does not match the display requirements of the video.

[0020] In the above two possible implementations, the electronic device detects that a video application generates an event that needs to trigger motor vibration to provide a user with a sense of mobility. The electronic device obtains information about the event, and uses the information about the event to obtain operating parameters of at least three motors corresponding to key frames and intermediate frames, and drives at least three motors to operate with the operating parameters. This allows the electronic device to respond to the trigger event generated by the video application and drive the motor to operate to provide the user with a sense of mobility.

[0021] In an application scenario, the video display requirement is horizontal screen display, and the electronic device plays the video in vertical screen mode. In this way, the picture of the video played by the video application does not match the display requirement of the video. Of course, the display posture of the electronic device does not match the display requirement of the video. The video application generates a trigger event, and the electronic device uses the event information of the trigger event to obtain the operating parameters of the motor corresponding to multiple key frames of vibration transmission, and the operating parameters of the motor corresponding to the intermediate frames between every two key frames, and drives the at least three motors to operate in the order of the timestamps with the operating parameters of the motor corresponding to the key frames and the intermediate frames to output a mobile vibration in the direction of switching the vertical screen display posture to the horizontal screen display posture, so as to remind the user to adjust the posture of the electronic device.

[0022] In one possible implementation, detecting that an application of an electronic device generates a trigger event for motor vibration, and obtaining event information of the trigger event for motor vibration, includes: detecting that a reading application of the electronic device generates a trigger event for motor vibration under a trigger condition for motor vibration, and obtaining event information of the trigger event for motor vibration, wherein the trigger condition for motor vibration includes: during the process of displaying text by the reading application, the display screen of the text does not match the display requirements of the text.

[0023] In the above two possible implementations, the electronic device detects that a reading application generates an event that needs to trigger motor vibration to provide a user with a sense of mobility. The electronic device obtains information about the event and uses the information about the event to obtain operating parameters of at least three motors corresponding to key frames and intermediate frames, and drives at least three motors to operate with the operating parameters. This allows the electronic device to respond to the trigger event generated by the reading application and drive the motor to provide the user with a sense of mobility.

[0024] In a possible implementation, the triggering event of the motor vibration includes: an event in which the electronic device switches from a landscape screen to a portrait screen, or an event in which the electronic device switches from a portrait screen to a landscape screen.

[0025] In one possible implementation, detecting that an application of an electronic device generates a trigger event for motor vibration, and obtaining event information of the trigger event for motor vibration, includes: detecting that a camera application of the electronic device generates a trigger event for motor vibration under conditions that trigger motor vibration, and obtaining event information of the trigger event for motor vibration, wherein the trigger conditions for motor vibration include: the camera application detecting that there is a deviation in the shooting angle of the image.

[0026] In the above possible implementation, the electronic device detects that the camera application generates an event that needs to trigger motor vibration to provide the user with a sense of mobility. The electronic device obtains information about the event and uses the information about the event to obtain operating parameters of at least three motors corresponding to key frames and intermediate frames, and drives at least three motors to operate with the operating parameters. This allows the electronic device to respond to the trigger event generated by the camera application and drive the motor to provide the user with a sense of mobility.

[0027] In an application scenario, the posture of the electronic device for shooting an image is not the optimal posture for image shooting, and the camera application generates a trigger event. The camera application generates a trigger event, and the electronic device uses the event information of the trigger event to obtain the operating parameters of the motor corresponding to multiple key frames of vibration transmission, and the operating parameters of the motor corresponding to the intermediate frames between every two key frames, and drives the at least three motors to operate in the order of the timestamps with the operating parameters of the motor corresponding to the key frames and the intermediate frames to output a mobile vibration to guide the user to adjust the posture of the electronic device.

[0028] In a possible implementation manner, the triggering event of the motor vibration includes: an event of outputting a mobile vibration along a direction opposite to a deviation direction of the shooting angle of the image.

[0029] In one possible embodiment, the operating parameters of the motor corresponding to the key frame include the operating parameters of at least three motors of the electronic device, the operating parameters of the motor corresponding to the intermediate frame include the operating parameters of at least three motors of the electronic device, and the operating parameters of the motor corresponding to the key frame and the operating parameters of the motor corresponding to the intermediate frame are all used to indicate the vibration output in a local area of ​​the electronic device.

[0030] In a second aspect, the present application provides an electronic device comprising: one or more processors, a memory, and at least three motors; the memory and the at least three 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 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.

[0031] 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.

[0032] 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

[0033] Figure 1 Three application scenarios of motor vibration provided in the embodiments of the present application;

[0034] Figure 2 A diagram showing an electronic device provided in an embodiment of the present application having two motors;

[0035] Figure 3 A diagram showing the vibration amount of the entire housing of the electronic device provided in an embodiment of the present application;

[0036] Figure 4 A flow chart of a method for generating a multi-motor drive solution provided in an embodiment of the present application;

[0037] Figure 5 Another diagram showing the vibration amount of the entire housing of the electronic device provided in an embodiment of the present application;

[0038] Figure 6 A diagram showing an electronic device provided in an embodiment of the present application having three motors;

[0039] Figure 7 Another diagram showing the vibration amount of the entire housing of the electronic device provided in an embodiment of the present application;

[0040] 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;

[0041] Fig.11 A diagram showing the vibration transmission provided by the motor provided in the embodiment of the present application;

[0042] Fig.12 Another diagram showing the vibration transmission provided by the motor provided by the embodiment of the present application;

[0043] Fig.13 A hardware structure diagram of an electronic device provided in an embodiment of the present application;

[0044] Fig.14 A software framework diagram of an electronic device provided in an embodiment of the present application;

[0045] Fig.15 A signaling diagram of a motor driving method provided in an embodiment of the present application;

[0046] Fig.16 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;

[0047] Fig.17 A distribution diagram of vibration amounts indicated by operating parameters of a motor corresponding to key frames and intermediate frames provided in an embodiment of the present application;

[0048] Fig.18A display diagram of a video playback scene provided in an embodiment of the present application;

[0049] Fig.19 A signaling diagram of another motor driving method provided in an embodiment of the present application;

[0050] Fig. 20 A display diagram of a captured image scene provided in an embodiment of the present application;

[0051] Fig.21 A signaling diagram of another motor driving method provided in an embodiment of the present application;

[0052] Fig. 22 A schematic diagram of the motor setting position of a foldable electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] For example, Figure 1 Three application scenarios of motor vibration are demonstrated.

[0058] 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.

[0059] 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.

[0060] Figure 1 (c) shows the game scene. Figure 1 As shown in (c), in the game scene, the bomb on the left side of the character explodes and the motor is driven to vibrate.

[0061] 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.

[0062] For example, Figure 2As 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.

[0063] 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.

[0064] 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.

[0065] like Figure 4 As shown, the method for generating a multi-motor drive solution includes:

[0066] S401. Establish a structural model of the electronic device.

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] S403: Setting a target vibration distribution for the structural model of the electronic device.

[0073] 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, that is, a local vibration area of ​​the electronic device. Exemplarily, 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.

[0074] 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.

[0075] 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.

[0076] S405, screening out operating parameters of at least two motors that meet the target vibration distribution requirements.

[0077] 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.

[0078] 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 of the multiple motors.

[0079] 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 at the same time, and the overall 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.

[0080] 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.

[0081] 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.

[0082] For the three motors of the electronic device, you can also use Figure 4 The 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.

[0083] 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.

[0084] 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.

[0085] 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).

[0086] 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.

[0087] 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.

[0088] 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.10 As 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.

[0089] 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.

[0090] The electronic device is equipped with three or more motors, and the motors adopt a multi-motor drive scheme to provide local vibration. The electronic device can control the multiple motors to provide the transmission of local vibration in multiple areas within a continuous time period, that is, the electronic device presents the effect of vibration transmission along the vibration path over time.

[0091] The motor of the electronic device transmits vibration sensation along the vibration path in various ways, for example, Fig.11 (a) shows the vibration transmission between the left and right sides of the electronic device. Fig.11 (b) shows the vibration transmission between the upper and lower sides of the electronic device. Fig.11 (c) shows the vibration transmission between the lower left corner and the upper right corner of the electronic device. Fig.11 Middle (d) shows the vibration transmission between the upper left corner and the lower right corner of the electronic device.

[0092] In addition, the vibration transmission path can also be clockwise or counterclockwise. Fig.12 It demonstrates the clockwise transmission of vibration from the upper left corner of the electronic device to the upper right corner of the electronic device, then to the lower right corner of the electronic device, and finally to the lower left corner of the electronic device.

[0093] Electronic devices use motor driving methods to drive three or more motor outputs to sense along the vibration transmission path. This allows users to adjust the posture of the phone according to the direction of vibration transmission, thereby enhancing the human-computer interaction experience. In some game application scenarios, this can also provide users with a sense of direction for gaming skills.

[0094] 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.

[0095] Take mobile phones as an example. Fig.13 This is an example of the composition of an electronic device provided in an embodiment of the present application. Fig.13 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.

[0096] 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.

[0097] 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.

[0098] 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.

[0099] 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.

[0100] 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 .

[0101] In some embodiments, the internal memory 120 stores a multi-motor driving scheme for a plurality of local vibration modes.

[0102] 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.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] 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.

[0110] 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.

[0111] 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.

[0112] 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.

[0113] 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.

[0114] 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.

[0115] 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.

[0116] 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.

[0117] 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.

[0118] 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 messages, alarm clocks, games, shooting, video playback, etc.) can also correspond to different vibration feedback effects.

[0119] 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.

[0120] Fig.14 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.

[0121] 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.

[0122] The application layer can include a series of application packages. Fig.14 As shown, the application package may include applications such as gallery, map, calendar, call, camera, video application, game application, and reading application.

[0123] In some embodiments, during the running of the game application, the game application can be operated by a motor using a multi-motor driving solution to achieve local vibration transmission in multiple areas of the electronic device, helping the user feel the movement of the game. For specific ways to drive the motor to run the game application, please refer to Fig.15 The corresponding content.

[0124] In some embodiments, the motor can also be used in video playback or reading scenarios. During video playback, the motor uses a multi-motor drive solution to achieve local vibration transmission in multiple areas of the electronic device, guiding the user to change the horizontal and vertical screen states of the electronic device, so that the screen rotation of the horizontal and vertical screen switching animation is accompanied by vibration transmission, making the screen have a real sense. For the specific method of driving the motor for video playback, please refer to Fig.19 Similarly, when the electronic device displays text, the motor uses a multi-motor drive solution to achieve local vibration transmission in multiple areas of the electronic device, guiding the user to change the horizontal or vertical screen state of the electronic device, so that the screen rotation of the horizontal or vertical screen switching animation is accompanied by vibration transmission, making the screen have a sense of reality.

[0125] In some embodiments, the motor can also be reliably applied to the scene of shooting images. In the process of shooting images, the motor adopts a multi-motor driving scheme to realize the local vibration transmission of multiple areas of the electronic device, guide the user to adjust the posture of the electronic device, guide the movement of the picture of the shot image, and optimize the shooting effect of the image. For the specific way of driving the motor of the camera application, please refer to Fig.21 The corresponding content.

[0126] 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.

[0127] like Fig.14 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.

[0128] 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.

[0129] The vibration service module can provide the underlying modules with the basic data that game applications, cameras, reading applications, and video applications need to call the motor runtime, and can also provide the motor vibration playback results to game applications, cameras, reading applications, and video applications.

[0130] 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.

[0131] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0132] 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.

[0133] 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).

[0134] 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.

[0135] HAL is located between the kernel layer and the application framework layer, playing a connecting role.

[0136] 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.15 , Fig.17 and Fig.19 The 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.

[0137] 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.

[0138] 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.14 The display and motor are shown.

[0139] 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.

[0140] The technical solutions involved in the following embodiments can all be implemented in electronic devices having the above-mentioned hardware architecture and software architecture.

[0141] 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 mobile vibration brought by the motor vibration on the electronic device.

[0142] As mentioned above, the software structure of the electronic device can drive the motor to run during the running of the game application of the electronic device. Fig.14 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.

[0143] Fig.15 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 mobile vibration on the electronic device. The game application can refer to a native game application or a third-party game application.

[0144] like Fig.15 As shown, the motor driving method provided in this embodiment includes:

[0145] S1501. The game application displays various local vibration reminder options.

[0146] 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.16 Describes the entry for the game application's "varied local vibration reminders" regarding motors.

[0147] The user starts the game application, and the display screen of the electronic device shows Fig.16 The main interface of the game application shown in (a) of FIG. 1 is shown. The user clicks the setting button 1601 on the main interface of the game application. The electronic device responds to the user's click operation and displays the following Fig.16 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 1602. The user can click on the diversified local vibration reminder function option 1602 to turn on or off the "diversified local vibration reminder" function of the game application regarding the motor.

[0148] 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.

[0149] 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.

[0150] When a user activates the "diversified local vibration reminder" function of the motor in a game application, the game application can drive the motor to operate in a local vibration mode, allowing the user to feel the mobile vibration on the electronic device.

[0151] During the running of the game application, various events may be generated that require driving the motor to vibrate. These events are collectively referred to as trigger events of motor vibration, hereinafter referred to as trigger events.

[0152] S1502: The game application responds to the user's operation and detects a trigger event, and the user's operation is used to activate a diversified local vibration reminder function.

[0153] As in the aforementioned step S1501, after the game application displays the diversified local vibration reminder options, the user inputs an operation to start the diversified local vibration reminder function.

[0154] 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.

[0155] The game application's "diversified local vibration reminder" function for motors is turned on. The game application monitors the triggering events of motor vibrations during operation. After the game application monitors the triggering events of motor vibrations, the game application needs to drive the motor to run through the lower-level module to provide vibration to the user. A triggering event can be understood as an event that needs to be responded to by triggering the motor to vibrate in order to provide a vibration to the user. For example, if the game application is a confrontational game application, a big move from one direction to another by a character in the game is a triggering event; if the game application is a driving-type application, the movement of a car from one direction to another is also a triggering event.

[0156] 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 the trigger event in response to the user's operation, or only call a single motor for interaction through the vibration service module.

[0157] S1503: The game application sends information about a triggering event to the vibration service module. The information about the triggering event includes a starting point, an end point, a transmission path, and a duration of the triggering event.

[0158] After the game application detects the trigger event, it obtains the information of the trigger event. The information of the trigger event includes the starting point, end point, transmission path and duration of the trigger event. The duration can be understood as the duration of the occurrence of the trigger event, including the starting point, the time between the nodes in the transmission path and the end point, where: the transmission path usually includes at least one node. The starting point, the nodes in the transmission path and the end point can be understood as vibration points, the starting point is the vibration starting point, the end point is the vibration end point, and the movement direction of the vibration is: the direction from the starting point to the node in the transmission path to the end point.

[0159] 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 the information of the triggering event to the vibration service module.

[0160] S1504: The vibration service module sends information about the triggering event to the vibration sensing library.

[0161] The vibration service module receives the information of the trigger event, calls the interface of the vibration sensing library, and sends the information of the trigger event to the vibration sensing library.

[0162] S1505: The vibration sensing library obtains the operating parameters of multiple motors corresponding to the key frames of vibration transmission by using the starting point, end point and transmission path of the triggering event.

[0163] 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. In the information of the triggering event received by the vibration library, the starting point, the node in the transmission path, and the end point are all a vibration point, indicating the position where the motor provides the vibration. That is, the starting point, the node in the transmission path, and the end point are all a key frame of vibration transmission. Therefore, the vibration library uses the starting point of the triggering event, the node in the transmission path, and the end point to screen out the corresponding multi-motor drive scheme from the multi-motor drive schemes corresponding to the 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 position of the starting point, the node in the transmission path, and the end point of the triggering event.

[0164] The operating parameters of the multiple motors corresponding to the key frame may be configured with a timestamp to indicate the execution order of the operating parameters of the multiple motors.

[0165] In some embodiments, the multi-motor vibration scheme includes the vibration amplitude ratio and phase difference of multiple motors, and the vibration frequency of each motor. Therefore, the vibration sensing library obtains the vibration amplitude ratio and phase difference corresponding to the multiple motors at the starting point, the nodes in the transmission path and the end point, as well as the vibration frequency of each motor.

[0166] 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 obtain the positions at the starting point, the node in the transmission path and the end point, and the vibration amplitude, vibration phase and vibration frequency corresponding to each motor in the multiple motors.

[0167] For example, the starting point, end point and transmission path of the triggering event are as follows: Fig.12 As shown in the figure, the starting point is the upper left corner vibration indicated by state 1, the end point is the lower left corner vibration indicated by state 4, and the nodes in the transmission path are the upper right corner vibration indicated by state 2 and the lower right corner vibration indicated by state 3. Based on this, the key frames of vibration transmission are Fig.12 Four states are displayed.

[0168] Set the motor j of the electronic device, j = 1, 2 ..., n, in this example n = 3, the vibration amount distribution of the electronic device is state i, i = 1, 2 ..., m; m is the number of key frames, in this example m = 4. The vibration amplitude and phase of motor j are A ij , The vibration frequency of the plurality of motors may be a certain fixed value.

[0169] Fig.12 The multi-motor vibration amplitude and phase corresponding to state 1 in are: motor 1 amplitude A 11 ,Phase Motor 2 Amplitude A 12 ,Phase Motor 3 Amplitude A 13 ,Phase The multi-motor vibration amplitude and phase corresponding to state 2 are: Motor 1 amplitude A 21 ,Phase Motor 2 Amplitude A 22 ,Phase Motor 3 Amplitude A 23 ,Phase The multi-motor vibration amplitude and phase corresponding to state 3 are: Motor 1 amplitude A 31 ,Phase Motor 2 Amplitude A 32 ,Phase Motor 3 Amplitude A33 ,Phase The multi-motor vibration amplitude and phase corresponding to state 4 are: Motor 1 amplitude A 41 ,Phase Motor 2 Amplitude A 42 ,Phase Motor 3 Amplitude A 43 ,Phase

[0170] In some embodiments, after the vibration library obtains the operating parameters of multiple motors corresponding to each key frame, the operating parameters of multiple motors corresponding to multiple key frames can be adjusted so that the peak vibration amounts of the local vibration modes corresponding to the key frames are close.

[0171] The criteria for adjusting the operating parameters of multiple motors include: adjusting the operating parameters of multiple motors corresponding to key frames with lower peak vibration amounts among multiple key frames, so that the peak vibration amounts corresponding to the adjusted operating parameters of the motors are increased; adjusting the operating parameters of multiple motors corresponding to key frames with higher peak vibration amounts among multiple key frames, so that the peak vibration amounts corresponding to the adjusted operating parameters of the motors are reduced.

[0172] Among them, "lower" can be understood as the key frame with the lowest peak vibration amount among multiple key frames, or the key frame with a peak vibration amount less than the average value of the peak vibration amounts of multiple key frames, and the difference between the peak vibration amount of multiple key frames and the average value of the peak vibration amounts of multiple key frames is greater than the threshold. Similarly, "higher" can also be understood as the key frame with the highest peak vibration amount among multiple key frames, or the key frame with a peak vibration amount greater than the average value of the peak vibration amounts of multiple key frames, and the difference between the peak vibration amount of multiple key frames and the average value of the peak vibration amounts of multiple key frames is greater than the threshold. The threshold can be a set value.

[0173] Generally speaking, for key frames with lower peak vibration amounts, adjusting the operating parameters of the corresponding multiple motors can be understood as reducing the vibration amplitudes of the multiple motors; for key frames with higher peak vibration amounts, adjusting the operating parameters of the corresponding multiple motors can be understood as increasing the vibration amplitudes of the multiple motors.

[0174] For example, assuming Fig.12 The peak vibration amounts of states 1 to 4 shown in the figure are 1.2 Grms, 1.2 Grms, 1.5 Grms and 1.0 Grms. In order to further optimize the vibrotactile experience and avoid abnormal increase in vibration during vibration transmission, the operating parameters of the three motors corresponding to state 3 can be appropriately adjusted to reduce the peak vibration amount of state 3, so that the peak vibration amount of the four key frames is around 1.2 Grms.

[0175] S1506. The vibration library uses the duration to obtain an intermediate frame between every two key frames, and calculates operating parameters of multiple motors corresponding to the intermediate frame.

[0176] The duration includes the time between the starting point, the node in the transfer path, and the end point. The starting point, the node in the transfer path, and the end point are each a key frame. In order to ensure that the motor can provide a smooth vibration between two key frames, the vibration library determines multiple intermediate frames between the two key frames and calculates the operating parameters of multiple motors corresponding to each intermediate frame.

[0177] In some embodiments, the vibration library divides the time between two key frames into multiple time periods, and the end point of each time period, except for the last time period, is an intermediate frame. Of course, the multiple time periods can be equally spaced or unequally spaced. The multiple time periods are equally spaced, so that the duration of the driving motor in each time period is the same to achieve a uniform vibration transmission experience. The multiple time periods are unequally spaced, and the duration of each time period can also change according to a certain nonlinear rule to achieve a non-uniform vibration transmission experience.

[0178] The operating parameters of the multiple motors corresponding to the intermediate frames may also be configured with timestamps to indicate the execution order of the operating parameters of the motors.

[0179] It is worth noting that in order to ensure a smooth vibration transmission effect, the number of intermediate frames can be quite large. Therefore, in order to reduce the storage space occupied by the electronic device, the operating parameters of the multiple motors corresponding to these intermediate frames can be calculated through several key frames stored in the vibration library. Of course, the operating parameters of the multiple motors corresponding to the multiple intermediate frames between two key frames obtained in advance can also be calculated and stored in the vibration library, and the vibration library obtains the operating parameters of the multiple motors corresponding to the intermediate frames between the key frames obtained in step S1505.

[0180] For example, Fig.12 The vibration transfer from state 1 to state 2 is shown to illustrate the method of obtaining the motor parameters of the intermediate frame. State 1 is at time t1, and state 2 is at time t2. For example, the vibration transfer process from state 1 to state 2 can be divided into three equally spaced time periods, namely: So, time point and It can be understood as two intermediate frames.

[0181] The piecewise function for time t is defined as follows:

[0182]

[0183] Calculating the operating parameters of the multiple motors corresponding to the intermediate frames can be understood as calculating the vibration amplitudes, vibration phases, and vibration frequencies of the multiple motors corresponding to the intermediate frames.

[0184] The vibration amplitude A of motor j at time t corresponding to each intermediate frame tj (t) and phase The calculation is done using the following formula:

[0185]

[0186] For example, Fig.17 The vibration amount distribution indicated by the operating parameters of multiple motors corresponding to two intermediate frames between two key frames is shown. Fig.17 The key frame 1 shown refers to Fig.12 The key frame corresponding to state 1 is shown, and key frame 2 refers to Fig.12 The key frames corresponding to state 2 are shown.

[0187] It can be seen from the above formula that the operating parameters of the motor corresponding to the two key frames are used to calculate the operating parameters of the motor corresponding to the intermediate frame between the two key frames. Generally, for the operating parameters of a motor corresponding to the intermediate frame, the weighted sum of the operating parameters of the motor corresponding to the two key frames can be calculated as the operating parameters of the motor corresponding to the intermediate frame.

[0188] Furthermore, the motor operating parameters corresponding to the two key frames have a sequential execution order, and the motor operating parameters corresponding to the multiple intermediate frames between the two key frames also have a sequential execution order. Based on this, the motor operating parameters corresponding to the two key frames are used to calculate the motor operating parameters corresponding to an intermediate frame. The motor operating parameters corresponding to the intermediate frame are close to the motor operating parameters of the key frame, and the weight ratio is high. The motor operating parameters corresponding to the intermediate frame are far from the motor operating parameters of the key frame, and the weight ratio is low.

[0189] It should be noted that the operating parameters of the motor may also include the vibration duration of the motor. After step S1505 and step S1506 obtain the key frame and the intermediate frame, the key frame and the intermediate frame are understood as a vibration point of the motor, and the interval time from the previous vibration point to the next vibration point of the motor is used as the vibration duration of the previous vibration point. The vibration duration of the vibration point can be expressed as a vibration waveform or a driving duration (also referred to as an excitation duration). In this way, in some embodiments, the vibration sensing library uses the time between two vibration points 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 at the vibration point. In other embodiments, the vibration sensing library can also use the time between two vibration points to determine the driving duration or excitation duration of each motor in a plurality of motors.

[0190] It should also be noted that in step S1506, the vibration library obtains the intermediate frame between two key frames, which needs to meet the following principles: the vibration duration of the key frame and the intermediate frame is greater than or equal to the benchmark operating duration of the motor. The benchmark operating duration of the motor can be understood as the unit time for driving the motor to run once. The vibration duration of the key frame and the intermediate frame is greater than or equal to the benchmark operating duration of the motor, which can ensure that the motor runs completely with the operating parameters corresponding to the key frame once, and then switches to the operating parameters corresponding to the intermediate frame. Similarly, it can also ensure that the motor runs completely with the operating parameters corresponding to the intermediate frame once, and then switches to the operating parameters corresponding to other intermediate frames or key frames, thereby not affecting the service life of the motor.

[0191] S1507: The vibration library sends an instruction to the motor driver through the tactile feedback generator. The instruction carries operating parameters of multiple motors corresponding to the key frames and intermediate frames.

[0192] 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 operating parameters of multiple motors corresponding to the key frames and intermediate frames obtained by the vibration library need to be sent to the motor driver by the tactile feedback generator.

[0193] 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 of multiple motors in multiple key frames and intermediate frames 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.

[0194] It should be noted that the operating parameters of the multiple motors corresponding to the key frames and the operating parameters of the multiple motors corresponding to the intermediate frames need to be encoded into a section of motor operating parameters that change over time in chronological order.

[0195] In the above example, the operating parameter list obtained by encoding the operating parameters of the motor corresponding to the key frames and the intermediate frames may be as shown in the following table.

[0196]

[0197] S1508, the motor drive controls multiple motors to operate according to the information carried by the instructions.

[0198] The motor drive controls multiple motors to operate according to the motor operating parameters encoded according to the key frames and intermediate frames corresponding to the motor operating parameters, which can provide the user with a sense of mobility along the transfer path to the end point at the starting point of the trigger event.

[0199] The operating parameters of the multiple motors corresponding to the key frames and the intermediate frames include: the operating parameters of each motor in the electronic device. Each motor in the electronic device operates using its own operating parameters among the operating parameters of the multiple motors corresponding to the key frames, and the multiple motors in the electronic device operate simultaneously, and the superposition and offset of vibrations caused by the simultaneous operation of the multiple motors can generate a vibration in a local area of ​​the electronic device; similarly, each motor in the electronic device operates using its own operating parameters among the operating parameters of the multiple motors corresponding to the intermediate frames, and the multiple motors in the electronic device operate simultaneously, and the superposition and offset of vibrations caused by the simultaneous operation of the multiple motors can also generate a vibration in a local area of ​​the electronic device.

[0200] In some embodiments, the motor driver may also drive the motor to operate by sending a driving waveform to the motor. Based on this, the vibration library generates driving waveforms of multiple motors corresponding to the key frames and intermediate frames using the operating parameters of the multiple motors corresponding to the key frames and intermediate frames obtained in the aforementioned steps S1505 and S1506. The vibration library sends the driving waveform of each motor corresponding to the key frames and intermediate frames 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.

[0201] The vibration library generates driving waveforms of multiple motors in key frames and intermediate frames, which can be understood as: adjusting the vibration waveforms of multiple motors in key frames and intermediate frames so that the vibration amplitude, vibration phase and vibration frequency of the adjusted vibration waveforms of the multiple motors correspond to the values ​​obtained by the vibration library in steps S1505 and S1506.

[0202] It should be noted that, for the operating parameters of multiple motors corresponding to the key frames and intermediate frames, the vibration waveform of the motor is replaced by the driving duration or excitation duration of the motor in the operating parameters of the motor obtained by the vibration library. 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 vibration amplitude of the vibration waveform of the motor, 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.

[0203] S1509: The motor driver returns the vibration playback result to the game application through the tactile feedback generator and the vibration service mode.

[0204] 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.

[0205] 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.

[0206] As described in the software structure of the electronic device, the motor can also be driven to run during the operation of the video application and the reading application of the electronic device. Fig.18 The video playing scene is shown in Figure 1. Fig.18 As shown in (a), it can be seen that the electronic device uses a vertical screen display to play the video, which results in a small screen size of the video, which is inconvenient for users to watch. The electronic device can remind the user to adjust the posture of the electronic device by displaying an animation, such as Fig.18 (b) shows an animation of adjusting from a vertical screen display to a horizontal screen display. Furthermore, when the electronic device displays the animation, the motor is driven to provide a mobile vibration in the same direction as the posture adjustment direction presented in the animation, making the animation more realistic. After the user sees the animation and feels the mobile vibration, he can adjust the posture of the electronic device in the direction indicated by the mobile vibration. Fig.18 The posture of horizontal screen display shown in (c).

[0207] The following combination Fig.14 The module in the software framework of the electronic device is shown, and the operation process of the video application driving the motor is introduced. Of course, in the scenario where the reading application displays text, the reading application can also control the motor operation to provide a mobile vibration to remind the user to adjust the posture of the electronic device. The method of driving the motor operation of the reading application can be found in Fig.19 The present embodiment does not describe this in detail.

[0208] Fig.19The signaling diagram of the video application driving the motor operation is shown. During operation, the video application mentioned in this embodiment can drive the motor of the electronic device to vibrate, and the vibration of the motor is superimposed to enable the user to feel the vibration locally in the electronic device, so as to provide the user with the direction of movement. The video application can refer to a native video application or a third-party video application.

[0209] like Fig.19 As shown, the driving method of the motor includes:

[0210] S1901. The video application displays various local vibration reminder options.

[0211] The video application can set various local vibration reminder options to provide the user with a "various local vibration reminder" function to turn on or off the motor. In some embodiments, the various local vibration reminder options can be displayed in the setting interface of the video application. The various local vibration reminder options can be as follows: Fig.16 As shown in (b), a switch button is provided.

[0212] 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 video 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.

[0213] S1902: The video application responds to the user's operation and enables a diversified local vibration reminder function.

[0214] The user input operation turns on the "diversified local vibration reminder" function of the motor, and the video application can turn on the diversified local vibration reminder function in response to the user's operation.

[0215] The user's operation is to turn off or not turn on the diversified local vibration reminder function. In response to the user's operation, the video application does not turn on the "diversified local vibration reminder" function of the motor, that is, it does not interact with the vibration service module according to the trigger event, or only calls a single motor for interaction through the vibration service module.

[0216] S1903: The video application obtains the video, and parses the attribute information of the video to obtain the display requirements of the video.

[0217] After the video application turns on the motor's "diversified local vibration reminder" function, during the video application playing the video, the motor operation can be controlled according to the video display requirements to provide users with a sense of mobile vibration.

[0218] After the video application is turned on, it can play a video in response to a user input operation to play the video. Before playing the video, the video application first obtains the video, which can be a local video or a video located in the cloud. In some embodiments, the attribute information of the video includes the display requirement of the video, which can be understood as the display ratio of the image in the video, which is used to indicate the aspect ratio of the image. Exemplarily, the video application obtains a video, and the display requirement in the attribute information of the video is horizontal screen 16:9.

[0219] S1904: The video application generates information about a triggering event based on the matching relationship between the video playback screen and the video display requirement. The information about the triggering event includes a starting point, an end point, a transmission path, and a duration of the triggering event.

[0220] After the video application obtains the video, it plays the video. The video application obtains the video playback screen and adaptively matches the video playback screen with the video display requirements to obtain a matching relationship. The video application determines that the matching relationship is that the video playback screen does not meet the video display requirements, and the video application generates information about the trigger event. The video application determines that the matching relationship is that the video playback screen meets the video display requirements, and the video application exits the process of this method.

[0221] The information of the trigger event includes the starting point, end point, transmission path and duration of the trigger event. The duration can be understood as the duration of the occurrence of the trigger event, including the time between the starting point, the node in the transmission path and the end point, where the transmission path usually includes at least one node. The starting point, the node in the transmission path and the end point can be understood as vibration points, the starting point is the vibration starting point, the end point is the vibration end point, and the moving direction of the vibration sense is: the direction from the starting point to the node in the transmission path to the end point.

[0222] In some embodiments, the video application generates information about the triggering event based on the matching relationship between the video playback screen and the video display requirement, including:

[0223] The video application performs image analysis on the video playback screen to obtain the display area of ​​the video image on the display screen. The video application determines that the display area of ​​the video image on the display screen is the middle area of ​​the display screen and is smaller than the size of the display screen, indicating that the video playback screen does not meet the video display requirements, and the video application generates information about the trigger event.

[0224] The video display requirement is the horizontal screen ratio, and the information of the trigger event generated by the video application is the information of the vertical screen switching to the horizontal screen event, that is, the starting point of the trigger event is the upper right corner of the electronic device, and the end point is the lower left corner of the electronic device. The transmission path is from the upper right corner of the electronic device to the upper left corner, and then to the lower left corner. The duration can be a set value.

[0225] The video display requires a vertical screen ratio, and the information generated by the video application as a trigger event is information about the horizontal screen switching to the vertical screen event, that is, the starting point of the trigger event is the lower left corner of the electronic device, and the end point is the upper right corner of the electronic device. The transmission path is from the lower left corner of the electronic device to the upper left corner, and then to the upper right corner. The duration can also be a set value.

[0226] It should be noted that before playing the video, the video application can also detect the posture of the electronic device through the acceleration sensor and / or gyroscope, such as detecting whether the electronic device is in a horizontal screen display posture or a vertical screen display posture. After the video application obtains the posture of the electronic device, it adaptively matches the posture of the electronic device with the display requirements of the video. If the posture of the electronic device does not meet the display requirements of the video, the video application generates information about the trigger event.

[0227] Among them, the display requirement of the video is the horizontal screen ratio, the posture of the electronic device is the horizontal screen display posture, and the posture of the electronic device meets the display requirement of the video, otherwise it does not meet; similarly, the display requirement of the video is the vertical screen ratio, the posture of the electronic device is the vertical screen display posture, and the posture of the electronic device meets the display requirement of the video, otherwise it does not meet.

[0228] The manner in which the video application generates information of a trigger event when the posture of the electronic device does not meet the display requirements of the video may include:

[0229] The video display requires a horizontal screen ratio, and the information generated by the video application to trigger the event is the information of the vertical screen switching to the horizontal screen event, that is, the starting point of the trigger event is the upper right corner of the electronic device, and the end point is the lower left corner of the electronic device. The transmission path is from the upper right corner of the electronic device to the upper left corner, and then to the lower left corner. The duration can be a set value.

[0230] The video display requires a vertical screen ratio, and the information generated by the video application as a trigger event is information about the horizontal screen switching to the vertical screen event, that is, the starting point of the trigger event is the lower left corner of the electronic device, and the end point is the upper right corner of the electronic device. The transmission path is from the lower left corner of the electronic device to the upper left corner, and then to the upper right corner. The duration can also be a set value.

[0231] S1905: The video application sends information of a triggering event to the vibration service module.

[0232] The video application calls the ringtone vibration interface of the vibration service module to send information of the triggering event to the vibration service module.

[0233] S1906: The vibration service module sends information about the triggering event to the vibration sensing library.

[0234] The vibration service module receives the information of the trigger event, calls the interface of the vibration sensing library, and sends the information of the trigger event to the vibration sensing library.

[0235] S1907: The vibration sensing library obtains operating parameters of multiple motors corresponding to key frames of vibration transmission by using the starting point, end point and transmission path of the trigger event.

[0236] In the information of the triggering event received by the vibration library, the starting point, the node in the transmission path, and the end point are all a vibration point, indicating the position where the motor provides vibration. That is, the starting point, the node in the transmission path, and the end point are all a key frame of vibration transmission. Therefore, the vibration library uses the starting point of the triggering event, the node in the transmission path, and the end point 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 starting point of the triggering event, the node in the transmission path, and the end point.

[0237] In some embodiments, the multi-motor vibration scheme includes the vibration amplitude ratio and phase difference of multiple motors, and the vibration frequency of each motor. Therefore, the vibration sensing library obtains the vibration amplitude ratio and phase difference corresponding to the multiple motors at the starting point, the nodes in the transmission path and the end point, as well as the vibration frequency of each motor.

[0238] 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 obtain the positions at the starting point, the node in the transmission path and the end point, and the vibration amplitude, vibration phase and vibration frequency corresponding to each motor in the multiple motors.

[0239] The vibration library uses the starting point, end point and transmission path of the trigger event to obtain the operating parameters of multiple motors corresponding to the key frame of vibration transmission. Please refer to the content of step S1505 in the above embodiment, which will not be repeated here.

[0240] S1908. The vibration library uses the duration to obtain an intermediate frame between every two key frames, and calculates operating parameters of multiple motors corresponding to the intermediate frame.

[0241] The duration includes the time between the starting point, the node in the transfer path and the end point, and the starting point, the node in the transfer path and the end point are each regarded as a key frame. The vibration library determines multiple intermediate frames between two key frames using the time period between the key frames, and calculates the operating parameters of multiple motors in each intermediate frame.

[0242] The manner in which the vibration library determines the intermediate frames between the key frames and calculates the operating parameters of the multiple motors in each intermediate frame can be found in the aforementioned step S1506 and will not be described in detail here.

[0243] S1909. The vibration library sends instructions to the motor driver through the tactile feedback generator, where the instructions carry operating parameters of multiple motors corresponding to the key frames and intermediate frames.

[0244] The specific implementation of step S1909 can refer to the content of step S1507 in the aforementioned embodiment, which will not be repeated here.

[0245] S1910, the motor drive controls multiple motors to operate according to the information carried by the instructions.

[0246] The multiple motors of the electronic device can operate with the operating parameters of the multiple motors carried by the instruction, and can provide the user with a mobile vibration sensation in the direction from the starting point of the trigger event along the transmission path to the end point. The specific implementation of step S1910 can refer to the content of step S1508 in the above embodiment, which will not be repeated here.

[0247] S1911. The motor driver returns the vibration playback result to the video application through the tactile feedback generator and the vibration service mode.

[0248] The specific implementation of step S1911 can refer to the content of step S1509 in the aforementioned embodiment, which will not be repeated here.

[0249] In this embodiment, in the scenario where the video application plays a video, the electronic device does not display the image of the video in a posture corresponding to the display requirements of the video. The electronic device can use steps S1903 to S1910 to drive the motor to run, and the motor provides the user with a sense of mobility vibration, and the direction of the sense of mobility vibration is the direction in which the display posture of the electronic device switches to the display posture corresponding to the display requirements of the video.

[0250] It should be noted that in the scenario where the reading application displays text, the attribute information of the text may also include the display requirements of the text. Based on this, the reading application may also generate information about the trigger event based on the matching relationship between the display screen of the text and the display requirements of the text. The vibration library may use the information about the trigger event to generate the operating parameters of multiple motors corresponding to the key frames and the intermediate frames. The motor drive controls the motor to operate with the operating parameters of multiple motors corresponding to the key frames and the intermediate frames, providing the user with a mobile vibration. Of course, the direction of the mobile vibration is also the direction in which the display posture of the electronic device switches to the display posture corresponding to the display requirements of the text.

[0251] As described in the software structure of the electronic device, the motor can be driven to run during the operation of the camera application of the electronic device. Fig. 20 The camera captures an image. The camera application of the electronic device is turned on, and the camera preview interface displayed on the display is as follows: Fig. 20The posture of the electronic device is not the best posture for image capture, so the electronic device needs to remind the user to adjust the posture of the electronic device. Fig. 20 As shown, the control motor provides a mobile vibration along the direction of the arrow, allowing the user to adjust the posture of the electronic device along the direction of the arrow.

[0252] Of course, in the scenario where the camera is taking pictures, the electronic device can also control the motor operation to provide mobile vibration in the clockwise direction, counterclockwise direction, single-end from top to bottom or from bottom to top, etc. according to the user's posture of holding the electronic device. This embodiment has no specific limitations.

[0253] The following combination Fig.14 The modules in the software framework of the electronic device are displayed, and the operation process of the camera application drive motor is introduced.

[0254] Fig.21 The signaling diagram for the camera application to drive the motor operation is shown in Figure 1. Fig.21 As shown, the driving method of the motor includes:

[0255] S2101. The camera application displays various local vibration reminder options.

[0256] The camera application may also set various local vibration reminder options to provide the user with a "various local vibration reminder" function to turn on or off the motor. In some embodiments, the various local vibration reminder options may be displayed in the camera application's settings interface. Fig.16 As shown in (b), a switch button is provided.

[0257] In some other embodiments, the diversified local vibration reminder options may also be displayed in the form of a pop-up window on the main interface, setting interface or other interface of the camera application. The pop-up window of the diversified local vibration reminder options may include: a button for turning 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.

[0258] S2102. The camera application responds to the user's operation and enables a diversified local vibration reminder function.

[0259] The user input operation turns on the "diversified local vibration reminder" function of the motor, and the camera application can turn on the diversified local vibration reminder function in response to the user's operation.

[0260] If the user's operation is to turn off or not turn on the diversified local vibration reminder function, the camera application will not turn on the "diversified local vibration reminder" function of the motor in response to the user's operation, that is, it will not interact with the vibration service module according to the trigger event, or only call a single motor for interaction through the vibration service module.

[0261] S2103: The camera application acquires and analyzes the image to obtain an analysis result of the shooting effect of the image.

[0262] After the motor's "diversified local vibration reminder" function is turned on and the camera application is started in shooting mode, the motor can be driven to provide users with a sense of mobile vibration based on the posture of the electronic device.

[0263] After the camera application is turned on, the camera is called to run to collect images, and the images collected by the camera are used to generate a camera preview interface. In this way, the display screen can display the camera preview interface. The camera application obtains the images collected by the camera, analyzes the shooting effects of the images, and obtains the analysis results of the shooting effects of the images.

[0264] The camera application analyzes the shooting effect of the image, which can be understood as analyzing the image data, obtaining the shooting angle of the image, and determining whether the shooting angle of the image is biased. For example, the electronic device shoots an image in a horizontal screen posture, and the left end of the electronic device is higher than the right end. In this way, in the image captured by the camera of the electronic device, the image data on the left and the image data on the right are not on the same horizontal line. Based on this, the shooting angle of the image is biased.

[0265] S2104. The camera application generates information about a triggering event using the analysis result of the shooting effect of the image. The information about the triggering event includes a starting point, an end point, a transmission path, and a duration of the triggering event.

[0266] The analysis result of the shooting effect of the image indicates that the shooting angle of the image is deviated, and the camera application can generate information of a triggering event.

[0267] In some embodiments, the analysis result of the shooting effect of the camera application on the image may also include the deviation direction of the shooting angle of the image. The camera application may generate information about the trigger event using the deviation direction of the shooting angle of the image. Usually, the direction indicated by the information about the trigger event generated by the camera application is: the opposite direction of the deviation direction of the shooting angle of the image. It can be understood that: the starting point of the trigger event is the starting point of the deviation direction of the shooting angle of the image, the end point of the trigger event is the end point of the deviation direction of the shooting angle of the image, and the transmission path of the trigger event is the path in the opposite direction of the deviation direction of the shooting angle of the image.

[0268] Exemplarily, the left end of the electronic device is higher than the right end, and the deviation direction of the image shooting angle is from the left to the right. Based on this, the analysis result of the image shooting effect indicates that the image shooting angle is deviated, and the camera application generates information of the trigger event corresponding to the counterclockwise rotation, in which the starting point of the trigger event is the left side of the electronic device, the starting point of the trigger event is the right side of the electronic device, and the transmission path is from the upper left corner of the electronic device to the lower left corner, and then to the lower right corner; the duration can be a set value.

[0269] Similarly, the left end of the electronic device is lower than the right end, and the deviation direction of the image shooting angle is from the right to the left. Based on this, the analysis result of the image shooting effect indicates that the image shooting angle is deviated, and the camera application generates information on the trigger event corresponding to the counterclockwise rotation. The starting point of the trigger event is the right side of the electronic device, the starting point of the trigger event is the left side of the electronic device, and the transmission path is from the upper right corner of the electronic device to the lower right corner, and then to the lower left corner; the duration can be a set value.

[0270] S2105: The camera application sends information of a triggering event to the vibration service module.

[0271] The video application calls the ringtone vibration interface of the vibration service module to send information of the triggering event to the vibration service module.

[0272] S2106: The vibration service module sends information about the triggering event to the vibration sensing library.

[0273] The vibration service module receives the information of the trigger event, calls the interface of the vibration sensing library, and sends the information of the trigger event to the vibration sensing library.

[0274] S2107. The vibration sensing library obtains the operating parameters of multiple motors corresponding to the key frames of vibration transmission by using the starting point, end point and transmission path of the trigger event.

[0275] In the information of the triggering event received by the vibration library, the starting point, the node in the transmission path, and the end point are all a vibration point, indicating the position where the motor provides vibration. That is, the starting point, the node in the transmission path, and the end point are all a key frame of vibration transmission. Therefore, the vibration library uses the starting point of the triggering event, the node in the transmission path, and the end point 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 starting point of the triggering event, the node in the transmission path, and the end point.

[0276] In some embodiments, the multi-motor vibration scheme includes the vibration amplitude ratio and phase difference of multiple motors, and the vibration frequency of each motor. Therefore, the vibration sensing library obtains the vibration amplitude ratio and phase difference corresponding to the multiple motors at the starting point, the nodes in the transmission path and the end point, as well as the vibration frequency of each motor.

[0277] 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 obtain the positions at the starting point, the node in the transmission path and the end point, and the vibration amplitude, vibration phase and vibration frequency corresponding to each motor in the multiple motors.

[0278] The vibration library uses the starting point, end point and transmission path of the trigger event to obtain the operating parameters of multiple motors corresponding to the key frame of vibration transmission. Please refer to the content of step S1505 in the above embodiment, which will not be repeated here.

[0279] S2108. The vibration library uses the duration to obtain an intermediate frame between every two key frames, and calculates operating parameters of multiple motors corresponding to the intermediate frame.

[0280] The duration includes the time between the starting point, the node in the transfer path and the end point, and the starting point, the node in the transfer path and the end point are each regarded as a key frame. The vibration library determines multiple intermediate frames between two key frames using the time period between the key frames, and calculates the operating parameters of multiple motors in each intermediate frame.

[0281] The manner in which the vibration library determines the intermediate frames between the key frames and calculates the operating parameters of the multiple motors in each intermediate frame can be found in the aforementioned step S1506 and will not be described in detail here.

[0282] S2109. The vibration library sends instructions to the motor driver through the tactile feedback generator, where the instructions carry operating parameters of multiple motors corresponding to the key frames and intermediate frames.

[0283] The specific implementation of step S2109 can refer to the content of step S1507 in the aforementioned embodiment, which will not be repeated here.

[0284] S2110, the motor drive controls multiple motors to operate according to the information carried by the instructions.

[0285] The multiple motors of the electronic device can operate with the operating parameters of the multiple motors carried by the instruction, and can provide the user with a mobile vibration sensation in the direction from the starting point of the trigger event along the transmission path to the end point. The specific implementation of step S2110 can refer to the content of step S1508 in the above embodiment, which will not be repeated here.

[0286] S2111. The motor driver returns the vibration playback result to the camera application through the tactile feedback generator and the vibration service mode.

[0287] The specific implementation of step S2111 can refer to the content of step S1509 in the aforementioned embodiment, which will not be repeated here.

[0288] In this embodiment, in the image capture scene, the posture of the electronic device causes the shooting angle of the image captured by the camera to deviate. The electronic device can use steps S2103 to S2110 to drive the motor to operate, and the motor provides mobility vibration to the user. The direction of the mobility vibration is opposite to the deviation direction of the image shooting angle, guiding the user to adjust the posture of the electronic device along the direction of the mobility vibration provided by the motor to improve the image capture effect.

[0289] 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. 22 shown.

[0290] 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.

[0291] In application scenarios such as gaming, video playback, text display, and image capture, foldable electronic devices can also combine the posture of the foldable electronic device to determine the multi-motor operation plan for the corresponding local vibration mode, so as to avoid the vibration corresponding to the local vibration mode being difficult to stimulate due to the posture factors of the foldable electronic device.

[0292] 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.

[0293] 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.

[0294] 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 three 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, the operating parameters of the motor corresponding to the multiple key frames of the vibration transmission and the operating parameters of the motor corresponding to the intermediate frames between every two key frames are obtained; the operating parameters of the motor corresponding to the key frames and the intermediate frames are configured with timestamps; The at least three motors are driven to operate according to the order of the timestamps with the operating parameters of the motors corresponding to the key frames and the intermediate frames to output a mobility vibration.

2. The method for driving a motor according to claim 1, characterized in that: The method of using the event information of the triggering event of the motor vibration to obtain the operating parameters of the motor corresponding to a plurality of key frames of vibration transmission and the operating parameters of the motor corresponding to the intermediate frames between every two key frames includes: The vibration starting point, the vibration end point and the node in the vibration transmission path in the event information are respectively taken as a key frame, and the operation parameters of the motor corresponding to each key frame are obtained, and the vibration area indicated by the operation parameters of the motor corresponding to each key frame is the same as the position of the key frame; An intermediate frame between every two of the key frames is determined, and operating parameters of the motor corresponding to the intermediate frame between every two of the key frames are obtained.

3. The method for driving a motor according to claim 2, characterized in that: The step of obtaining the operating parameters of the motor corresponding to the intermediate frame between each two key frames comprises: According to the operating parameters of the motor corresponding to every two key frames, the operating parameters of the motor corresponding to the intermediate frame between every two key frames are calculated.

4. The method for driving a motor according to any one of claims 1 to 3, characterized in that: After obtaining the motor operation parameters corresponding to a plurality of key frames of vibration transmission by using the event information of the triggering event of the motor vibration, the method further includes: The operating parameters of the motor corresponding to some or all of the key frames are adjusted so that the difference in the peak vibration amounts indicated by the operating parameters of the motor corresponding to the adjusted key frames is smaller than a preset value.

5. The motor driving method 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 a game application of the electronic device generates a triggering event of the motor vibration, and information of the triggering event of the motor vibration is obtained.

7. 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 video application of the electronic device generates a motor vibration trigger event when the motor vibration trigger condition is met, and event information of the motor vibration trigger event is obtained, wherein the motor vibration trigger condition includes: during the process of the video application playing a video, the picture of the video application playing the video does not match the display requirement of the video.

8. 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 video application of the electronic device generates a motor vibration trigger event when the motor vibration trigger condition is met, and event information of the motor vibration trigger event is obtained, wherein the motor vibration trigger condition includes: before the video application plays the video, the display posture of the electronic device does not match the display requirement of the video.

9. 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 reading application of the electronic device generates a motor vibration trigger event when the motor vibration trigger condition is met, and event information of the motor vibration trigger event is obtained, wherein the motor vibration trigger condition includes: during the process of the reading application displaying text, the display screen of the text does not match the display requirements of the text.

10. The method for driving a motor according to any one of claims 7 to 9, characterized in that: The triggering event of the motor vibration includes: an event in which the electronic device switches from a horizontal screen to a vertical screen, or an event in which the electronic device switches from a vertical screen to a horizontal screen.

11. 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 camera application of the electronic device generates a motor vibration trigger event when the motor vibration trigger condition is met, and event information of the motor vibration trigger event is obtained, wherein the motor vibration trigger condition includes: the camera application detects that the shooting angle of the image is deviant.

12. The method for driving a motor according to claim 11, characterized in that: The triggering event of the motor vibration includes: an event of outputting a mobile vibration in a direction opposite to a deviation direction of a shooting angle of an image.

13. The method for driving a motor according to any one of claims 1 to 12, characterized in that: The operating parameters of the motor corresponding to the key frame include the operating parameters of at least three motors of the electronic device, the operating parameters of the motor corresponding to the intermediate frame include the operating parameters of at least three motors of the electronic device, and the operating parameters of the motor corresponding to the key frame and the operating parameters of the motor corresponding to the intermediate frame are both used to indicate the vibration output in a local area of ​​the electronic device.

14. An electronic device, characterized in that: include: one or more processors, memory, and at least three motors; The memory and the at least three 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 13.

15. 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 13.