A linear motor aging test method and terminal device

The linear motor vibration is controlled through different driving methods, and the test parameters are generated to simulate different usage scenarios, which solves the problem that traditional testing methods cannot fully cover the linear motor usage scenarios, achieving more accurate aging test results.

CN118191583BActive Publication Date: 2025-02-07HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211599619.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2025-02-07
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

The traditional linear motor aging test method cannot fully cover the use scenarios of linear motors, resulting in inaccurate test results.

Method used

Linear motor vibration is controlled through different driving methods, and test parameters are generated to simulate the vibration situation in different usage scenarios. Specific methods include using a variety of driving methods (such as a general vibration interface, self-developed vibration interface and 4D vibration interface) to generate test parameters, and controlling the output voltage of the vibration chip according to the target driving method, so that the linear motor vibrates in the manner indicated by the test parameters.

Benefits of technology

This method covers a wider range of test scenarios, the results obtained are more realistic and more accurate, and can more effectively evaluate the aging of linear motors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118191583B_ABST
    Figure CN118191583B_ABST
Patent Text Reader

Abstract

The present application provides an aging test method and terminal equipment for a linear motor, and relates to the field of testing technology. The method drives the linear motor to perform continuous vibration, intermittent vibration or broadband vibration through a variety of driving modes, and can test the vibration conditions of the linear motor in different scenarios, covering more application scenarios, and the obtained test results are more realistic and more accurate. The method includes: based on the vibration parameters corresponding to the various driving modes, generating test parameters, the test parameters are vibration parameters corresponding to the target driving mode, and the target driving mode is any one of the multiple driving modes; according to the target driving mode, controlling the vibration chip to output voltage to the linear motor, so that the linear motor vibrates in the manner indicated by the test parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to an aging testing method and terminal equipment for a linear motor. Background Art

[0002] At present, mobile phones, tablets and other terminal devices generally use linear motors. In particular, some applications use extended vibration interfaces to achieve broadband vibration of linear motors, so as to provide users with rich vibration touch and achieve tactile interaction. For example, when a user uses a terminal device to play a game, the terminal device can vibrate when the user releases a skill, giving the user tactile feedback.

[0003] To ensure the stability and reliability of linear motors, manufacturers need to perform aging tests on linear motors. Aging testing refers to the process of simulating the various factors involved in the actual use of the product to strengthen the corresponding conditions of the product. However, traditional aging tests usually control the continuous or intermittent vibration of the linear motor, which cannot fully cover the use scenarios of the linear motor, resulting in incomplete testing and inaccurate test results. Summary of the invention

[0004] The embodiments of the present application provide an aging test method and terminal device for a linear motor, which can control the vibration of the linear motor in different driving modes to test the vibration conditions of the linear motor in different usage scenarios.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In the first aspect, the present application provides an aging test method for a linear motor, which is applied to a terminal device, wherein the terminal device includes a vibration chip and a linear motor, and the method includes: generating test parameters based on vibration parameters corresponding to a plurality of driving modes, wherein the test parameters are vibration parameters corresponding to a target driving mode, wherein the plurality of driving modes are used to drive the linear motor to vibrate continuously, intermittently, or with a wide frequency, and the target driving mode is any one of the plurality of driving modes; and controlling the vibration chip to output a voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in the manner indicated by the test parameters. It can be understood that since a plurality of driving modes can drive the linear motor to vibrate continuously, intermittently, or with a wide frequency, the vibration conditions of the linear motor in different scenarios can be tested, that is, the test scenarios covered by the present application are wider, so that the test results obtained are more realistic and more accurate.

[0007] In one embodiment provided in the first aspect, the test parameter may include a waveform name; in this case, the vibration chip is controlled to output a voltage to the linear motor according to the target drive mode so that the linear motor vibrates in the manner indicated by the test parameter, further comprising: obtaining first waveform data from the waveform description information according to the waveform name, the waveform description information including the names of multiple vibration waveforms and corresponding waveform data, the waveform data including the identifiers of one or more basic vibration waveforms and the corresponding vibration duration; generating configuration parameters based on the first waveform data, the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple times; controlling the vibration chip output voltage based on the configuration parameters so that the linear motor vibrates in the manner indicated by the test parameter. That is, the terminal device can determine the vibration waveform by the waveform name, and control the linear motor to vibrate according to the vibration waveform.

[0008] In one embodiment provided in the first aspect, the test parameter includes a waveform file identifier; in this case, the vibration chip is controlled to output a voltage to the linear motor according to the target drive mode so that the linear motor vibrates in the manner indicated by the test parameter, further comprising: reading a waveform description file corresponding to the waveform file identifier in a plurality of waveform description files to obtain first waveform data; wherein each waveform description file includes waveform data, and the waveform data includes vibration intensity, vibration frequency, vibration type and relative time; generating configuration parameters based on the first waveform data, the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple times; and controlling the vibration chip output voltage based on the configuration parameters so that the linear motor vibrates in the manner indicated by the test parameter. In other words, the terminal device can also determine the vibration waveform through the waveform file identifier and control the linear motor to vibrate according to the vibration waveform.

[0009] In an implementation manner provided in the first aspect, the waveform file identifier includes a file name and a storage path.

[0010] In one embodiment provided in the first aspect, the test parameters include vibration duration and sleep duration; in this case, the vibration chip is controlled to output voltage to the linear motor according to the target driving mode so that the linear motor vibrates in a manner indicated by the test parameters, further including: controlling the vibration chip output voltage based on the vibration duration and the sleep duration so that the linear motor vibrates in a manner indicated by the test parameters.

[0011] In an implementation manner provided in the first aspect, the vibration parameters corresponding to the multiple driving modes include the vibration parameters required for each driving mode and the value range of the vibration parameters; based on the vibration parameters corresponding to the multiple driving modes, generating test parameters further includes: determining a value from the value range of the vibration parameters required by the target driving mode as the test parameter. The terminal device can randomly use the numerical value within the value range as the test parameter. For example, a certain driving mode requires two vibration parameters, and the two vibration parameters respectively include n values. Then, n*n groups of test parameters can be obtained by combining these two vibration parameters. In this way, a large number of different test parameters can be obtained to simulate a large number of application scenarios, and compared with the method of pre-generating a large number of test parameters, it will not take up more storage space.

[0012] In an implementation manner provided in the first aspect, the vibration parameters corresponding to the multiple driving modes include multiple groups of vibration parameters, each group of vibration parameters corresponds to one driving mode; based on the vibration parameters corresponding to the multiple driving modes, generating test parameters further includes: selecting one group of vibration parameters from the multiple groups of vibration parameters as test parameters. That is, the user generates multiple groups of vibration parameters for each driving mode in advance, and selects one group of test parameters from them when testing is required. This method of obtaining test parameters is more convenient and quick.

