Vibration motor control method and control device, electronic device and storage medium
By generating a target vector and combining the parameters of the application, device and motor, the vibration stop waveform is dynamically determined, which solves the problem in the existing technology that the vibration motor stop waveform cannot be adapted to different mobile phone models, and improves the vibration experience.
Patent Information
- Application Number
- CN202111042999.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-07
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2041-09-07
AI Technical Summary
The vibration stop waveform of the existing vibration motor cannot be adapted to different mobile phone models, resulting in poor vibration experience.
By generating a target vector and combining the Embedding vector of the application, the hardware parameter vector of the electronic device, and the hardware parameter vector of the vibration motor, the vibration stop waveform suitable for the current environment is dynamically determined to match the vibration start waveform.
Improved vibration experience, making the vibration stop waveform more consistent with current applications, electronic devices and vibration motors, eliminating the impact of differences in physical properties.
Smart Images

Figure CN113761741B
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a control method and control device for a vibration motor, an electronic device and a storage medium. Background Art
[0002] In related technologies, mobile phones and other electronic devices use vibration motors to simulate the "feel" of virtual switches, virtual knobs, virtual keyboards, etc. when they are triggered. Using a linear motor as a vibration motor can achieve better results.
[0003] Generally speaking, it is necessary to drive the linear motor to vibrate through the start waveform, and then stop the linear motor from vibrating through the stop waveform. At present, the stop waveform is generally a preset waveform. However, due to the different physical properties of different mobile phones, the preset stop waveform cannot be adapted to all mobile phone models, resulting in a poor vibration experience. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a control method and control device for a vibration motor, an electronic device and a storage medium, which can generate a suitable stop vibration waveform in real time to improve the vibration experience.
[0005] In a first aspect, an embodiment of the present application provides a control method for a vibration motor, comprising:
[0006] In the case of receiving a start-up waveform generated when the electronic device runs a target application, determining a first vector of the target application, wherein the first vector is an embedding vector of the target application, and the start-up waveform is a waveform that drives a vibration motor of the electronic device to work;
[0007] Determine a second vector of the electronic device and a third vector of the vibration motor, wherein the second vector is a hardware parameter vector of the electronic device and the third vector is a hardware parameter vector of the vibration motor;
[0008] Merge the first vector, the second vector and the third vector to obtain the target vector;
[0009] Determine a target vibration stopping waveform corresponding to the vibration starting waveform according to the vibration starting waveform and the target vector, wherein the target vibration stopping waveform is a waveform for controlling the vibration motor to stop working;
[0010] The vibration motor is controlled to operate based on the vibration start waveform and the target vibration stop waveform.
[0011] In a second aspect, an embodiment of the present application provides a control device for a vibration motor, comprising:
[0012] A determination module, configured to determine a first vector of the target application upon receiving a start-up waveform generated when the electronic device runs the target application, wherein the first vector is an Embedding vector of the target application, and the start-up waveform is a waveform for driving a vibration motor of the electronic device to work; determine a second vector of the electronic device, and a third vector of the vibration motor, wherein the second vector is a hardware parameter vector of the electronic device, and the third vector is a hardware parameter vector of the vibration motor;
[0013] A processing module, used for combining the first vector, the second vector and the third vector to obtain a target vector;
[0014] The determination module is further used to determine a target vibration stop waveform corresponding to the vibration start waveform according to the vibration start waveform and the target vector, wherein the target vibration stop waveform is a waveform that controls the vibration motor to stop working;
[0015] The control module is used to control the vibration motor to operate based on the start-up waveform and the target stop-vibration waveform.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method of the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the method of the first aspect.
[0019] In the embodiment of the present application, the start-up waveform, i.e., the waveform used to drive the vibration motor to start vibrating, when the user inputs a virtual button, a virtual knob, or a virtual keyboard in the application, the application will output the start-up waveform to the vibration motor according to the set vibration mode. After receiving the start-up waveform, the first vector, the second vector, and the third vector corresponding to the application, the electronic device, and the vibration motor are further determined respectively, and the target vector is determined by combining the first vector, the second vector, and the third vector. According to the target vector and the start-up waveform, the corresponding target stop-vibration waveform is determined, so that the target stop-vibration waveform is related to the start-up waveform, the current application, the current electronic device itself, and the current vibration motor, that is, the target stop-vibration waveform is a "more suitable" stop-vibration waveform in the current environment and scene, thereby effectively improving the vibration experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flow chart showing a method for controlling a vibration motor according to an embodiment of the present application is shown;
[0021] Figure 2 A structural block diagram of a control device for a vibration motor according to an embodiment of the present application is shown;
[0022] Figure 3 A structural block diagram of an electronic device according to an embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0025] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0026] The control method and control device, electronic device and storage medium of the vibration motor provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0027] In some embodiments of the present application, a control method for a vibration motor is provided. Figure 1 A flow chart of a method for controlling a vibration motor according to an embodiment of the present application is shown. Figure 1 As shown, the method includes:
[0028] Step 102, determining a first vector of the target application program upon receiving a start-up waveform generated when the electronic device runs the target application program;
[0029] In step 102, the first vector is an Embedding vector of a target application, and the oscillation waveform is a waveform for driving a vibration motor of an electronic device;
[0030] Step 104, determining a second vector of the electronic device and a third vector of the vibration motor;
[0031] Step 106, combining the first vector, the second vector and the third vector to obtain a target vector;
[0032] In step 106, the second vector is a hardware parameter vector of the electronic device, and the third vector is a hardware parameter vector of the vibration motor;
[0033] Step 108, determining a target stop-oscillation waveform corresponding to the start-oscillation waveform according to the start-oscillation waveform and the target vector;
[0034] In step 108, the target vibration stopping waveform is a waveform for controlling the vibration motor to stop working;
[0035] Step 110 , operating based on the start-up waveform and the target stop-oscillation waveform.
[0036] In the embodiment of the present application, the start-up waveform is specifically a waveform used to drive the vibration motor to start vibration. When the user inputs a virtual button, a virtual knob or a virtual keyboard in the application, the application will output the start-up waveform to the vibration motor according to the set vibration mode. It can be understood that different start-up waveforms correspond to different vibration modes of the vibration motor.
[0037] When an electronic device simulates feedback from a button, knob or keyboard being triggered through a vibration motor, its vibration mode is generally a short vibration. Therefore, after the vibration motor starts to vibrate, a stop waveform is needed to control the vibration motor to stop vibrating.
[0038] At the same time, due to different applications, the start-up waveforms generated for the same vibration requirements may be different, but the start-up waveform generated by the same application is fixed. Therefore, when determining the stop-vibration waveform, the present application synthesizes the target vector according to the first vector of the application, the second vector of the electronic device and the third vector of the vibration motor. Therefore, the target vector simultaneously considers the dimensions of the application, the hardware of the electronic device, the dimensions of the size and the shape, supplier and power temperature of the vibration motor. Therefore, the generated stop-vibration waveform can correspond to the application currently calling the vibration motor, the electronic device currently in use and the vibration motor of the current electronic device, that is, the stop-vibration waveform that best matches the current application scenario is generated.
[0039] The embodiment of the present application determines the corresponding target stop-vibration waveform based on the target vector and the start-vibration waveform, so that the target stop-vibration waveform is related to the start-vibration waveform, the current application, the current electronic device itself, and the current vibration motor. That is, the target stop-vibration waveform is a "more suitable" stop-vibration waveform in the current environment and scenario, thereby effectively improving the vibration experience.
[0040] In some embodiments of the present application, determining a second vector of the electronic device and a third vector of the vibration motor includes:
[0041] Acquire a first hardware parameter of the electronic device and a second hardware parameter of the vibration motor;
[0042] generating a second vector according to the first hardware parameter, and generating a third vector according to the second hardware parameter;
[0043] The first hardware parameter includes one or more of the following: size information of the electronic device, weight information of the electronic device, shape information of the electronic device;
[0044] The second hardware parameter includes one or more of the following: resistance information of the vibration motor, inductance information of the vibration motor, weight information of the vibration motor, and power information of the vibration motor.
[0045] In the embodiment of the present application, the vibration generated by the vibration motor is actually the application of electrical energy to the electronic device, that is, the mobile phone body, through electromagnetic work, thereby giving the user tactile feedback. Therefore, the hardware quality of the vibration motor itself and the physical properties of the electronic device body will affect the vibration effect.
[0046] In order to eliminate these influences, the present application takes into account the dimension of the hardware parameters of the electronic device, i.e., the second vector mentioned above, and also takes into account the dimension of the hardware parameters of the vibration motor, i.e., the third vector mentioned above, when determining the stop vibration waveform. Specifically, the hardware parameters of the electronic device may include the size information of the electronic device, such as the length, width, and thickness of the electronic device, and may also include the weight and shape of the electronic device. The hardware parameters of the vibration motor may include the electrical parameters of the vibration motor, such as the resistance information, inductance information, etc. of the vibration motor, and may also include the weight information of the vibration motor, and may also include the power information of the vibration motor.
[0047] The second vector of the electronic device is generated according to the first hardware parameter of the electronic device. Specifically, assuming that the electronic device is A, the hardware parameters of the electronic device A include a different parameters, such as size information A1, weight information A2, and shape information A3. Therefore, a vector with a total of a dimensions [A1, A2, A3...Aa] is obtained, which is the above-mentioned second vector.
[0048] Similarly, assuming that the vibration motor of electronic device A is B, the hardware parameters of vibration motor B include b different parameters. According to the same method, a vector with a total of b dimensions [B1, B2, B3...Bb] is obtained, which is the third vector mentioned above.
[0049] The embodiment of the present application eliminates the influence caused by the different physical properties of different electronic devices by considering the hardware parameters of the current electronic device and the vibration motor when generating the stop vibration waveform, so that the stop vibration waveform is consistent with the current working environment and the vibration experience is improved.
[0050] In some embodiments of the present application, before determining the first vector of the target application, the control method further includes:
[0051] Obtaining N preset oscillation waveforms, wherein the N preset oscillation waveforms correspond to first hardware parameters of X electronic devices and second hardware parameters of Y vibration motors, respectively, and N, X, and Y are positive integers;
[0052] Obtaining historical operation information, wherein the historical operation information includes click data of M applications, where M is a positive integer;
[0053] Determine M fourth vectors according to historical operation information;
[0054] Sampling historical operation information and establishing an initial model;
[0055] Normalizing the X first hardware parameters and the Y second hardware parameters to obtain a fifth vector;
[0056] Generate a training set according to N preset oscillation waveforms and the fifth vector;
[0057] The initial model is trained using the training set to obtain a trained target model.
[0058] In the embodiment of the present application, the first vector is specifically a vector describing the target application, including the Embedding information of the target application. When determining the first vector, the Embedding information of the target application can be calculated by a calculation model.
[0059] Obtain the starting waveform combinations corresponding to different motor models, different mobile phone models, and different applications. Specifically, first obtain N preset starting waveforms, wherein the N starting waveforms correspond to X first hardware parameters and Y second hardware parameters, that is, the N starting waveforms correspond to X types of electronic devices and Y types of vibration motors.
[0060] Then, a list of historical click behaviors of users under different applications is further obtained. Specifically, historical operation information is obtained, which includes clicked data of M applications, wherein each click is equivalent to an input made by the user to the application. After receiving the input, the application generates a start-up waveform to control the vibration motor to vibrate, thereby providing feedback to the user input. Assuming that m clicks are obtained for each application, M sequences including m click data are obtained, and the fourth vector is determined based on these sequences.
[0061] Among them, the fourth vector corresponds to multiple vibration feedback data of multiple applications. According to the fourth vector and N preset starting waveforms, a target model is generated. The target model takes into account the characteristics of the starting waveforms of different electronic devices and different vibration motors in different applications. Therefore, when the electronic device, vibration motor and starting waveform are known, the first vector reflecting the characteristics of the current application can be accurately obtained.
[0062] When building the target model, the initial model is first built by sampling the historical operation information. Specifically, the historical information includes the historical click behaviors of clicking on M applications, wherein, optionally, if the time interval between two consecutive clicks is greater than a preset threshold T interval , then these two clicks are used as the segmentation. In this way, several sequences can be obtained, and sequences with lengths less than 7 and sequences that do not contain the target application are discarded, and finally N seq A sequence.
[0063] Furthermore, initialize N seq The length of each vector in the sequence, and through the sliding window method, N seq A sliding window with a sequence length of 5 is sampled to establish the initial model.
[0064] Furthermore, the X first hardware parameters and the Y second hardware parameters, that is, the vector parameters of the second vector and the third vector, are normalized to obtain a fifth vector, which includes hardware parameters of different electronic devices and different vibration motors.
[0065] A training set is generated based on N preset start-up waveforms and the fifth vector corresponding to the N preset start-up waveforms, and the training set includes hardware parameters of different electronic devices, hardware parameters of different vibration motors, and permutations and combinations of different start-up waveforms. The initial model is trained using the training set, wherein different applications are extracted as prediction targets, and the hardware parameters of the electronic device, the hardware parameters of the vibration motor, and the start-up waveform are used as inputs for training. When the prediction result error of the initial model is less than a threshold, the training is stopped to obtain a trained target model, and the first vector of the application can be accurately calculated using the trained target model.
[0066] In some embodiments of the present application, determining a first vector of a target application includes:
[0067] According to the target model, a vector matrix is obtained, where the vector matrix includes a mapping relationship between multiple preset applications and multiple preset Embedding vectors;
[0068] Through the vector matrix, a preset Embedding vector corresponding to a preset application matching the target application is determined as a first vector.
[0069] In the embodiment of the present application, since each program in the target model randomly initializes a vector value and saves the corresponding relationship between these vectors and programs, each vector can form a vector matrix, so the vector matrix includes the mapping relationship between multiple preset application programs and multiple preset embedding vectors.
[0070] Therefore, the value of the vector matrix at this time is obtained through the target model, and the Embedding vector corresponding to the current target application, that is, the first vector mentioned above, is found through the mapping relationship in this vector matrix, so as to quickly obtain the feature vector of the application.
[0071] In some embodiments of the present application, determining a target stop oscillation waveform corresponding to the start oscillation waveform according to the start oscillation waveform and the target vector includes:
[0072] Obtaining N preset stop oscillation waveforms corresponding one to one to the N preset start oscillation waveforms;
[0073] respectively determining N first similarities between the starting waveform and N preset starting waveforms;
[0074] Determine M fifth vectors according to the M fourth vectors and the target vector;
[0075] Determine M second similarities of the first vector and the M fifth vectors respectively;
[0076] N×M products of the N first similarities and the M second similarities are calculated, and a preset vibration stop waveform corresponding to a maximum value of the N×M products is determined as a target vibration stop waveform.
[0077] In the embodiment of the present application, the N preset stop vibration waveforms are specifically obtained through engineering tests or software models based on the N preset start-up waveforms, and are the "optimal" stop vibration waveforms of different start-up waveforms under different start-up motors, different electronic devices, and different hard-impulse programs.
[0078] When determining the target stop waveform, firstly, based on the dynamic time warping algorithm (Dynamic Time Warping, DTW), the first similarity between the currently received start waveform and N preset start waveforms is calculated, and a total of N first similarities are obtained. The first similarity represents the similarity between the currently received start waveform and the known start waveform.
[0079] Furthermore, based on a target vector reflecting hardware parameters of the current electronic device and vibration motor and characteristics of the current target application, and M fourth vectors of M known applications determined based on historical data, M fifth vectors are determined, wherein the M fifth vectors are specifically a combination of all known applications and the hardware parameters of the current electronic device and vibration motor.
[0080] According to the cosine similarity algorithm, the second similarities between the first vector of the current target application and the M fifth vectors are calculated to obtain M second similarities, where the second similarities represent the similarities between the current scene and the known scene.
[0081] Furthermore, the products of the N first similarities and the M second similarities are calculated respectively to obtain the values of N×M products. Among these N×M products, the maximum product value is determined, and this maximum product value corresponds to a preset start-up waveform. Let this preset start-up waveform be the closest start-up waveform. This start-up waveform and the corresponding scene are closest to the start-up waveform received by the current electronic device and the current scene. Therefore, the preset stop-vibration waveform corresponding to the closest start-up waveform is the stop-vibration waveform that best matches the current start-up waveform, the hardware parameters of the current electronic device, and the hardware parameters of the current vibration motor. The stop-vibration waveform is determined as the target stop-vibration waveform, and the vibration motor is controlled to work by the target stop-vibration waveform, which can effectively improve the vibration experience.
[0082] In some embodiments of the present application, a control device for a vibration motor is provided. Figure 2 FIG. 4 shows a structural block diagram of a control device for a vibration motor according to an embodiment of the present application. Figure 2 As shown, the control device 200 of the vibration motor includes:
[0083] The determination module 202 is used to determine a first vector of the target application program when receiving a start-up waveform generated when the electronic device runs the target application program, wherein the first vector is an embedding vector of the target application program, and the start-up waveform is a waveform for driving a vibration motor of the electronic device to work; determine a second vector of the electronic device, and a third vector of the vibration motor, wherein the second vector is a hardware parameter vector of the electronic device, and the third vector is a hardware parameter vector of the vibration motor;
[0084] A processing module 204 is used to combine the first vector, the second vector and the third vector to obtain a target vector;
[0085] The determination module 202 is further used to determine a target vibration stop waveform corresponding to the vibration start waveform according to the vibration start waveform and the target vector, wherein the target vibration stop waveform is a waveform that controls the vibration motor to stop working;
[0086] The control module 206 is used to control the vibration motor to operate based on the vibration start waveform and the target vibration stop waveform.
[0087] In the embodiment of the present application, the start-up waveform is specifically a waveform used to drive the vibration motor to start vibration. When the user inputs a virtual button, a virtual knob or a virtual keyboard in the application, the application will output the start-up waveform to the vibration motor according to the set vibration mode. It can be understood that different start-up waveforms correspond to different vibration modes of the vibration motor.
[0088] When an electronic device simulates feedback from a button, knob or keyboard being triggered through a vibration motor, its vibration mode is generally a short vibration. Therefore, after the vibration motor starts to vibrate, a stop waveform is needed to control the vibration motor to stop vibrating.
[0089] At the same time, due to different applications, the start-up waveforms generated for the same vibration requirements may be different, but the start-up waveform generated by the same application is fixed. Therefore, when determining the stop-vibration waveform, the present application synthesizes the target vector according to the first vector of the application, the second vector of the electronic device and the third vector of the vibration motor. Therefore, the target vector simultaneously considers the dimensions of the application, the hardware of the electronic device, the dimensions of the size and the shape, supplier and power temperature of the vibration motor. Therefore, the generated stop-vibration waveform can correspond to the application currently calling the vibration motor, the electronic device currently in use and the vibration motor of the current electronic device, that is, the stop-vibration waveform that best matches the current application scenario is generated.
[0090] The embodiment of the present application determines the corresponding target stop-vibration waveform based on the target vector and the start-vibration waveform, so that the target stop-vibration waveform is related to the start-vibration waveform, the current application, the current electronic device itself, and the current vibration motor. That is, the target stop-vibration waveform is a "more suitable" stop-vibration waveform in the current environment and scenario, thereby effectively improving the vibration experience.
[0091] In some embodiments of the present application, the control device of the vibration motor further includes:
[0092] A first acquisition module, used to acquire a first hardware parameter of the electronic device and a second hardware parameter of the vibration motor;
[0093] A generating module, configured to generate a second vector according to the first hardware parameter, and generate a third vector according to the second hardware parameter;
[0094] The first hardware parameter includes one or more of the following: size information of the electronic device, weight information of the electronic device, shape information of the electronic device;
[0095] The second hardware parameter includes one or more of the following: resistance information of the vibration motor, inductance information of the vibration motor, weight information of the vibration motor, and power information of the vibration motor.
[0096] The embodiment of the present application eliminates the influence caused by the different physical properties of different electronic devices by considering the hardware parameters of the current electronic device and the vibration motor when generating the stop vibration waveform, so that the stop vibration waveform is consistent with the current working environment and the vibration experience is improved.
[0097] In some embodiments of the present application, the second acquisition module is further used to acquire N preset start-up waveforms, wherein the N preset start-up waveforms correspond to the first hardware parameters of X electronic devices and the second hardware parameters of Y vibration motors, respectively, and N, X, and Y are positive integers; acquire historical operation information, wherein the historical operation information includes clicked data of M applications, and M is a positive integer;
[0098] The determination module is further used to determine M fourth vectors according to the historical operation information;
[0099] Establish a module for sampling historical operation information and establishing an initial model;
[0100] The processing module is further used to normalize the X first hardware parameters and the Y second hardware parameters to obtain a fifth vector;
[0101] The generation module is also used to generate a training set according to N preset oscillation waveforms and the fifth vector; train the initial model through the training set to obtain a trained target model.
[0102] In the embodiment of the present application, the first vector is specifically a vector describing the target application, which includes the Embedding information of the target application. When determining the first vector, the Embedding information of the target application can be calculated by a calculation model. When the electronic device, the vibration motor and the vibration waveform are known, the first vector reflecting the characteristics of the current application can be accurately obtained.
[0103] A training set is generated based on N preset start-up waveforms and the fifth vector corresponding to the N preset start-up waveforms, and the training set includes hardware parameters of different electronic devices, hardware parameters of different vibration motors, and permutations and combinations of different start-up waveforms. The initial model is trained using the training set, wherein different applications are extracted as prediction targets, and the hardware parameters of the electronic device, the hardware parameters of the vibration motor, and the start-up waveform are used as inputs for training. When the prediction result error of the initial model is less than a threshold, the training is stopped to obtain a trained target model, and the first vector of the application can be accurately calculated using the trained target model.
[0104] In some embodiments of the present application, the determination module is also used to obtain a vector matrix based on the target model, the vector matrix including a mapping relationship between multiple preset applications and multiple preset Embedding vectors; through the vector matrix, the preset Embedding vector corresponding to the preset application that matches the target application is determined as the first vector.
[0105] In an embodiment of the present application, the value of the vector matrix at this time is obtained through the target model, and the Embedding vector corresponding to the current target application, that is, the first vector mentioned above, is found through the mapping relationship in this vector matrix, thereby realizing the rapid acquisition of the feature vector of the application.
[0106] In some embodiments of the present application, the acquisition module is further used to acquire N preset stop oscillation waveforms corresponding one-to-one to the N preset start oscillation waveforms;
[0107] The determination module is also used to: respectively determine N first similarities between the start-up waveform and N preset start-up waveforms; determine M fifth vectors according to M fourth vectors and the target vector; respectively determine M second similarities between the first vector and the M fifth vectors; calculate N×M products of the N first similarities and the M second similarities, and determine the preset stop-oscillation waveform corresponding to the maximum value of the N×M products as the target stop-oscillation waveform.
[0108] In the embodiment of the present application, the products of N first similarities and M second similarities are calculated respectively to obtain the values of N×M products. Among these N×M products, the maximum product value is determined, and this maximum product value corresponds to a preset start-up waveform. Let this preset start-up waveform be the closest to the start-up waveform. This start-up waveform and the corresponding scene are closest to the start-up waveform received by the current electronic device and the current scene. Therefore, the preset stop-vibration waveform corresponding to the closest start-up waveform is the stop-vibration waveform that best matches the current start-up waveform, the hardware parameters of the current electronic device, and the hardware parameters of the current vibration motor. The stop-vibration waveform is determined as the target stop-vibration waveform, and the vibration motor is controlled to work by the target stop-vibration waveform, which can effectively improve the vibration experience.
[0109] The control device of the vibration motor in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0110] The control device of the vibration motor in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0111] The control device for the vibration motor provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0112] Optionally, an embodiment of the present application further provides an electronic device, Figure 3 A structural block diagram of an electronic device according to an embodiment of the present application is shown. Figure 3As shown, the electronic device 300 includes a processor 302, a memory 304, and a program or instruction stored in the memory 304 and executable on the processor 302. When the program or instruction is executed by the processor 302, each process of the above-mentioned method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0113] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0114] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0115] The electronic device 400 includes but is not limited to components such as a radio frequency unit 401 , a network module 402 , an audio output unit 403 , an input unit 404 , a sensor 405 , a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , and a processor 410 .
[0116] Those skilled in the art will appreciate that the electronic device 400 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0117] Among them, the processor 410 is used to determine the first vector of the target application when receiving the start-up waveform generated when the electronic device runs the target application, wherein the first vector is the Embedding vector of the target application, and the start-up waveform is a waveform that drives the vibration motor of the electronic device to work; determine the second vector of the electronic device, and the third vector of the vibration motor, wherein the second vector is the hardware parameter vector of the electronic device, and the third vector is the hardware parameter vector of the vibration motor; merge the first vector, the second vector and the third vector to obtain the target vector; determine the target stop-vibration waveform corresponding to the start-up waveform according to the start-up waveform and the target vector, wherein the target stop-vibration waveform is a waveform that controls the vibration motor to stop working; control the vibration motor to operate based on the start-up waveform and the target stop-vibration waveform.
[0118] Optionally, the processor 410 is further configured to obtain a first hardware parameter of the electronic device and a second hardware parameter of the vibration motor; generate a second vector according to the first hardware parameter, and generate a third vector according to the second hardware parameter;
[0119] Among them, the first hardware parameters include one or more of the following: size information of the electronic device, weight information of the electronic device, and shape information of the electronic device; the second hardware parameters include one or more of the following: resistance information of the vibration motor, inductance information of the vibration motor, weight information of the vibration motor, and power information of the vibration motor.
[0120] Optionally, the processor 410 is further configured to obtain N preset starting waveforms, wherein the N preset starting waveforms correspond to first hardware parameters of X electronic devices and second hardware parameters of Y vibration motors, respectively, and N, X, and Y are positive integers; obtain historical operation information, wherein the historical operation information includes clicked data of M applications, and M is a positive integer; determine M fourth vectors according to the historical operation information; sample the historical operation information to establish an initial model; normalize the X first hardware parameters and the Y second hardware parameters to obtain a fifth vector; generate a training set according to the N preset starting waveforms and the fifth vector; and train the initial model through the training set to obtain a trained target model.
[0121] Optionally, the processor 410 is also used to obtain a vector matrix according to the target model, the vector matrix including a mapping relationship between multiple preset applications and multiple preset Embedding vectors; through the vector matrix, the preset Embedding vector corresponding to the preset application matching the target application is determined as the first vector.
[0122] Optionally, the processor 410 is also used to obtain N preset stop-oscillation waveforms corresponding one-to-one to the N preset start-oscillation waveforms; respectively determine N first similarities between the start-oscillation waveform and the N preset start-oscillation waveforms; determine M fifth vectors based on M fourth vectors and the target vector; respectively determine M second similarities between the first vector and the M fifth vectors; calculate N×M products of the N first similarities and the M second similarities, and determine the preset stop-oscillation waveform corresponding to the maximum value of the N×M products as the target stop-oscillation waveform.
[0123] In the embodiment of the present application, the start-up waveform, i.e., the waveform used to drive the vibration motor to start vibrating, when the user inputs a virtual button, a virtual knob, or a virtual keyboard in the application, the application will output the start-up waveform to the vibration motor according to the set vibration mode. After receiving the start-up waveform, the first vector, the second vector, and the third vector corresponding to the application, the electronic device, and the vibration motor are further determined respectively, and the target vector is determined by combining the first vector, the second vector, and the third vector. According to the target vector and the start-up waveform, the corresponding target stop-vibration waveform is determined, so that the target stop-vibration waveform is related to the start-up waveform, the current application, the current electronic device itself, and the current vibration motor, that is, the target stop-vibration waveform is a "more suitable" stop-vibration waveform in the current environment and scene, thereby effectively improving the vibration experience.
[0124] It should be understood that in an embodiment of the present application, the input unit 404 may include a graphics processor (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode.
[0125] The display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not repeated here. The memory 409 may be used to store software programs and various data, including but not limited to applications and operating systems. The processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.
[0126] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0127] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0128] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0129] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0130] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0132] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A control method for a vibration motor, characterized in that: include: In case of receiving a start-up waveform generated when the electronic device runs a target application, determining a first vector of the target application, wherein the first vector is an embedding vector of the target application, and the start-up waveform is a waveform that drives a vibration motor of the electronic device to work; Determine a second vector of the electronic device and a third vector of the vibration motor, wherein the second vector is a hardware parameter vector of the electronic device and the third vector is a hardware parameter vector of the vibration motor; Combining the first vector, the second vector and the third vector to obtain a target vector; Determining a target vibration stopping waveform corresponding to the vibration starting waveform according to the vibration starting waveform and the target vector, wherein the target vibration stopping waveform is a waveform for controlling the vibration motor to stop working; Controlling the vibration motor to operate based on the vibration start waveform and the target vibration stop waveform; Before determining the first vector of the target application, the control method further includes: Obtaining N preset oscillation waveforms, wherein the N preset oscillation waveforms correspond to first hardware parameters of X electronic devices and second hardware parameters of Y vibration motors, respectively, and N, X, and Y are positive integers; Acquire historical operation information, wherein the historical operation information includes click data of M applications, where M is a positive integer; Determine M fourth vectors according to the historical operation information; Sampling the historical operation information to establish an initial model; Normalizing the X first hardware parameters and the Y second hardware parameters to obtain a fifth vector; Generate a training set according to the N preset starting waveforms and the fifth vector; The initial model is trained using the training set to obtain a trained target model.
2. The control method of the vibration motor according to claim 1, characterized in that: The determining of the second vector of the electronic device and the third vector of the vibration motor comprises: Acquire a first hardware parameter of the electronic device and a second hardware parameter of the vibration motor; generating the second vector according to the first hardware parameter, and generating the third vector according to the second hardware parameter; The first hardware parameter includes one or more of the following: size information of the electronic device, weight information of the electronic device, shape information of the electronic device; The second hardware parameter includes one or more of the following: resistance information of the vibration motor, inductance information of the vibration motor, weight information of the vibration motor, and power information of the vibration motor.
3. The control method of the vibration motor according to claim 1, characterized in that: The determining of the first vector of the target application comprises: According to the target model, a vector matrix is obtained, wherein the vector matrix includes a mapping relationship between a plurality of preset applications and a plurality of preset Embedding vectors; The preset Embedding vector corresponding to the preset application matching the target application is determined as the first vector through the vector matrix.
4. The control method of the vibration motor according to claim 1, characterized in that: The step of determining a target stop oscillation waveform corresponding to the start oscillation waveform according to the start oscillation waveform and the target vector includes: Acquire N preset stop oscillation waveforms corresponding one-to-one to the N preset start oscillation waveforms; respectively determining N first similarities between the oscillation waveform and the N preset oscillation waveforms; Determine M fifth vectors according to the M fourth vectors and the target vector; Determine M second similarities between the first vector and the M fifth vectors respectively; N×M products of the N first similarities and the M second similarities are calculated, and a preset vibration stop waveform corresponding to a maximum value of the N×M products is determined as the target vibration stop waveform.
5. A control device for a vibration motor, characterized in that: include: A determination module, configured to determine a first vector of a target application upon receiving a start-up waveform generated when the electronic device runs the target application, wherein the first vector is an Embedding vector of the target application, and the start-up waveform is a waveform for driving a vibration motor of the electronic device to work; determine a second vector of the electronic device, and a third vector of the vibration motor, wherein the second vector is a hardware parameter vector of the electronic device, and the third vector is a hardware parameter vector of the vibration motor; A processing module, configured to combine the first vector, the second vector and the third vector to obtain a target vector; The determination module is further used to determine a target vibration stop waveform corresponding to the vibration start waveform according to the vibration start waveform and the target vector, wherein the target vibration stop waveform is a waveform that controls the vibration motor to stop working; A control module, used for controlling the vibration motor to operate based on the vibration start waveform and the target vibration stop waveform; A second acquisition module is used to acquire N preset start-up waveforms, wherein the N preset start-up waveforms correspond to first hardware parameters of X electronic devices and second hardware parameters of Y vibration motors, respectively, and N, X, and Y are positive integers; acquire historical operation information, wherein the historical operation information includes clicked data of M applications, and M is a positive integer; The determination module is further used to determine M fourth vectors according to the historical operation information; Establishing a module, used for sampling the historical operation information and establishing an initial model; The processing module is further used to perform normalization processing on the X first hardware parameters and the Y second hardware parameters to obtain a fifth vector; A generating module is used to generate a training set according to the N preset oscillation waveforms and the fifth vector; and train the initial model through the training set to obtain a trained target model.
6. The control device for a vibration motor according to claim 5, characterized in that: Also includes: A first acquisition module, used to acquire a first hardware parameter of the electronic device and a second hardware parameter of the vibration motor; The generating module is further configured to generate the second vector according to the first hardware parameter, and generate the third vector according to the second hardware parameter; The first hardware parameter includes one or more of the following: size information of the electronic device, weight information of the electronic device, shape information of the electronic device; The second hardware parameter includes one or more of the following: resistance information of the vibration motor, inductance information of the vibration motor, weight information of the vibration motor, and power information of the vibration motor.
7. The control device for a vibration motor according to claim 5, characterized in that: The determination module is also used to obtain a vector matrix based on the target model, and the vector matrix includes a mapping relationship between multiple preset applications and multiple preset Embedding vectors; through the vector matrix, the preset Embedding vector corresponding to the preset application matching the target application is determined as the first vector.
8. The control device for a vibration motor according to claim 6, characterized in that: The first acquisition module is further used to acquire N preset stop oscillation waveforms corresponding one-to-one to the N preset start oscillation waveforms; The determination module is further used to: respectively determine N first similarities between the start-up waveform and the N preset start-up waveforms; determine M fifth vectors according to the M fourth vectors and the target vector; respectively determine M second similarities between the first vector and the M fifth vectors; calculate N×M products of the N first similarities and the M second similarities, and determine the preset stop-oscillation waveform corresponding to the maximum value of the N×M products as the target stop-oscillation waveform.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction implements the steps of the method according to any one of claims 1 to 4 when executed by the processor.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Motor control method and device, computer readable medium and terminal equipment
CN111182140A