[0013] In an implementation manner provided in the first aspect, the method further includes: receiving a first operation for triggering a test event; generating a test parameter based on vibration parameters corresponding to a plurality of driving modes, and further includes: generating a test parameter based on vibration parameters corresponding to a plurality of driving modes in response to the first operation. In other words, the test event can be triggered by a user's operation.

[0014] In an implementation provided in the first aspect, the test parameters are generated based on the vibration parameters corresponding to the multiple driving modes, further comprising: if the time interval is greater than or equal to the first waiting time, the test parameters are generated based on the vibration parameters corresponding to the multiple driving modes; wherein the time interval is the difference between the current moment and the end moment of the most recent vibration of the linear motor, and the first waiting time is the parameter carried in the test parameters for driving the linear motor to perform the most recent vibration. In other words, multiple vibrations will be performed during the test of the terminal device, wherein the time interval between two vibrations is not less than the waiting time (i.e., the first waiting time) determined during the last vibration, and a large number of vibrations are performed repeatedly to achieve an aging test of the linear motor.

[0015] In an embodiment provided in the first aspect, the terminal device includes a vibration service, a first interface, a second interface, a third interface and a vibration driver, and the test parameters include vibration duration and sleep duration; the vibration chip is controlled to output voltage to the linear motor according to the target drive mode, so that the linear motor vibrates in a manner indicated by the test parameters, further including: the vibration service sends the test parameters to the first interface; the first interface sends the test parameters to the vibration driver; the vibration driver writes the test parameters into the vibration chip; in response to the written test parameters, the vibration chip outputs voltage to the linear motor, so that the linear motor vibrates in a manner indicated by the test parameters.

[0016] In an embodiment provided in the first aspect, the terminal device includes a vibration service, a first interface, a second interface, a third interface and a vibration driver, and the test parameters include a waveform name; the vibration chip is controlled to output a voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in a manner indicated by the test parameters, further including: the vibration service sends the test parameters to the second interface; the second interface obtains the first waveform data from the waveform description information according to the waveform name, the waveform description information includes the names of multiple vibration waveforms and the corresponding waveform data, the waveform data includes the identifiers of one or more basic vibration waveforms and the corresponding vibration duration; the second interface sends the first waveform data to the vibration driver; the vibration driver generates configuration parameters based on the first waveform data, the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple times; the vibration driver writes the configuration parameters to the vibration chip; in response to the written configuration parameters, the vibration chip outputs a voltage to the linear motor, so that the linear motor vibrates in a manner indicated by the test parameters.

[0017] In an embodiment provided in the first aspect, the terminal device includes a vibration service, a first interface, a second interface, a third interface and a vibration driver, the test parameters include a waveform file identifier, and the vibration chip is controlled to output a voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in a manner indicated by the test parameters, further including: the vibration service sends the test parameters to the third interface; the third interface reads a waveform description file corresponding to the waveform file identifier in a plurality of waveform description files to obtain first waveform data; wherein each waveform description file includes waveform data, and the waveform data includes vibration intensity, vibration frequency, vibration type and relative time; the third interface sends the first waveform data to the vibration driver; the vibration driver generates configuration parameters based on the first waveform data, and the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple times; the vibration driver writes the configuration parameters to the vibration chip; in response to the written configuration parameters, the vibration chip outputs a voltage to the linear motor, so that the linear motor vibrates in a manner indicated by the test parameters.

[0018] In an implementation provided in the first aspect, the terminal device also includes a first application; based on vibration parameters corresponding to multiple driving modes, generating test parameters, further includes: the first application generates test parameters based on vibration parameters corresponding to multiple driving modes; the first application sends the test parameters to the vibration service.

[0019] In a second aspect, the present application provides a chip system, which includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by lines. The above chip system can be applied to a terminal device including a communication module and a memory. The interface circuit is used to receive a signal from the memory of the terminal device and send the received signal to the processor, where the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the terminal device can execute the method described in the first aspect and any possible design thereof.

[0020] In a third aspect, the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on a terminal device (such as a mobile phone), the terminal device executes the method described in the first aspect and any possible design thereof.

[0021] In a fourth aspect, the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method described in the first aspect and any possible design thereof.

[0022] In a fifth aspect, the present application provides a terminal device, comprising: a memory and one or more processors; the memory is coupled to the processor; wherein the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the terminal device executes the method described in the first aspect and any possible design method thereof.

[0023] Among them, the technical effects brought about by any design method in the fourth to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A frequency sweep characteristic curve diagram of a linear motor provided in an embodiment of the present application;

[0025] Figure 2 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0026] Figure 3 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application;

[0027] Figure 4 A schematic diagram of interaction between software modules provided in an embodiment of the present application;

[0028] Figure 5 An interface diagram of a group of terminal devices provided in an embodiment of the present application;

[0029] Figure 6 A schematic diagram of a linear motor aging test method provided in an embodiment of the present application Figure 1 ;

[0030] Figure 7 A schematic diagram of a vibration waveform provided in an embodiment of the present application;

[0031] Figure 8 A schematic diagram of a linear motor aging test method provided in an embodiment of the present application Figure 2 ;

[0032] Fig. 9 A schematic diagram of a basic vibration waveform provided in an embodiment of the present application;

[0033] Fig.10 A schematic diagram of another vibration waveform provided in an embodiment of the present application;

[0034] Fig.11 A schematic diagram of a linear motor aging test method provided in an embodiment of the present application Figure 3 ;

[0035] Fig.12 A schematic diagram of another vibration waveform provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0037] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given.

[0038] Nonlinear motors, also known as rotor motors, can include iron core motors and flat motors. They generate vibrations by rotating the eccentric mass block (also called the rotor) on the shaft when the shaft is powered.

[0039] A linear motor is a mechanism that generates a changing electromagnetic field through a pulse voltage signal, and the changing electromagnetic field drives the magnet to drive the mass block to perform periodic motion. The vibration intensity of the linear motor will be different if the frequency and amplitude of the pulse voltage signal are different.

[0040] When using a linear motor to simulate the touch of the real world, there are four parameters that mainly affect the user experience, including: resonant frequency (F0), vibration bandwidth, vibration amount and response time.

[0041] Resonant frequency (F0), also called natural frequency, refers to the frequency point at which a linear motor can resonate. Figure 1 As shown, the device can force the linear motor to vibrate near the resonant frequency (F0) with a relatively low driving voltage and achieve a large vibration amplitude.

[0042] Vibration bandwidth refers to the range of the motor's vibration frequency. The vibration bandwidth directly determines the richness and layering of the tactile feedback output to the user, and also determines the space for content and system equipment vendors to improve the user experience. Among them, the larger the vibration bandwidth, the richer the vibration modes supported by the linear motor, and the wider the coverage of interactive scenarios.

[0043] The vibration amount can also be called amplitude or vibration intensity. Under the premise that other parameters are equivalent, the larger the vibration amount, the stronger the vibration feeling. It and the resonant frequency together determine the user's subjective perception of the strength of the touch.

[0044] Response time refers to the time it takes for the terminal device to receive a vibration event and for the motor to start vibrating. Response time directly determines the delay and lag in the user's tactile interaction experience. For example, the sensitivity and crispness of the gun vibration that gamers usually talk about is affected by the response speed.

[0045] In the prior art, manufacturers use traditional aging test methods for linear motors. The traditional aging test method mainly controls the motor to vibrate continuously or intermittently to test the life of the motor. However, this aging test method is more suitable for the use scenarios of nonlinear motors and cannot fully cover the use scenarios of linear motors, especially the scenarios where linear motors require broadband vibration, resulting in incomplete testing of linear motors and inaccurate test results.

[0046] The present application provides an aging test method for a linear motor, which is applied to a terminal device including a linear motor. The method can generate test parameters based on vibration parameters corresponding to a plurality of driving modes, and control the vibration chip to output voltage to the linear motor according to the driving mode corresponding to the test parameter, so that the linear motor vibrates in the manner indicated by the test parameter. Since a plurality of driving modes can drive the linear motor to vibrate continuously, intermittently or with a wide frequency, the vibration conditions of the linear motor in different scenarios can be tested, that is to say, the present application covers a wider range of test scenarios, so that the test results obtained are more in line with reality and more accurate.

[0047] It should be noted that the terminal device described in this embodiment may be a mobile phone, a tablet computer, a personal communication service (PCS) phone, a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc., without specific limitation herein.

[0048] Figure 2 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 2 As shown, the terminal device may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, a subscriber identification module (SIM) card interface 295 and a vibration chip 296, etc.

[0049] Among them, the processor 210 may include one or more processing units, for example: the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. The processor 210 can be the nerve center and command center of the terminal device. The processor 210 can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0050] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 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 210, and thus improves the efficiency of the system.

[0051] In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0052] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0053] The internal memory 221 may be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the terminal device by running the instructions stored in the internal memory 221. For example, in an embodiment of the present application, the processor 210 may execute instructions stored in the internal memory 221, and the internal memory 221 may include a program storage area and a data storage area.

[0054] 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.), a configuration file of the motor 291, etc. The data storage area may store data created during the use of the terminal device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 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.

[0055] The charging management module 240 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 240 charges the battery 242, it can also power the terminal device through the power management module 241.

[0056] The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, and the wireless communication module 260. In some embodiments, the power management module 241 and the charging management module 240 can also be set in the same device.

[0057] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor and baseband processor, etc. In some embodiments, antenna 1 of the terminal device is coupled with mobile communication module 250, and antenna 2 is coupled with wireless communication module 260, so that the terminal device can communicate with the network and other devices through wireless communication technology.

[0058] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the 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.

[0059] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to terminal devices. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

[0060] The mobile communication module 250 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 can be set in the same device as at least some modules of the processor 210.

[0061] The wireless communication module 260 can provide wireless communication solutions including WLAN (such as (wirelessfidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), nearfield communication technology (nearfield communication, NFC), infrared technology (infrared, IR), etc. applied to the terminal device.

[0062] The wireless communication module 260 may be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 260 may also receive signals to be sent from the processor 210, modulate the frequencies of the signals, amplify the signals, and convert the signals into electromagnetic waves for radiation via the antenna 2.

[0063] The terminal device can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D, and the application processor.

[0064] The sensor module 280 may include sensors such as a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor. The terminal device may collect various data through the sensor module 280.

[0065] The terminal device implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.

[0066] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel.

[0067] The terminal device can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor. ISP is used to process the data fed back by camera 293. Camera 293 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 293, where N is a positive integer greater than 1.

[0068] The button 290 includes a power button, a volume button, etc. The button 290 can be a mechanical button. It can also be a touch button. The vibration chip 295 can output a driving voltage to the motor 291, and the motor 291 can vibrate under the action of the driving voltage. The vibration can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The motor 291 is a linear motor. The indicator 292 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 295 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 295, or pulled out from the SIM card interface 295 to achieve contact and separation with the terminal device. The terminal device can support 1 or N SIM card interfaces, N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.

[0069] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the terminal device. In other embodiments, the terminal device may also include more or fewer modules than those provided in the above embodiment, and the modules may also adopt different interface connection methods in the above embodiment, or a combination of multiple interface connection methods.

[0070] The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the layered architecture of the Android system as an example to exemplify the software structure of the terminal device.

[0071] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through interfaces. In some embodiments, the Android system may include an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, a hardware abstraction layer (HAL) and a kernel layer. It should be noted that the embodiments of the present application are illustrated by taking the Android system as an example. In other operating systems (such as Hongmeng system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the solutions of the present application can also be implemented.

[0072] The application layer may include a series of application packages. Figure 3 As shown, the application package may include camera application, gallery, calendar, call, map, navigation, WLAN, settings, music, lock screen application, short message and other applications. Of course, the application layer may also include other application packages, such as payment application, shopping application, banking application, chat application or financial management application and other third-party applications, which are not limited in this application.

[0073] The application framework layer provides an application programming interface (API) and a programming framework for the application programs of the application layer. The application framework layer includes some predefined functions. For example, it may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, a vibration service, etc., and the embodiment of the present application does not impose any restrictions on this. The vibration service is used to provide services related to vibration support.

[0074] The system library can include multiple functional modules, such as surface manager, media libraries, OpenGL for embedded systems (OpenGLES), Skia graphics library (SGL), etc.

[0075] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0076] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats.

[0077] OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0078] SGL is a graphics engine for 2D graphics.

[0079] Android runtime includes core library and virtual machine. Android runtime is responsible for scheduling and management of Android system. The core library consists of two parts: one is the function that Java language needs to call, and the other is the core library of Android. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0080] The HAL layer is an encapsulation of the Linux kernel driver, providing an interface to the upper layer and shielding the implementation details of the underlying hardware.

[0081] The HAL layer may include a vibration HAL (vibrator HAL), a camera HAL (camera HAL), and the like.

[0082] Among them, the vibration HAL may include a general vibration interface (also called the first interface), a self-developed vibration interface (also called the second interface) and a 4D vibration interface (also called the third interface). The general vibration interface, the self-developed vibration interface and the 4D vibration interface can all interact with the vibration drive of the kernel layer. The difference is that the three vibration interfaces can achieve different types of vibrations. For details, please refer to the following text and will not be repeated here.

[0083] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, audio driver, camera driver, vibration driver, etc. Among them, the vibration driver is a program that allows high-level computer software to interact with hardware, that is, a set of programs that drive the motor to work.

[0084] The hardware layer includes memory, vibration chip and motor, etc. Among them, the vibration chip is used to output driving voltage to the motor to drive the motor to vibrate. The motor is used to vibrate to give the user a vibration feeling.

[0085] The following describes the software modules and the interactions between the modules involved in the linear motor aging test method provided in the embodiment of the present application. Figure 4As shown, the first application in the application layer can interact with the vibration service in the application framework layer by calling a preset application programming interface (API) interface, and the vibration service can interact with the vibration HAL in the HAL layer. The vibration HAL may include a general vibration interface, a self-developed vibration interface, and a 4D vibration interface. Specifically, the vibration service can interact with the vibration driver of the kernel layer through a general vibration interface, a self-developed vibration interface, or a 4D vibration interface. The vibration driver can configure the parameters of the vibration chip in the hardware layer so that the vibration chip outputs a voltage to drive the linear motor to vibrate.

[0086] The aging test method of the linear motor provided by the present application is described below with reference to the accompanying drawings.

[0087] The terminal device may receive a first operation for triggering a test event, and in response to the first operation, the terminal device performs an aging test on the linear motor. In this embodiment, the terminal device may be installed with a first application for performing an aging test on the linear motor. Optionally, the first application may be an application visible to the user. For example, Figure 5 As shown in FIG. 5( a ), a terminal device (such as a mobile phone) may display an interface 501. The interface 501 may also be referred to as a main interface or a home interface. The interface 501 may include an icon 501a of a test application (i.e., a first application). The terminal device may receive an operation of the user on the icon 501a, and in response to the operation, Figure 5 As shown in (b) in the figure, the terminal device displays the interface 502 of the test application. The interface 502 includes one or more test items, and the one or more test items may include a linear motor aging test 502a, a linear motor vibration test, a linear motor transient response test, etc. It should be noted that the one or more test items may also include test items such as recovery test, safety test, stress test, or only include the linear motor aging test. In other words, the first application can be an application that is only used to perform a linear motor aging test, or it can be an application that can perform multiple tests, and no specific restrictions are made here. If the user terminal device wishes to perform an aging test on the linear motor, the linear motor aging test 502a can be clicked. The terminal device can receive the user's operation on the linear motor aging test 502a, and in response, such as Figure 5 As shown in (c) in FIG. 5 , the terminal device may display an interface 503. The interface 503 may include a control 503a for starting a test. The terminal device may receive an operation of the user on the control 503a for starting a test. In response to the operation, the terminal device performs an aging test on the linear motor. During the test, the terminal device may vibrate in different ways. It can be understood that in the above scenario, the user's operation on the control 503a for starting a test is a first operation for triggering a test event.

[0088] It should be noted that Figure 5 The scenario shown is for illustration only. In other embodiments, the first application may be an application that is invisible to the user, that is, the interface 501 may not include the test application icon 501a. In this case, the user may enter preset characters (e.g., *#12345#) through the dialing interface. The terminal device may receive the user's input of the preset characters, and in response to the operation, the terminal device may display the interface 502 so that the user can dial the number according to the input of the preset characters. Figure 5 (b) and Figure 5 The process shown in (c) initiates a first operation to cause the terminal device to perform an aging test on the linear motor.

[0089] In another optional implementation, in response to receiving the user input operation of preset characters, the terminal device can directly run the first application to perform an aging test on the linear motor without the user having to perform related operations on the interface. In this scenario, the user input operation of the preset characters is a first operation for triggering a test event.

[0090] In an optional embodiment, in response to receiving the first operation, the terminal device generates a test parameter, and based on the test parameter, controls the vibration chip to output a driving voltage to the linear motor so that the linear motor vibrates in a manner indicated by the test parameter.

[0091] The test parameters are vibration parameters used by the terminal device during the test process. The vibration parameters can be used to indicate the vibration mode of the linear motor. In this embodiment, the terminal device may adopt different vibration parameters for different driving modes. In this embodiment, based on the different vibration interfaces used in the process of controlling the vibration of the linear motor, the driving modes may include three types, namely: a driving mode that uses a general vibration interface to realize vibration, a driving mode that uses a self-developed vibration interface to realize vibration, and a driving mode that uses a 4D vibration interface to realize vibration. The implementation logic of different driving modes is not the same. The following text will describe in detail how to use different driving modes to realize vibration. For details, see Figure 6-Figure 12 And related descriptions are not described here.

[0092] In this embodiment, the universal vibration interface may also be referred to as the Google vibration interface or the standard interface, which can be used to achieve continuous vibration or intermittent vibration. For the driving method using the universal vibration interface to achieve vibration, the vibration parameters used may include the vibration duration, sleep duration, and waiting duration required for the linear motor to perform continuous vibration or intermittent vibration. The vibration duration refers to the duration during which the linear motor is in a vibrating state during a vibration process, the sleep duration refers to the duration during which the linear motor is in a static state during a vibration process, and the waiting duration refers to the duration between two vibration processes.

[0093] The self-developed vibration interface may also be referred to as a native vibration interface, which is usually a vibration interface developed by the equipment manufacturer itself, and can be used to implement the vibration mode customized by the equipment manufacturer. For the driving method of using the self-developed vibration interface to implement vibration, the vibration parameters adopted may include the waveform name and the waiting time. In this embodiment, waveform description information is stored in the terminal device, and the waveform description information includes the names of multiple vibration waveforms and corresponding waveform data, wherein each waveform data is used to indicate the corresponding vibration waveform. In this way, the vibration mode of the linear motor can be determined according to the waveform name. In an optional embodiment, the waveform description information can be recorded in the format of an extensible markup language (XML) file.

[0094] The 4D vibration interface may be a vibration interface jointly developed by multiple third-party application manufacturers, and may be used to implement a vibration mode customized by a third-party application manufacturer. For a driving mode that uses the 4D vibration interface to implement vibration, the vibration parameters used may include a waveform file identifier and a waiting time. The waveform file identifier is used for the terminal device to quickly find a waveform description file to determine the vibration mode of the linear motor.

[0095] In this embodiment, the terminal device also stores a plurality of waveform description files, one waveform description file is used to describe a vibration waveform, such as the vibration intensity, vibration frequency, vibration type, and relative time of the vibration waveform, etc. The vibration type may include continuous vibration, transient vibration, or broadband vibration.

[0096] Considering that the multiple waveform description files are provided by multiple third parties, and multiple waveform description files may have the situation of duplicate names, the terminal device can store the waveform description files provided by different third parties in different paths, so that the waveform description files can be distinguished by the storage path and the file name. In this case, the waveform file identification includes the storage path and the file name. Optionally, the terminal device can also assign different file IDs to different waveform description files so as to distinguish the waveform description files by the file ID. In this case, the waveform file identification includes the file ID.

[0097] It should be noted that the above-mentioned waveform file identifier can also be other, which is not specifically limited here. In addition, the name of the above-mentioned vibration interface and the vibration mode that the vibration interface can realize are only examples, and the name of the vibration interface can also be other, and the vibration mode realized can also be richer, which is not specifically limited here.

[0098] In an optional implementation, the terminal device generating the test parameter further includes: the terminal device generating the test parameter based on the configuration information, and the test parameter corresponds to a target driving mode among the multiple driving modes.

[0099] Among them, the target driving mode is any one of the three driving modes: a driving mode of realizing vibration using a general vibration interface, a driving mode of realizing vibration using a self-developed vibration interface, and a driving mode of realizing vibration using a 4D vibration interface.

[0100] Optionally, the terminal device may use the above three driving modes as target driving modes in a preset order. For example, the terminal device may use a driving mode that uses a universal vibration interface to realize vibration, a driving mode that uses a self-developed vibration interface to realize vibration, and a driving mode that uses a 4D vibration interface to realize vibration as target driving modes in sequence.

[0101] Optionally, the terminal device may randomly select any one of the three driving modes as the target driving mode. In an optional implementation, the three driving modes have the same weight, in which case the probability of each driving mode being selected as the target driving mode is the same. In an optional implementation, the three driving modes have different weights, for example, the weight of one or two driving modes may be set larger to increase the probability of the driving mode being selected as the target driving mode.

[0102] The terminal device stores configuration information, which includes vibration parameters corresponding to a plurality of driving modes. Specifically, the configuration information may include all possible values ​​(also referred to as value ranges) of the vibration parameters required by different driving modes.

[0103] Exemplarily, the configuration information may include all possible values ​​of vibration parameters required for implementing a vibration driving mode using a universal vibration interface (as shown in Table 1).

[0104] Table 1

[0105] Vibration duration (milliseconds) Sleep duration (milliseconds) Waiting time (milliseconds) 0 0 10 1 1 20 2 2 30 …… …… …… 2500 5000 2000

[0106] According to Table 1, for the driving mode using the universal vibration interface to realize vibration, the required vibration parameters include vibration duration, sleep duration and waiting duration. The vibration duration can be any value from 0 to 2500ms; the sleep duration can be any value from 0 to 5000ms; and the waiting duration can be any value from 10 to 2000ms. It should be noted that Table 1 is only an example, and the values ​​of each parameter can be set as needed.

[0107] It should also be noted that there is no correlation between the various values ​​of the vibration duration, sleep duration and waiting duration, that is, when the vibration duration is 0, the sleep duration can be any value between 0 and 5000ms, and the waiting duration can also be any value between 10 and 2000ms.

[0108] Optionally, the configuration information shown in Table 1 may be recorded in the format of an XML file. Exemplarily, the XML file may include:

[0109]

[0110]

[0111] Among them, "NAME" is used to identify the type of vibration, for example, "XXXX_Native" is used to indicate the driving mode of vibration using the universal vibration interface; <unit> ms< / unit> " is used to indicate that the value unit is ms (milliseconds), and "ON" is used to list all possible values ​​of the vibration duration, such as " <value> 1< / value> " indicates that the vibration duration can be 1ms; "SLEEP" is used to list all possible values ​​of the sleep duration, such as " <value> 20000< / value> " indicates that the sleep time can be 20000ms; "WAIT" is used to list all possible values ​​of the waiting time, such as " <value> 20< / value> " indicates that the waiting time can be 20ms. It should be noted that the above XML file is only an example, and the XML file can also include more content than the above listed content, and the values ​​of "ON", "SLEEP" and "WAIT" can also be more.

[0112] In this embodiment, the configuration information may also include all possible values ​​of vibration parameters required for implementing the vibration driving mode using the self-developed vibration interface (as shown in Table 2).

[0113] Table 2

[0114] Waveform Name Waiting time (milliseconds) haptic.common.click (click) 0 haptic.common.long_press (long press) 10 haptic.common.click_up (click) 2300 …… ……

[0115] Among them, according to Table 2, the vibration driving mode using the universal vibration interface to realize the vibration, the vibration parameters required may include the waveform name and the waiting time. Among them, the value of the waveform name can be click, long press, click up, etc. The value of the waiting time can be 0ms, 10ms or 2300ms, etc. It should be noted that Table 2 is only an example, and the possible values ​​of each parameter can also be more. Similarly, there is no correlation between the various values ​​of the vibration waveform and the waiting time in Table 2.

[0116] Optionally, the configuration information shown in Table 2 may also be recorded in the format of an XML file. The XML file may include:

[0117]

[0118] in," <name> haptic_ver1< / name> "haptic_ver1" in it is used to identify the driving mode of vibration using the self-developed vibration interface; "TYPE" is used to list all possible values ​​of the waveform name, such as haptic.common.click, haptic.common.long_press, haptic.common.click_up, etc.; "WAIT" is used to list all possible values ​​of the waiting time, such as 50ms, 500ms, 50000ms, etc. It should be noted that the above XML file is only an example, and the XML file can also include more content than the above list, and the possible values ​​of each parameter can also be more.

[0119] In this embodiment, the configuration information may also include all possible values ​​of vibration parameters required for implementing the vibration driving mode using the 4D vibration interface (as shown in Table 3).

[0120] Table 3

[0121] Storage path Waiting time (milliseconds) / app1 / profile 100 / app2 / profile 10000 …… ……

[0122] According to Table 3, for the driving method using the 4D vibration interface to realize vibration, the vibration parameters required include the storage path and the waiting time. Among them, the storage path of the waveform description file may include " / app1 / profile" or " / app2 / profile". The waiting time may be 100ms or 10000ms, etc. It should be noted that Table 3 is only an example, and the actual values ​​of each parameter can be set as needed. It should be noted that the vibration parameters required for the driving method using the 4D vibration interface to realize vibration also include the file name. After determining the storage path, the terminal device can select a waveform description file from the waveform description files under the storage path, and use the file name of the selected waveform description file as the vibration parameter.

[0123] Optionally, the configuration information shown in Table 3 may also be recorded in the format of an XML file. The XML file may include:

[0124]

[0125] in," <name> haptic_ver2< / name>"haptic_ver2" in it is used to identify the driving mode of realizing vibration using 4D vibration interface; "PATH" is used to list all possible values ​​of storage path, such as " / app1 / profile", "app2 / profile" / ; "WAIT" is used to list all possible values ​​of waiting time, such as 50ms, 100ms or 10000ms. It should be noted that the above XML file is only an example, and the XML file may also include more content than the above list, the name of each parameter may be other, and the value of each parameter may also be more.

[0126] The terminal device may select a set of values ​​as test parameters from all possible values ​​of vibration parameters required by the target driving mode. In this embodiment, if the target driving mode is a driving mode that uses a universal vibration interface to realize vibration, the terminal device may select a value from all possible values ​​of vibration duration, select a value from all possible values ​​of sleep duration, and select a value from all possible values ​​of waiting duration to generate test parameters. For example, the test parameters may include 20ms (vibration duration), 30ms (sleep duration), and 200ms (waiting duration).

[0127] In this embodiment, if the target driving mode is to use a self-developed vibration interface to realize vibration, the terminal device can select a value from all possible values ​​of the waveform name and a value from all possible values ​​of the waiting time to generate a test parameter. For example, the test parameters may include: haptic.common.click (waveform name) and 1500ms (sleep time).

[0128] In this embodiment, if the target driving mode is a driving mode that uses a 4D vibration interface to realize vibration, the terminal device can select a value from all possible values ​​of the storage path, select a waveform description file from all waveform description files under the storage path, and select a value from all possible values ​​of the waiting time to generate a test parameter. For example, the test parameters may include: / app1 / profile (storage path), shoot.he (file name), and 2500ms (waiting time).

[0129] Among them, similar to determining the target driving mode, the terminal device can traverse all possible values ​​of each vibration parameter, and use the traversed values ​​as test parameters in turn; or, the terminal device randomly selects a value from all possible values ​​of each vibration parameter as a test parameter, where different values ​​have the same or different weights.

[0130] After the test parameters are generated, the terminal device controls the vibration chip to output voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in the manner indicated by the test parameters.

[0131] Combine the following Figure 3 The software architecture shown in FIG. 1 illustrates the aging test method for a linear motor provided in this embodiment. Figure 6 FIG. 1 is a flow chart of a linear motor aging test method provided in an embodiment of the present application. Figure 1 This method can be applied to Figure 2 The terminal device shown in the figure. The aging test method of the linear motor may include: S601-S607.

[0132] S601: In response to receiving a first operation, a first application generates a test parameter based on vibration parameters corresponding to a plurality of driving modes.

[0133] The first operation is used to trigger a test event. Figure 5 Alternatively, the first operation may be an operation in which the user inputs preset characters in the dialing interface.

[0134] The test parameters are used to describe the vibration mode of the linear motor. The description of the test parameters and the process of generating the test parameters can be found in the previous text and will not be repeated here.

[0135] S602: The first application sends a test parameter to the vibration service.

[0136] S603, the vibration service determines the driving mode according to the test parameters.

[0137] Specifically, if the vibration service determines that the test parameters include vibration duration, sleep duration and waiting time, the vibration driving method using the general vibration interface can be adopted; if the vibration service determines that the test parameters include waveform name and waiting time, the vibration driving method using the self-developed vibration interface can be adopted; if the vibration service determines that the test parameters include waveform file identifier and waiting time, the vibration driving method using the 4D vibration interface can be adopted.

[0138] The following first takes the driving mode of realizing vibration by using the universal vibration interface corresponding to the test parameters as an example for description. After S603, the following further includes: S604 to S607.

[0139] S604: The vibration service sends test parameters to the universal vibration interface.

[0140] The test parameters include vibration duration, sleep duration and waiting duration. For example, the test parameters indicate that the vibration duration is 10ms, the sleep duration is 15ms, and the waiting duration is 100ms.

[0141] S605: The universal vibration interface sends test parameters to the vibration driver.

[0142] S606, the vibration driver writes the test parameters into the vibration chip.

[0143] S607, the vibration chip outputs a driving voltage to the linear motor, so that the linear motor vibrates in a manner indicated by the test parameters.

[0144] Still taking the vibration duration as 10ms, the sleep duration as 15ms, and the waiting duration as 100ms as an example, the test parameters can be used to control the linear motor according to Figure 7 The linear motor vibrates according to the waveform shown. That is, the linear motor vibrates for 10ms first, and then stops vibrating for 15ms. Then, starting from the end moment when the linear motor stops vibrating for 15ms, the linear motor can vibrate again 100ms later, and the vibration mode of the next vibration can be different from the vibration mode of this vibration.

[0145] The following is an example of how to use the self-developed vibration interface to achieve vibration driving mode corresponding to the test parameters. Figure 8 A schematic diagram of a linear motor aging test method provided in this application Figure 2 .like Figure 8 As shown, after S603, it also includes: S608~S613.

[0146] S608, the vibration service sends test parameters to the self-developed vibration interface.

[0147] The test parameters may include a waveform name and a waiting time.

[0148] S609: The self-developed vibration interface searches the waveform description information based on the waveform name to obtain the first waveform data.

[0149] Among them, the waveform description information includes the waveform names of multiple vibration waveforms and the corresponding waveform data. The waveform data is used to describe the vibration waveform of the linear motor. Optionally, the waveform data may include the serial numbers of one or more basic vibration waveforms and the vibration duration corresponding to one or more basic vibration waveforms. Among them, the basic vibration waveform may refer to the vibration waveform designed by the equipment manufacturer. By arranging and combining the basic vibration waveforms and vibration durations, a rich vibration waveform can be obtained to provide users with rich tactile feedback.

[0150] In this embodiment, a basic waveform library is stored in the terminal device, and the basic waveform library includes a plurality of basic vibration waveforms and corresponding serial numbers. Exemplarily, the corresponding relationship between the plurality of basic vibration waveforms and the serial numbers can be as follows: Fig. 9 It should be noted that the serial number can also be called an identifier, and the identifier can also be in other forms, which are not specifically limited here. Fig. 9 Only some basic vibration waveforms and corresponding serial numbers are shown. In fact, the basic waveform library may also include Fig. 9 More multiple basic vibration waveforms are shown.

[0151] In the present embodiment, the waveform data may be expressed in the form of: <Duration 1, basic vibration waveform 1, Duration 2, basic vibration waveform 2, ..., Duration n, basic vibration waveform n>. Its meaning is: vibrate with basic vibration waveform 1 for duration 1, vibrate with basic vibration waveform 2 for duration 2, ..., vibrate with basic vibration waveform n for duration n. It should be noted that the waveform data may also include a vibration mode (for example, including long vibration, short vibration) and vibration intensity, etc., and the expression form of the waveform data may be modified accordingly, for example, <Duration 1, vibration mode 1, vibration intensity 1, basic vibration waveform 1, Duration 2, vibration mode 2, vibration intensity 2, basic vibration waveform 2, ..., Duration n, vibration mode n, vibration intensity n, basic vibration waveform n>. It should be noted that the above-mentioned expression forms are only examples, and the expression forms of the waveform data shall be subject to all contents included in the waveform data, and no specific restrictions are made here.

[0152] Exemplarily, the waveform description information may be as shown in Table 4 below.

[0153] Table 4

[0154] Waveform Name Waveform data notice1 <10,02,200,04> notice2 <15,01,30,16> click up <15,10>

[0155] As shown in Table 4, the waveform data corresponding to the waveform name notice1 is <10,02,200,04>, which indicates that the linear motor first vibrates with the basic vibration waveform No. 02 for 10ms, and then vibrates with the basic vibration waveform No. 04 for 200ms; the waveform data corresponding to the waveform name notice2 is <15,01,30,16>, which indicates that the linear motor first vibrates with the basic vibration waveform No. 01 for 15ms, and then vibrates with the basic vibration waveform No. 16 for 30ms; the waveform data corresponding to the waveform name click up is <10,15>, which indicates that the linear motor vibrates with the basic vibration waveform No. 10 for 15ms.

[0156] It should be noted that, if a vibration waveform includes multiple basic vibration waveforms, the time interval between the multiple basic vibration waveforms may be a preset first value, or a waiting time length included in the test parameters, which is not specifically limited here.

[0157] S610: The self-developed vibration interface sends the first waveform data and the waiting time to the vibration driver.

[0158] S611, the vibration driver obtains configuration parameters based on the first waveform data.

[0159] The configuration parameters include the vibration amounts of the vibration waveform corresponding to the first waveform data at multiple moments, which are used to describe the change of the vibration amount of the linear motor over time during the vibration period. In this embodiment, the configuration parameters exist in a pulse code modulation (PCM) coding format.

[0160] Optionally, the terminal device pre-stores the correspondence between the serial numbers of each basic vibration waveform and the PCM code of the basic vibration waveform. The vibration drive can search for the corresponding PCM code based on the serial number of the basic vibration waveform carried by the first waveform data, and then adjust it in combination with the vibration duration carried by the first waveform data to obtain the configuration parameters.

[0161] S612, the vibration driver writes the configuration parameters into the vibration chip.

[0162] S613, the vibration chip outputs a driving voltage to the linear motor so that the linear motor vibrates in a manner indicated by the test parameters.

[0163] For example, the vibration parameters received by the self-developed vibration interface include the waveform name (for example, notice1) and the waiting time (for example, 135ms). In this way, the self-developed vibration interface can query the waveform data <10,02,200,04> in Table 4 according to notice1. Fig. 9 From the corresponding relationship shown in FIG. 1 , it can be seen that the vibration waveform corresponding to the waveform data can be shown as Fig.10 As shown. The linear motor vibrates with the basic vibration waveform No. 02 for 10ms, waits for 135ms, and then vibrates with the basic vibration waveform No. 04 for 200ms. In addition, after the offline motor vibrates with the basic vibration waveform No. 04 for 200ms, the linear motor can vibrate for the next time after 135ms, and the vibration mode of the next vibration can be different from the vibration mode of this vibration.

[0164] The following is an example of how to use the 4D vibration interface to achieve vibration driving. Fig.11 A schematic diagram of a linear motor aging test method provided in this application Figure 3 .like Fig.11 As shown, after S603, it also includes: S614~S619.

[0165] S614, the vibration service sends test parameters to the 4D vibration interface.

[0166] The test parameters include file name, storage path and waiting time.

[0167] S615, the 4D vibration interface reads a waveform description file indicated by the file name and the storage path from among the multiple waveform description files to obtain first waveform data.

[0168] As mentioned above, multiple waveform description files are stored in the terminal device. The 4D vibration interface can find the corresponding waveform description file according to the storage path and file name, and read the corresponding waveform description file to obtain the first waveform data. It should be noted that the waveform data in S165 is different from the waveform data in S609. The waveform data in S165 includes vibration intensity, vibration frequency, vibration type and relative time, etc. The relative time refers to the time difference between the starting time of the vibration waveform and the time when the linear motor starts to vibrate (T0).

[0169] S616, the 4D vibration interface sends the first waveform data and the waiting time to the vibration driver.

[0170] S617: The vibration driver obtains configuration parameters based on the first waveform data.

[0171] The vibration drive can determine the vibration waveform according to the first waveform data. For example, the vibration intensity can be 75, the vibration frequency can be 50 Hz, the vibration type can be transient vibration, and the relative time can be 0. Then the obtained vibration waveform can be as follows: Fig.12 After the vibration driver determines the vibration waveform, it can convert the vibration waveform into a PCM encoding format to obtain configuration parameters.

[0172] S618, the vibration driver writes the configuration parameters into the vibration chip.

[0173] S619, the vibration chip outputs a driving voltage to the linear motor so that the linear motor vibrates in a manner indicated by the test parameters.

[0174] In this way, the linear motor can be Fig.12 The waveform shown vibrates.

[0175] It should be noted that Figure 6 , Figure 8 and Fig.11 Only the process of the terminal device controlling the linear motor to vibrate once is shown. In the actual test process, after the terminal device controls the linear motor to vibrate once, the test parameters can be regenerated, and then the linear motor can be controlled to vibrate based on the regenerated test parameters to test the life of the linear motor.

[0176] In an optional embodiment, if the time interval is greater than or equal to the first waiting time, the terminal device can regenerate the test parameters based on the vibration parameters corresponding to the multiple driving modes. The time interval is the difference between the current moment and the end moment of the most recent vibration of the linear motor, and the first waiting time is the parameter carried in the test parameter for driving the linear motor to vibrate for the most recent time. For example, the linear motor ends the first vibration at 12:00, and the waiting time carried in the test parameter for driving the linear motor to vibrate for the first time is 200ms. The terminal device can regenerate the test parameters at 200ms after 12:00 to control the linear motor to vibrate again based on the regenerated test parameters. After repeating this process multiple times, the vibration of the linear motor in various application scenarios can be tested, and the aging of the linear motor can be determined.

[0177] In another optional implementation, the terminal device may generate multiple sets of test parameters at one time, or generate new test parameters at any time, and when the time interval is greater than the first waiting time, the vibration chip is controlled to output voltage to the linear motor based on the driving mode corresponding to the new test parameters. In other words, the time for generating the test parameters may not be limited, as long as the time interval between two vibrations is not less than the waiting time carried in the test parameters.

[0178] In summary, the aging test method for a linear motor provided in the present application can test the vibration conditions of a linear motor in different scenarios, covering a wider range of test scenarios, so that the test results obtained are more realistic and more accurate.

[0179] Some embodiments of the present application provide a terminal device, which may include: a memory and one or more processors. The memory is coupled to the processor. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the terminal device may perform various functions or steps performed by the terminal device in the above method embodiment. The structure of the terminal device can refer to Figure 2 The structure of the terminal device shown.

[0180] An embodiment of the present application also provides a motor, which can be used to realize vibration waveforms under various configuration parameters in the above embodiments, etc. A terminal device equipped with the motor can execute various functions or steps executed by the terminal device in the above method embodiments.

[0181] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned terminal device, the terminal device executes each function or step executed by the terminal device in the above-mentioned method embodiment.

[0182] The embodiment of the present application also provides a computer program product. When the computer program product is run on a terminal device, the terminal device is enabled to execute each function or step executed by the terminal device in the above method embodiment.

[0183] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0184] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0185] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0186] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0187] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0188] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A linear motor aging test method, characterized in that: Applied to a terminal device, the terminal device includes a vibration chip and a linear motor, and the method includes: Generate test parameters based on vibration parameters corresponding to multiple driving modes, where the test parameters are vibration parameters corresponding to a target driving mode, where the multiple driving modes are used to drive the linear motor to vibrate continuously, intermittently, or widely, and the target driving mode is any one of the multiple driving modes; The vibration chip is controlled to output a voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in a mode indicated by the test parameter.

2. The method according to claim 1, characterized in that The test parameters include waveform names; The step of controlling the vibration chip to output a voltage to the linear motor according to the target driving mode so that the linear motor vibrates in a mode indicated by the test parameter further includes: Obtaining first waveform data from waveform description information according to the waveform name, wherein the waveform description information includes names of multiple vibration waveforms and corresponding waveform data, and the waveform data includes identifiers of one or more basic vibration waveforms and corresponding vibration durations; generating configuration parameters based on the first waveform data, the configuration parameters being used to describe the vibration amounts of the vibration waveform determined according to the first waveform data at multiple moments; The output voltage of the vibration chip is controlled based on the configuration parameters so that the linear motor vibrates in a manner indicated by the test parameters.

3. The method according to claim 1, characterized in that: The test parameters include a waveform file identifier; The step of controlling the vibration chip to output a voltage to the linear motor according to the target driving mode so that the linear motor vibrates in a mode indicated by the test parameter further includes: Reading a waveform description file corresponding to the waveform file identifier in a plurality of waveform description files to obtain first waveform data; wherein each of the waveform description files includes waveform data, and the waveform data includes vibration intensity, vibration frequency, vibration type and relative time; generating configuration parameters based on the first waveform data, the configuration parameters being used to describe the vibration amounts of the vibration waveform determined according to the first waveform data at multiple moments; The output voltage of the vibration chip is controlled based on the configuration parameters so that the linear motor vibrates in a manner indicated by the test parameters.

4. The method according to claim 3, characterized in that The waveform file identifier includes a file name and a storage path.

5. The method according to claim 1, characterized in that The test parameters include vibration duration and sleep duration; The step of controlling the vibration chip to output a voltage to the linear motor according to the target driving mode so that the linear motor vibrates in a mode indicated by the test parameter further includes: The output voltage of the vibration chip is controlled based on the vibration duration and the sleep duration, so that the linear motor vibrates in a manner indicated by the test parameters.

6. The method according to any one of claims 1 to 5, characterized in that: The vibration parameters corresponding to the multiple driving modes include the vibration parameters required by each driving mode and the value range of the vibration parameters; The generating of the test parameters based on the vibration parameters corresponding to the multiple driving modes further includes: A value is determined from a value range of the vibration parameter required by the target driving mode as the test parameter.

7. The method according to any one of claims 1 to 5, characterized in that: The vibration parameters corresponding to the multiple driving modes include multiple groups of vibration parameters, each group of vibration parameters corresponds to one of the driving modes; The generating of the test parameters based on the vibration parameters corresponding to the multiple driving modes further includes: A set of vibration parameters is selected from the plurality of sets of vibration parameters as the test parameters.

8. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: receiving a first operation for triggering a test event; The generating of the test parameters based on the vibration parameters corresponding to the multiple driving modes further includes: In response to the first operation, the test parameters are generated based on vibration parameters corresponding to a plurality of driving modes.

9. The method according to any one of claims 1 to 5, characterized in that: The generating of the test parameters based on the vibration parameters corresponding to the multiple driving modes further includes: If the time interval is greater than or equal to the first waiting time, the test parameters are generated based on the vibration parameters corresponding to multiple driving modes; wherein the time interval is the difference between the current moment and the end moment of the most recent vibration of the linear motor, and the first waiting time is the parameter carried in the test parameters for driving the linear motor to perform the most recent vibration.

10. The method according to any one of claims 1 to 5, characterized in that: The terminal device includes a vibration service, a first interface, a second interface, a third interface and a vibration driver, and the test parameters include a vibration duration and a sleep duration; The step of controlling the vibration chip to output a voltage to the linear motor according to the target driving mode so that the linear motor vibrates in a mode indicated by the test parameter further includes: The vibration service sends the test parameters to the first interface; The first interface sends the test parameter to the vibration driver; The vibration driver writes the test parameters into the vibration chip; In response to the test parameters being written, the vibration chip outputs a voltage to the linear motor to cause the linear motor to vibrate in a manner indicated by the test parameters.

11. The method according to any one of claims 1 to 5, characterized in that: The terminal device includes a vibration service, a first interface, a second interface, a third interface and a vibration driver, and the test parameter includes a waveform name; The step of controlling the vibration chip to output a voltage to the linear motor according to the target driving mode so that the linear motor vibrates in a mode indicated by the test parameter further includes: The vibration service sends the test parameters to the second interface; The second interface obtains first waveform data by querying waveform description information according to the waveform name, wherein the waveform description information includes names of multiple vibration waveforms and corresponding waveform data, and the waveform data includes identifiers of one or more basic vibration waveforms and corresponding vibration durations; The second interface sends the first waveform data to the vibration driver; The vibration driver generates configuration parameters based on the first waveform data, wherein the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple moments; The vibration driver writes the configuration parameters into the vibration chip; In response to the configuration parameters being written, the vibration chip outputs a voltage to the linear motor to cause the linear motor to vibrate in a manner indicated by the test parameters.

12. The method according to any one of claims 1 to 5, characterized in that: The terminal device includes a vibration service, a first interface, a second interface, a third interface and a vibration driver, the test parameter includes a waveform file identifier, and the vibration chip is controlled to output a voltage to the linear motor according to the target drive mode so that the linear motor vibrates in a manner indicated by the test parameter, further comprising: The vibration service sends the test parameters to the third interface; The third interface reads a waveform description file corresponding to the waveform file identifier in a plurality of waveform description files to obtain first waveform data; wherein each of the waveform description files includes waveform data, and the waveform data includes vibration intensity, vibration frequency, vibration type and relative time; The third interface sends the first waveform data to the vibration driver; The vibration driver generates configuration parameters based on the first waveform data, wherein the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple moments; The vibration driver writes the configuration parameters into the vibration chip; In response to the configuration parameters being written, the vibration chip outputs a voltage to the linear motor to cause the linear motor to vibrate in a manner indicated by the test parameters.

13. The method according to claim 10, characterized in that The terminal device also includes a first application; the generating of test parameters based on vibration parameters corresponding to the multiple driving modes further includes: The first application generates the test parameters based on vibration parameters corresponding to multiple driving modes; The first application sends the test parameter to the vibration service.

14. A terminal device, characterized in that: The terminal device comprises: a memory and one or more processors; the memory is coupled to the processor; The memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the terminal device executes the method as described in any one of claims 1-13.

15. A computer-readable storage medium, characterized in that: including computer instructions; When the computer instructions are executed on a terminal device, the terminal device is caused to execute the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Linear motor test method and device, electronic equipment and medium

    CN114543976A

  • Vibration method and device, electronic equipment and readable storage medium

    CN114640742A