Vibration control method and electronic device
By adjusting vibration parameters based on usage status and battery information, the problem of inconsistent vibration feedback in foldable screen electronic devices under different states has been solved, improving user experience and device consistency.
Patent Information
- Application Number
- PCT/CN2025/070266
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-30
- Filing Date
- 2025-01-02
- Publication Date
- 2025-12-04
AI Technical Summary
The physical structure of foldable screen electronic devices differs between their folded and unfolded states, resulting in different vibration feedback and affecting the user experience.
By integrating the usage status and power information of electronic devices, vibration parameters are obtained, and vibration feedback is adaptively adjusted. This includes configuring gain flags and vibration waveforms, and using Hall sensors and power information to match vibration parameters, ensuring similar vibration feedback is provided under different conditions.
This improves the user experience, ensures consistent vibration feedback across different usage scenarios and battery levels, and reduces device noise issues.
Smart Images

Figure CN2025070266_04122025_PF_FP_ABST
Abstract
Description
Vibration control method and electronic device
[0001] The present application claims priority from the Chinese patent application No. 202410698141.9 filed on May 30, 2024, and entitled "Vibration control method and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of terminals, and in particular to a vibration control method and an electronic device. BACKGROUND
[0003] In electronic devices (such as mobile phones and the like), a motor is used to realize a vibration function, so that a user receives touch feedback when performing a touch operation on the electronic device, to confirm the operation situation; or the electronic device produces vibration when receiving an incoming call or a notification, to timely remind the user to pay attention.
[0004] Among them, with the development of terminal technology, more and more users use folding screen electronic devices. However, due to the physical structure difference of folding screen electronic devices in the folded state and the unfolded state, the vibration feedback brought to the user in the two use scenarios is different, which affects the user's use experience. SUMMARY
[0005] In order to solve the above technical problems, the present application provides a vibration control method and an electronic device. The technical scheme provided by the present application obtains motor vibration parameters by comprehensively considering the use state and power information of the electronic device, realizes adaptive adjustment of the vibration parameters, and improves the user's use experience.
[0006] In order to achieve the above technical purpose, the present application provides the following technical scheme:
[0007] In a first aspect, a vibration control method is provided, applied to a folding screen electronic device. The method comprises: obtaining a use state of the electronic device. Obtaining power information of the electronic device. According to the use state and the power information, obtaining a vibration parameter. Driving the motor to vibrate according to the vibration parameter.
[0008] In this way, the electronic device can obtain the corresponding vibration parameter according to the use state and the power information. By adjusting the vibration parameter, the vibration feedback is adaptively adjusted, thereby improving the user's use experience.
[0009] According to the first aspect, the vibration parameter includes a gain flag bit, and driving the motor to vibrate according to the vibration parameter includes: obtaining a gain corresponding to the gain flag bit. Obtaining a first vibration waveform. Correcting the first vibration waveform based on the gain through an audio codec chip to obtain a second vibration waveform. Driving the motor to vibrate according to the second vibration waveform.
[0010] According to a first aspect, or any possible implementation mode of the above first aspect, the first vibration waveform is acquired, including: acquiring the first vibration waveform output by the motor service through a first path of the audio codec chip, the first path corresponding to a gain, and the first vibration waveform being a default vibration waveform.
[0011] In some examples, the motor driving mode of the electronic device can include audio data driving. In this case, the audio data driving is a motor driving based on an underlying path selected by an audio service, and a vibration waveform is issued to the audio codec chip by a digital signal processor, wherein different underlying paths correspond to different gains. In this way, the audio codec chip issues the vibration waveform corrected by the gain to the motor, instructing the motor to vibrate according to the corrected waveform.
[0012] In this way, in the audio data driving scenario, the electronic device can acquire the required gain according to the use state and the power information, correct the default waveform according to the gain, and achieve adjustment of the vibration feedback.
[0013] According to the first aspect, or any possible implementation mode of the above first aspect, the vibration parameter is acquired according to the use state and the power information, including: matching a corresponding gain flag bit according to the use state and the power information.
[0014] In some examples, the electronic device is configured with vibration parameters corresponding to different use states and power information, such as gain flag bits.
[0015] In this way, by preconfiguring vibration parameters corresponding to different use states and power information in the electronic device, the efficiency of acquiring the vibration parameters is improved.
[0016] According to the first aspect, or any possible implementation mode of the above first aspect, the vibration parameter includes a third vibration waveform, and the motor is driven to vibrate according to the vibration parameter, including: acquiring the third vibration waveform output by the motor service through the motor chip. The motor is driven to vibrate according to the third vibration waveform through the motor chip.
[0017] In some examples, the motor driving mode of the electronic device can include chip driving. In this case, the motor driving is that the motor service issues vibration waveforms with different amplitudes to the motor chip via the motor driving, and the motor chip can instruct the motor to vibrate according to different vibration waveforms.
[0018] In this way, in the chip driving scenario, the electronic device can acquire the required motor vibration waveform according to the use state and the power information, and achieve adjustment of the vibration feedback according to the adjustment of the motor vibration waveform.
[0019] According to a first aspect, or any possible implementation mode of the above first aspect, the vibration parameter is obtained according to the use state and the power information, including: matching a corresponding third vibration waveform according to the use state and the power information.
[0020] In some examples, the electronic device is configured with vibration parameters corresponding to different use states and power information, such as vibration waveforms.
[0021] In this way, by pre-configuring vibration parameters corresponding to different use states and power information in the electronic device, the efficiency of obtaining vibration parameters is improved.
[0022] According to the first aspect, or any possible implementation mode of the above first aspect, the electronic device is configured with a Hall sensor, and the use state of the electronic device is obtained, including: obtaining a Hall parameter detected by the Hall sensor. The use state is obtained according to the Hall parameter.
[0023] In some examples, the Hall sensor reports the Hall parameter through an interrupt. For example, the use state of the electronic device changes, triggering the Hall sensor to report the Hall parameter. For example, after the use state of the electronic device changes from an unfolded state to a folded state, the Hall sensor reports the Hall parameter. Or, after the use state of the electronic device changes from a folded state to an unfolded state, the Hall sensor reports the Hall parameter.
[0024] Optionally, the electronic device is configured with one or more Hall sensors. Then, the electronic device can obtain the use state of the electronic device according to one or more sets of Hall parameters.
[0025] In this way, the electronic device can obtain the current use state of the electronic device through the Hall parameter reported by the Hall sensor.
[0026] According to the first aspect, or any possible implementation mode of the above first aspect, the vibration parameter is obtained according to the use state and the power information, including: obtaining a first voltage indicated by the power information. In a case where the first voltage is less than or equal to a voltage threshold, the electronic device is in a low power state. In a case where the first voltage is greater than the voltage threshold, the electronic device is in a high power state.
[0027] Optionally, the use state and the power information of the electronic device are combined, and the electronic device can be in four states: a high power unfolded state, a low power unfolded state, a high power folded state, and a low power folded state.
[0028] In this way, the electronic device can determine whether the electronic device is in a high power state or a low power state by judging the voltage value, so as to determine the direction of adjusting the vibration parameter.
[0029] Optionally, the electronic device can also judge the power state of the electronic device through the current value.
[0030] According to a first aspect, or any possible implementation mode of the above first aspect, the use state further includes an intermediate state.
[0031] For example, the state of the electronic device during the process of changing from the unfolded state to the folded state, which is not completely folded, can be defined as the intermediate state.
[0032] Optionally, the electronic device can also be configured with an acceleration sensor and a gyroscope sensor. The electronic device can obtain the folding angle of the electronic device through the detection data of the acceleration sensor and the gyroscope sensor, so as to determine whether the electronic device is in the intermediate state.
[0033] The second aspect provides a vibration control method applied to a folding screen electronic device. The method includes: the electronic device is in a first use state, in response to a vibration event, obtaining a first vibration parameter according to the first use state and first power information of the electronic device. According to the first vibration parameter, driving the motor to vibrate. In the process of vibration, in response to a user operation, the electronic device switches to a second use state, wherein the second use state is different from the first use state. According to the second use state and second power information of the electronic device, a second vibration parameter is obtained. According to the second vibration parameter, the motor is driven to vibrate; wherein the vibration feedback corresponding to the first vibration parameter and the second vibration parameter is the same or has a first deviation.
[0034] In this way, the electronic device combines the use state and power information of the electronic device to comprehensively judge to obtain the vibration parameter suitable for the current use scene, so that the electronic device can provide the same or similar vibration feedback for the user in different use scenes, thereby improving the user's use experience.
[0035] According to the second aspect, the vibration feedback includes vibration acceleration, the vibration feedback corresponding to the first vibration parameter and the second vibration parameter is the same or has a first deviation, which includes: driving the motor to vibrate according to the first vibration parameter to generate a first vibration acceleration, driving the motor to vibrate according to the second vibration parameter to generate a second vibration acceleration, the first vibration acceleration and the second vibration acceleration are the same or have a first deviation.
[0036] In some examples, the vibration feedback is measured by the vibration acceleration generated after the motor vibrates.
[0037] Optionally, the vibration feedback can be measured by vibration acceleration (unit: g). For example, the vibration acceleration of the vibration feedback generated by the motor vibration when the electronic device is in the high power expansion state can be obtained, and the vibration acceleration can be set as a target vibration acceleration. Then, the vibration parameters corresponding to different states of the electronic device can be preconfigured in the electronic device, so that the vibration acceleration of the motor vibration when the electronic device is in different states is the same as the target vibration acceleration. Wherein, "the same" does not mean absolute same, and the vibration acceleration of the motor vibration when the electronic device is in different states can have a deviation, for example, the deviation can be ± 30%. For example, when the target vibration acceleration is 1g, the vibration acceleration of the motor vibration when the electronic device is in different states can be [0.7, 1.3]g.
[0038] Optionally, the vibration feedback generated when the electronic device is in the high power expansion state is taken as a reference, and the vibration feedback of the electronic device in other states is adjusted to be the same or similar to the vibration feedback generated when the electronic device is in the high power expansion state by adjusting the vibration parameters.
[0039] It should be understood that the vibration feedback corresponding to other states of the electronic device can also be taken as a reference to obtain the vibration parameters corresponding to different use states and power information of the electronic device.
[0040] In this way, by preconfiguring the vibration parameters corresponding to different use states and power information in the electronic device, the vibration parameter acquisition efficiency is improved.
[0041] In addition, the motor is located on the mainboard of the electronic device, and the vibration feedback provided in the expansion state is relatively weak. Then, the vibration feedback in the high power expansion state is taken as a reference for the vibration feedback in different states, which can solve the device abnormal sound problem caused by large vibration while ensuring that the electronic device in different states can provide the same or similar vibration feedback for the user.
[0042] According to the second aspect, or any one of the implementation manners of the second aspect, the first vibration parameter includes a gain flag bit, and driving the motor to vibrate includes: obtaining a gain corresponding to the gain flag bit. Obtain the first vibration waveform. Correct the first vibration waveform based on the gain through the audio codec chip to obtain the second vibration waveform. Drive the motor to vibrate according to the second vibration waveform.
[0043] According to the second aspect, or any one of the implementation manners of the second aspect, obtaining the first vibration waveform includes: obtaining the first vibration waveform output by the motor service through a first channel of the audio codec chip, the first channel corresponding to the gain, and the first vibration waveform being a default vibration waveform.
[0044] According to a second aspect, or any possible implementation mode of the second aspect, the first vibration parameter is obtained according to the first use state and the first power information, including: matching a corresponding gain flag bit according to the first use state and the first power information.
[0045] According to the second aspect, or any possible implementation mode of the second aspect, the first vibration parameter includes a third vibration waveform, and the driving the motor to vibrate according to the first vibration parameter includes: obtaining the third vibration waveform output by the motor service through the motor chip, and driving the motor to vibrate according to the third vibration waveform through the motor chip.
[0046] According to the second aspect, or any possible implementation mode of the second aspect, the first vibration parameter is obtained according to the first use state and the first power information, including: matching a corresponding third vibration waveform according to the first use state and the first power information.
[0047] According to the second aspect, or any possible implementation mode of the second aspect, the electronic device is configured with a Hall sensor, and the first use state of the electronic device is obtained, including: obtaining a Hall parameter detected by the Hall sensor, and obtaining the first use state according to the Hall parameter.
[0048] According to the second aspect, or any possible implementation mode of the second aspect, the vibration parameter is obtained according to the first use state and the first power information, including: obtaining a first voltage indicated by the first power information, and in a case that the first voltage is less than or equal to a voltage threshold, the electronic device is in a low power state, and in a case that the first voltage is greater than the voltage threshold, the electronic device is in a high power state.
[0049] According to the second aspect, or any possible implementation mode of the second aspect, the first use state further includes an intermediate state.
[0050] The technical effects of the second aspect and any possible implementation mode of the second aspect can refer to the technical effects of the first aspect and any possible implementation mode of the first aspect, which will not be repeated here.
[0051] According to a third aspect, an electronic device is provided. The electronic device includes a processor and a memory, the memory is coupled to the processor, and the memory is configured to store computer program code, the computer program code includes computer instructions, when the processor reads the computer instructions from the memory, the electronic device is caused to perform: obtaining a use state of the electronic device. Obtaining power information of the electronic device. According to the use state and the power information, obtaining a vibration parameter. Driving the motor to vibrate according to the vibration parameter.
[0052] According to the third aspect, the electronic device is a foldable screen electronic device.
[0053] According to a third aspect, or any one of the third aspect's implementation manners, the vibration parameter comprises a gain flag, and driving the motor to vibrate according to the vibration parameter comprises: obtaining a gain corresponding to the gain flag; obtaining a first vibration waveform; and correcting the first vibration waveform based on the gain by using the audio codec chip to obtain a second vibration waveform, and driving the motor to vibrate according to the second vibration waveform.
[0054] According to the third aspect, or any one of the third aspect's implementation manners, the first vibration waveform is obtained by: obtaining the first vibration waveform output by the motor service through a first channel of the audio codec chip, the first channel corresponding to the gain, and the first vibration waveform being a default vibration waveform.
[0055] According to the third aspect, or any one of the third aspect's implementation manners, the vibration parameter is obtained according to the use state and the power information by: matching a corresponding gain flag according to the use state and the power information.
[0056] According to the third aspect, or any one of the third aspect's implementation manners, the vibration parameter comprises a third vibration waveform, and driving the motor to vibrate according to the vibration parameter comprises: obtaining the third vibration waveform output by the motor service through the motor chip; and driving the motor to vibrate according to the third vibration waveform through the motor chip.
[0057] According to the third aspect, or any one of the third aspect's implementation manners, the vibration parameter is obtained according to the use state and the power information by: matching a corresponding third vibration waveform according to the use state and the power information.
[0058] According to the third aspect, or any one of the third aspect's implementation manners, the electronic device is configured with a Hall sensor, and the use state of the electronic device is obtained by: obtaining a Hall parameter detected by the Hall sensor; and obtaining the use state according to the Hall parameter.
[0059] According to the third aspect, or any one of the third aspect's implementation manners, the vibration parameter is obtained according to the use state and the power information by: obtaining a first voltage indicated by the power information; in a case where the first voltage is less than or equal to a voltage threshold, the electronic device is in a low-power state; and in a case where the first voltage is greater than the voltage threshold, the electronic device is in a high-power state.
[0060] According to the third aspect, or any one of the third aspect's implementation manners, the use state further comprises an intermediate state.
[0061] In a fourth aspect, an electronic device is provided. The electronic device includes a processor and a memory coupled with the processor, the memory and a display screen coupled with the processor, the memory configured to store computer program code including computer instructions that, when read by the processor from the memory, cause the electronic device to perform: in response to a vibration event, in a first use state of the electronic device, obtaining a first vibration parameter according to the first use state and first power information of the electronic device. Driving a motor to vibrate according to the first vibration parameter. In response to a user operation during the vibration, switching the electronic device to a second use state, wherein the second use state is different from the first use state. Obtaining a second vibration parameter according to the second use state and second power information of the electronic device. Driving the motor to vibrate according to the second vibration parameter; wherein the vibration feedback corresponding to the first vibration parameter and the second vibration parameter is the same or has a first deviation.
[0062] According to the fourth aspect, the electronic device is a foldable-screen electronic device.
[0063] According to the fourth aspect, or any one of the implementations of the fourth aspect, the vibration feedback includes vibration acceleration, and the vibration feedback corresponding to the first vibration parameter and the second vibration parameter is the same or has a first deviation, including: driving the motor to vibrate according to the first vibration parameter to generate a first vibration acceleration, driving the motor to vibrate according to the second vibration parameter to generate a second vibration acceleration, and the first vibration acceleration and the second vibration acceleration are the same or have the first deviation.
[0064] According to the fourth aspect, or any one of the implementations of the fourth aspect, the first vibration parameter includes a gain flag bit, and driving the motor to vibrate according to the first vibration parameter includes: obtaining a gain corresponding to the gain flag bit. Obtaining a first vibration waveform. Correcting the first vibration waveform based on the gain through an audio codec chip to obtain a second vibration waveform. Driving the motor to vibrate according to the second vibration waveform.
[0065] According to the fourth aspect, or any one of the implementations of the fourth aspect, obtaining the first vibration waveform includes: obtaining a first vibration waveform output by a motor service through a first path of the audio codec chip, the first path corresponding to the gain, and the first vibration waveform being a default vibration waveform.
[0066] According to the fourth aspect, or any one of the implementations of the fourth aspect, obtaining the first vibration parameter according to the first use state and the first power information includes: matching a corresponding gain flag bit according to the first use state and the first power information.
[0067] According to a fourth aspect, or any possible implementation mode of the fourth aspect, the first vibration parameter comprises a third vibration waveform, and driving the motor to vibrate according to the first vibration parameter comprises: obtaining the third vibration waveform output by the motor service through the motor chip; and driving the motor to vibrate according to the third vibration waveform through the motor chip.
[0068] According to the fourth aspect, or any possible implementation mode of the fourth aspect, the first vibration parameter is obtained according to the first use state and the first power information, comprising: matching a corresponding third vibration waveform according to the first use state and the first power information.
[0069] According to the fourth aspect, or any possible implementation mode of the fourth aspect, the electronic device is configured with a Hall sensor, and the first use state of the electronic device is obtained, comprising: obtaining a Hall parameter detected by the Hall sensor; and obtaining the first use state according to the Hall parameter.
[0070] According to the fourth aspect, or any possible implementation mode of the fourth aspect, the vibration parameter is obtained according to the first use state and the first power information, comprising: obtaining a first voltage indicated by the first power information; in a case that the first voltage is less than or equal to a voltage threshold, the electronic device is in a low power state; and in a case that the first voltage is greater than the voltage threshold, the electronic device is in a high power state.
[0071] According to the fourth aspect, or any possible implementation mode of the fourth aspect, the first use state further comprises an intermediate state.
[0072] A fifth aspect provides an electronic device having a function of implementing the vibration control method according to the first aspect and any possible implementation mode thereof; or having a function of implementing the vibration control method according to the second aspect and any possible implementation mode thereof. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software comprises one or more modules corresponding to the above functions.
[0073] A sixth aspect provides a computer readable storage medium. The computer readable storage medium stores a computer program (also referred to as instructions or code), when the computer program is executed by an electronic device, the electronic device executes the method of the first aspect or any one of the implementation modes of the first aspect; or the electronic device executes the method of the second aspect or any one of the implementation modes of the second aspect.
[0074] A seventh aspect provides a computer program product, when the computer program product is run on an electronic device, the electronic device executes the method of the first aspect or any one of the implementation modes of the first aspect; or the electronic device executes the method of the second aspect or any one of the implementation modes of the second aspect.
[0075] In an eighth aspect, there is provided a circuitry comprising a processing circuitry configured to perform the method of the first aspect or any one of the embodiments of the first aspect; or the processing circuitry is configured to perform the method of the second aspect or any one of the embodiments of the second aspect.
[0076] In a ninth aspect, there is provided a chip system comprising at least one processor and at least one interface circuitry for performing a transceiving function and sending instructions to the at least one processor, wherein when the at least one processor executes the instructions, the at least one processor performs the method of the first aspect or any one of the embodiments of the first aspect; or the at least one processor performs the method of the second aspect or any one of the embodiments of the second aspect.
[0077] The technical effects of the foregoing aspects can be referred to each other, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0078] FIG. 1A is a product form diagram of an electronic device with an inner folding folding screen according to an embodiment of the present application;
[0079] FIG. 1B is a product form diagram of another electronic device with an inner folding folding screen according to an embodiment of the present application;
[0080] FIG. 1C is a product form diagram of a three-fold folding screen electronic device according to an embodiment of the present application;
[0081] FIG. 2 is a hardware structure diagram of an electronic device according to an embodiment of the present application;
[0082] FIG. 3 is a software structure block diagram of an electronic device according to an embodiment of the present application;
[0083] FIG. 4 is a first vibration control method flow diagram according to an embodiment of the present application;
[0084] FIG. 5 is an audio data driving scene diagram according to an embodiment of the present application;
[0085] FIG. 6 is a motor driving scene diagram according to an embodiment of the present application;
[0086] FIG. 7 is a use state diagram of a two-fold folding screen electronic device according to an embodiment of the present application;
[0087] FIG. 8 is a use state diagram of a three-fold folding screen electronic device according to an embodiment of the present application;
[0088] FIG. 9 is a second vibration control method flow diagram according to an embodiment of the present application;
[0089] FIG. 10 is a structure diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0090] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing the specific embodiments and are not intended to be limiting on the present application. As used in the specification and the appended claims of the present application, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that “at least one” and “one or more” refer to one or two or more (including two) in the following embodiments of the present application.
[0091] In the embodiments of the present application, “and / or” is used to describe the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, “A and / or B” can mean that there are three cases of only A, only B, and A and B existing at the same time, where A and B can be singular or plural. The character “ / ” generally represents that the associated objects before and after it are in an “or” relationship. “At least one of the following” or the like means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c can mean a, b, c, “a and b”, “a and c”, “b and c”, or “a and b and c”, where a, b, and c can be single or multiple. It should be understood that in the embodiments of the present application, “B corresponding to A” means that B is associated with A. For example, B can be determined according to A. It should also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.
[0092] In this specification, the reference “one embodiment” or “some embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases “in one embodiment”, “in some embodiments”, “in other embodiments”, “in additional embodiments”, and so on, in various places in the specification are not necessarily all referring to the same embodiment, unless otherwise specifically noted. The terms “comprise”, “comprising”, “have”, “having”, “include”, “including”, and “contain”, “containing” mean “including but not limited to” unless otherwise specifically noted. The term “connect” includes direct and indirect connections unless otherwise specifically noted. “First”, “second”, and the like are used only for descriptive purposes and are not intended to indicate or imply relative importance or an ordered ranking of the indicated technical features.
[0093] In the embodiments of the present application, the words "exemplarily" or "for example" are used to represent an example, illustration, or description. Any embodiment or design scheme described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words "exemplarily" or "for example" are used to present the relevant concept in a specific manner.
[0094] In some embodiments, the use states of the foldable-screen electronic device include a folded state and an unfolded state. Due to the difference in physical structure in the two use states, the relative positions of the motors are different in the two use states, the actual vibration waveform distribution is different, and thus the vibration feedback brought to the user in the two different use states is different, affecting the user's experience. For example, in some models of devices, the vibration feeling in the folded state can be much greater than that in the unfolded state, which greatly affects the user's experience.
[0095] Exemplarily, as shown in FIG. 1A, a product form schematic diagram of an electronic device with an inner folding foldable screen is provided in the embodiments of the present application. In FIG. 1A, (a) is a schematic diagram of the form when the inner folding foldable screen is completely unfolded, at this time, the inner folding foldable screen is in an unfolded state. The inner folding foldable screen can be folded along the folding axis in the directions 101a and 101b shown in FIG. 1A (folded outward, that is, folded towards the display user interface). As shown in FIG. 1A (b), a schematic diagram of the form when the inner folding foldable screen is completely folded, at this time, the inner folding foldable screen is in a folded state. As can be seen, the motors located near the folding axis change in relative position due to the change in physical structure when the electronic device is in the unfolded state and the folded state. For example, in the unfolded state, the motor is located at the center of the bottom of the display screen; and in the folded state, the motor is located at the corner of the display screen. Then, in the unfolded state and the folded state, the electronic device brings different vibration feedback to the user through the same motor.
[0096] As another example, as shown in FIG. 1B, another product form of an electronic device with an inner folding folding screen is provided. In FIG. 1B, (a) is a schematic diagram of the inner folding folding screen in a fully unfolded state. The inner folding folding screen can be folded along the folding axis in the direction 102a and 102b shown in (a) of FIG. 1B (inward folding, that is, folding towards the display user interface). As shown in (b) of FIG. 1B, it is a schematic diagram of the inner folding folding screen in a fully folded state. At this time, the inner folding folding screen is in a folded state. As can be seen, the motor located near the bottom corner of the display screen changes the relative position of the motor distribution due to the change of the physical structure when the electronic device is in the unfolded state and the folded state, so that the electronic device brings different vibration feedback to the user through the same motor.
[0097] As another example, as shown in FIG. 1C, a product form of a three-fold folding screen electronic device is provided. In FIG. 1C, (a) is a schematic diagram of the three-fold folding screen electronic device in a fully unfolded state. At this time, the three-fold folding screen electronic device is in an unfolded state. The three-fold folding screen electronic device is configured with two folding axes, which can be folded outward along the folding axis in the direction 103a shown in (a) of FIG. 1C and inward in the direction 103b. As shown in (b) of FIG. 1C, it is a schematic diagram of the three-fold folding screen electronic device in a fully folded state. At this time, the three-fold folding screen electronic device is in a folded state. As can be seen, the motor located near the middle display area changes the relative position of the motor distribution due to the change of the physical structure when the electronic device is in the unfolded state and the folded state, so that the electronic device brings different vibration feedback to the user through the same motor.
[0098] In some embodiments, the electronic device solves the problem of different vibration feedback caused by the change of the use state of the electronic device by configuring a larger number of motors. For example, as shown in (a) of FIG. 1A, the double-fold folding screen electronic device includes display area A and display area B, which can be displayed separately after the folding screen is folded. Then, motor 1 can be configured on display area A, and motor 2 can be configured on display area B. In this way, according to the use state of the electronic device, the vibration waveform of the two motors is adjusted respectively, so that the electronic device can bring the same vibration feedback to the user in the unfolded state and the folded state. For example, when the electronic device is in the folded state, control motor 1 or motor 2 to vibrate with amplitude 1; when the electronic device is in the unfolded state, control motor 1 and motor 2 to vibrate with amplitude 2; wherein amplitude 2 is less than amplitude 1.
[0099] In the above scheme, although the number of motors is configured based on the number of display areas after folding, the problem of different vibration feedbacks in different use states is solved. However, the more number of motors increases the hardware cost of the electronic device. Moreover, if only one motor is configured in the electronic device, the above scheme still cannot solve the problem of different vibration feedbacks in different use states. In addition, the vibration feedback of some types of motors is different when the power of the electronic device is different, and the above scheme does not consider the influence of the power on the vibration feedback. For example, when the power is low, the vibration feedback provided by the motor of the electronic device is weak, and when the power is high, the vibration feedback provided by the motor of the electronic device is strong.
[0100] In some embodiments, the electronic device adjusts the vibration parameter of the motor by obtaining the folding parameter of the folding screen. According to the folding parameter, the vibration parameter of the motor is adjusted. So that in the case of different folding parameters, the vibration energy emitted by the motor will not be completely absorbed by the folding screen. Wherein, the folding parameter for example includes the number of folding times.
[0101] In the above scheme, although the vibration parameter is adjusted so that the electronic device can adaptively adjust the vibration feedback in different use states. However, the calculation process of calculating the vibration parameter according to the number of folding times is complex. In addition, the influence of the power on the vibration feedback is not considered in this scheme.
[0102] To this end, the embodiments of the present application provide a vibration control method, which adaptively adjusts the motor vibration waveform by comprehensively considering the use state and power information of the electronic device, so as to provide the same vibration feedback for users in different use scenarios and improve the user experience.
[0103] Optionally, the vibration control method provided by the embodiments of the present application can be applied to an electronic device 100. Optionally, the electronic device 100 can be a terminal device such as a mobile phone, a tablet computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a wearable device, an artificial intelligence (AI) device, etc., and the operating system installed in the electronic device 100 includes but is not limited to or other operating systems. The specific type of the electronic device 100 and the operating system installed are not limited by the present application.
[0104] Optionally, the electronic device 100 is configured with a folding screen, and the use state of the electronic device 100 includes a folded state and an unfolded state.
[0105] For example, FIG. 2 shows a structural schematic diagram of the electronic device 100.
[0106] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, subscriber identification module (SIM) card interface 195, audio codec chip 196, and digital signal processor 197, etc.
[0107] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0108] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0109] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0110] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0111] In some embodiments, the processor 110 may include one or more interfaces. Interfaces 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.
[0112] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0113] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0114] In some embodiments, the electronic device 100 can obtain the battery power information of the battery 142 through the power management module 141. For example, the electronic device 100 can obtain the voltage of the battery 142 through the power management module 141. When the voltage is greater than a voltage threshold, the battery 142 in the electronic device 100 has sufficient power; when the voltage is less than the voltage threshold, the battery 142 in the electronic device 100 is in a low-power state. As another example, the electronic device 100 can directly obtain the battery power of the battery 142 through the power management module 141. When the power level is greater than a power threshold, the battery 142 in the electronic device 100 has sufficient power; when the power level is less than the power threshold, the battery 142 in the electronic device 100 is in a low-power state.
[0115] In some embodiments, the electronic device 100 adaptively adjusts the vibration parameters of the motor based on the battery power status of the battery 142.
[0116] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0117] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110. The electronic device 100 can use the audio module 170 for functions such as music playback and recording. The audio module 170 may include a speaker, receiver, microphone, headphone jack, and application processor to implement audio functions.
[0118] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0119] The magnetic sensor includes a Hall sensor. The electronic device 100 can utilize the Hall sensor to detect its operating state. In some embodiments, the electronic device 100 receives Hall parameters reported by the Hall sensor and can determine whether the electronic device 100 is currently in an unfolded or folded state based on these Hall parameters. Optionally, the Hall parameters may include, for example, a Hall coefficient.
[0120] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0121] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0122] Figure 3 is a software structure block diagram of an electronic device 100 according to an embodiment of this application.
[0123] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the hardware abstraction layer (HAL) layer, and the kernel layer.
[0124] The application layer can include a series of application packages.
[0125] As shown in Figure 3, the application package may include applications such as telephone and audio.
[0126] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0127] As shown in Figure 3, the application framework layer may include motor services, audio services, etc.
[0128] The motor service is used to determine the motor vibration waveform and send the motor vibration waveform to the motor via the motor drive to drive the motor to vibrate according to the motor vibration waveform.
[0129] The audio service is used to acquire, process, and transmit audio data, as well as refresh the underlying paths for the corresponding scenario. Optionally, different underlying paths correspond to different volume levels or motor vibration gains. In some examples, the audio service is also used to acquire vibration events sent by the motor service, Hall parameters reported by the Hall sensor, power information reported by the power supply driver, and other messages. Based on the acquired messages, the audio service can trigger an underlying path refresh.
[0130] The HAL layer is a wrapper around Linux kernel drivers, providing interfaces to higher-level systems and shielding them from the implementation details of the underlying hardware.
[0131] The kernel layer is the layer between hardware and software. Examples of kernel layer components include motor drivers, audio drivers, and power drivers.
[0132] The following example, using a scenario of incoming call vibration, illustrates the workflow of the software and hardware of electronic device 100.
[0133] As shown in Figure 3, when the phone application in the application layer receives an incoming call notification, it determines that the notification method includes vibration. The phone application sends a vibration instruction to the motor service to trigger the vibration process of the electronic device 100. In response to this instruction, the motor service determines that it needs to forward the acquired Hall parameters to the audio service. The motor driver can acquire the Hall parameters uploaded by the Hall sensor. The motor service can then instruct the motor driver to forward the acquired Hall parameters to the audio driver, so that the audio driver reports the Hall parameters to the audio service. Subsequently, the audio service can obtain the current usage state of the electronic device based on the Hall parameters, such as whether the electronic device is in an unfolded state or a folded state. Furthermore, the power driver can obtain the battery level information of the electronic device and report this information to the audio service. The audio service can then combine the usage state and battery level information of the electronic device to obtain the required gain. The audio service then sends this gain to the audio codec chip via the audio driver. Finally, in response to the instruction sent by the phone application, the motor service sends a vibration waveform to the digital signal processor via the motor driver, which then forwards it to the audio codec chip. Then, the audio codec chip corrects the vibration waveform by adjusting the gain and sends the corrected vibration waveform to the motor, driving the motor to vibrate according to the vibration waveform.
[0134] Among them, the electronic device adaptively corrects the vibration waveform by combining the usage status and power information. The amplitude of the corrected vibration waveform meets the needs of the current usage scenario, so that the electronic device can provide the same vibration feedback to the user in different usage scenarios.
[0135] The following section provides a detailed explanation of the specific implementation process of adaptively adjusting the vibration waveform.
[0136] Figure 4 is a schematic flowchart of a vibration control method provided in an embodiment of this application. It should be noted that this method is not limited to the specific order described in Figure 4 and below. It should be understood that in other embodiments, the order of some steps in this method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0137] S401. Electronic device obtains the usage status of electronic device.
[0138] The usage state of an electronic device can include an unfolded state and a folded state.
[0139] Optionally, the usage state of the electronic device may also include an intermediate state. For example, an intermediate state may include a state where the electronic device is not fully folded. For instance, in the bi-fold folding screen electronic device shown in Figure 1A, in response to a user operation, the electronic device folds inward, and when the folding angle reaches 90 degrees, the user stops the folding operation; the current electronic device is in an intermediate state. As another example, in the tri-fold folding screen electronic device shown in Figure 1C, in response to a user operation, the electronic device folds display area A outward along the folding axis 1 in direction 103a, so that display areas A and B face away from each other, while display area C remains folded. In this case, the current usage state of the electronic device is, for example, an intermediate state.
[0140] In some embodiments, an electronic device can obtain its usage status through sensor detection data. For example, the electronic device can obtain its usage status through Hall parameters uploaded by a Hall sensor. Optionally, the electronic device can also combine detection data from multiple sensors such as a distance sensor and a light sensor to obtain its usage status.
[0141] In some embodiments, the Hall sensor can report Hall parameters triggered by an interrupt. Interrupt triggering includes, for example, a change in the usage state of the electronic device prompting the Hall sensor to report Hall parameters. For instance, the Hall sensor reports Hall parameters after the electronic device changes from an unfolded state to a folded state. Or, the Hall sensor reports Hall parameters when the electronic device changes from a folded state to an unfolded state. To avoid the electronic device being unable to obtain its current usage state due to the Hall sensor not reporting Hall parameters if the usage state of the electronic device has not changed, optionally, the electronic device can obtain the initial Hall parameters of the Hall sensor during the power-on initialization process. For example, the electronic device can obtain these initial Hall parameters by reading a device file, thereby determining the usage state of the electronic device at the time of initialization. Then, if the electronic device does not detect the latest reported Hall parameters when it subsequently needs to obtain its usage state, it can be determined that the current usage state of the electronic device is the usage state at the time of power-on initialization, and the usage state at the time of power-on initialization can be determined based on these initial Hall parameters.
[0142] In some embodiments, the electronic device is equipped with a vibration unit for triggering vibration of the electronic device. For example, the vibration unit is a motor. Optionally, the electronic device is equipped with at least one motor.
[0143] In some embodiments, the motor driving method of an electronic device may include chip driving and audio data driving. Motor driving involves a motor service sending vibration waveforms of different amplitudes to a motor chip, which instructs the motor to vibrate according to these waveforms. Audio data driving involves the motor drive sending vibration waveforms to an audio codec chip via a digital signal processor (DSP) based on the underlying path selected by the audio service. Different underlying paths correspond to different gains, and the DSP sends the gain-corrected vibration waveforms to the motor, instructing it to vibrate according to these corrected waveforms. The underlying path selection process includes the audio service sending path information to the audio codec chip via the audio drive, which indicates the underlying path. The audio service also sends interface information to the DSP via the audio drive, including an interface identifier for transmitting audio data and an interface identifier for transmitting motor data. The interface identifier indicates the interface for subsequent transmission of audio or motor data. Optionally, this interface information corresponds to the underlying path indicated by the aforementioned path information. Thus, during subsequent motor data transmission, after the motor drive sends motor data to the corresponding interface of the DSP, the DSP can then transmit the motor data to the underlying path corresponding to the audio codec chip.
[0144] In some embodiments, the module for determining the usage state of the electronic device differs depending on the motor driving method. For example, in an audio data-driven motor driving method, the audio service can determine the usage state of the electronic device and perform multi-information fusion. Similarly, in a chip-driven motor driving method, a motor service can determine the usage state of the electronic device and perform multi-information fusion.
[0145] Optionally, the multi-information fusion indicator obtains vibration parameters based on the usage status and power information of the electronic device. The specific process of multi-information fusion is detailed in step S403 below.
[0146] For example, in the audio data-driven scenario shown in Figure 5, the application detects a vibration event and sends the vibration event to the motor service. For instance, a phone application responds to an incoming call notification and determines that vibration needs to be triggered based on the incoming call event, thus confirming that a vibration event has been detected. After receiving the vibration event, the motor service instructs the motor driver to report the Hall parameters. In the audio data-driven scenario, the audio service performs multi-information fusion to determine the gain. Therefore, the motor service instructs the motor driver to forward the acquired Hall parameters to the audio service and sends an indication message to the audio service, indicating that the audio service has detected the vibration event and needs to perform multi-information fusion (e.g., step ①). Optionally, after acquiring the Hall parameters, the Hall sensor uploads the Hall parameters to the motor driver (e.g., step ②). Then, the motor driver forwards the Hall parameters to the audio service via the audio driver (e.g., steps ③ and ④).
[0147] For example, in the chip-driven scenario shown in Figure 6, the motor service performs multi-information fusion to obtain vibration parameters. In response to a vibration event, the motor service instructs the motor driver to report Hall parameters. Optionally, after acquiring the Hall parameters, the Hall sensor uploads them to the motor driver (e.g., step ①). Then, the motor driver reports the Hall parameters to the motor service (e.g., step ②).
[0148] Optionally, the vibration events in different vibration scenarios are different. For example, in addition to the aforementioned incoming call event, vibration events may also include alarm clock events, message notification events, etc. This application embodiment does not limit the specific vibration scenario.
[0149] S402. Electronic devices acquire battery power information.
[0150] In some embodiments, when the electronic device has sufficient power, it can drive a motor to vibrate with a large amplitude waveform, providing a strong vibration sensation to the user. However, when the electronic device has insufficient power, it needs to reduce the amplitude of the vibration waveform to conserve power, thus reducing the vibration sensation felt by the user. Therefore, the electronic device needs to obtain its power level information, and subsequently, based on this information, obtain vibration parameters to ensure consistent vibration feedback to the user regardless of power levels.
[0151] For example, in the audio data-driven scenario shown in Figure 5, the audio service, in response to an indication message sent by the motor service to indicate a vibration event, can request power information from the power driver. Accordingly, after obtaining the power information, the power driver reports the power information to the audio service (e.g., step ⑤).
[0152] As an example, as shown in step ③ of FIG6, in response to a vibration event, the motor service obtains the power information reported by the power drive.
[0153] It should be understood that the dashed arrows in Figure 5 or Figure 6 indicate the direction of message transmission from the underlying hardware to the upper-layer service. The messages transmitted are, for example, the Hall parameters and power information mentioned above.
[0154] In some embodiments, the power information includes at least one of the battery's voltage, power level, and current.
[0155] In some embodiments, the execution order of steps S401 and S402 is not limited. For example, the electronic device may first obtain the usage status of the electronic device, and then obtain the battery information of the electronic device, that is, execute step S401 first, and then execute step S402. Alternatively, the electronic device may first obtain the battery information of the electronic device, and then obtain the usage status of the electronic device, that is, execute step S402 first, and then execute step S401. Alternatively, the electronic device may simultaneously obtain the usage status and battery information of the electronic device, that is, execute steps S401 and S402 simultaneously.
[0156] S403. The electronic device obtains vibration parameters based on its usage status and power information.
[0157] In some embodiments, the electronic device is pre-configured with vibration parameters corresponding to different usage states and battery levels. Therefore, after obtaining the usage state and battery level information through steps S401 and S402, the electronic device can match the corresponding vibration parameters based on the usage state and battery level information.
[0158] Optionally, taking the usage state as including unfolded state and folded state, and the power state of the electronic device as including high power and low power, by combining the usage state and power information of the electronic device, the state of the electronic device can include high power unfolded state, low power unfolded state, high power folded state, and low power folded state.
[0159] Optionally, the vibration feedback generated when the electronic device is in a high-charge unfolded state can be used as a reference. By adjusting the vibration parameters, the vibration feedback when the electronic device is in other states can be adjusted to be the same as or similar to the vibration feedback generated when the electronic device is in a high-charge unfolded state.
[0160] Optionally, vibration feedback can be measured by vibration acceleration (unit: g). For example, the vibration acceleration generated by the motor vibration when the electronic device is in a high-charge deployed state can be obtained and set as the target vibration acceleration. Then, vibration parameters corresponding to different states of the electronic device can be pre-configured, ensuring that the vibration acceleration generated by the motor vibration is the same as the target vibration acceleration in different states. It should be noted that "same" does not mean absolutely identical; there can be deviations between the vibration accelerations generated by the motor vibration in different states of the electronic device, for example, this deviation can be ±30%. For instance, when the target vibration acceleration is 1g, the vibration acceleration generated by the motor vibration in different states of the electronic device can be [0.7, 1.3]g.
[0161] It should be understood that the vibration feedback corresponding to other states of the electronic device can also be used as a benchmark to obtain vibration parameters corresponding to different usage states and power information of the electronic device. Furthermore, the aforementioned target vibration acceleration and deviation are merely illustrative examples.
[0162] Thus, by pre-configuring vibration parameters corresponding to different usage states and power information in electronic devices, the efficiency of vibration parameter acquisition can be improved.
[0163] Furthermore, since the motor is located on the motherboard of the electronic device, the vibration feedback provided in the deployed state is relatively weak. Therefore, using the vibration feedback in the high-charge deployed state as the vibration feedback benchmark for different states can ensure that the electronic device provides the same or similar vibration feedback to the user in different states, while solving the problem of abnormal noise caused by excessive vibration.
[0164] In some embodiments, in an audio data-driven scenario, vibration parameters may include a vibration waveform and a gain. Optionally, the gain includes analog gain and digital gain, wherein analog gain amplifies the analog signal; and digital gain amplifies the signal after analog-to-digital conversion. Optionally, the gain is used to adjust the frequency and amplitude of data points in the vibration waveform. Optionally, the electronic device acquires the vibration waveform through a motor drive and acquires the gain through an audio drive. Optionally, after acquiring the vibration parameters, the audio codec chip corrects the vibration waveform using the gain, thereby achieving adaptive adjustment of the vibration waveform based on usage status and power information, realizing adaptive adjustment of vibration feedback.
[0165] In some examples, in audio data-driven scenarios, the motor service determines the default vibration waveform.
[0166] In some examples, in audio data-driven scenarios, the audio service can obtain the corresponding gain based on the electronic device's usage status and / or battery information. For instance, when the device is in a folded state, a smaller amplitude is needed to provide a greater vibration feedback to the user. Therefore, when the electronic device is in a folded state, the audio service can match a smaller gain. Similarly, when the device is in an unfolded state, a larger amplitude is needed to provide a normal vibration feedback to the user. Therefore, when the electronic device is in an unfolded state, the audio service can match a larger gain. Furthermore, battery information can include voltage; when the battery is low, the amplitude of the vibration waveform will be smaller. Therefore, if the current voltage of the electronic device is less than or equal to a voltage threshold, it indicates that the electronic device is in a low-battery state, and the amplitude of the vibration waveform needs to be increased. Therefore, the audio service can match a larger gain. Moreover, generally, when the battery is high, the amplitude of the vibration waveform will be larger. Therefore, after obtaining the voltage from the battery information, if the current voltage of the electronic device is greater than a voltage threshold, it indicates that the electronic device is in a high-battery state, and the amplitude of the vibration waveform needs to be decreased. Therefore, the audio service can match a smaller gain. Combining these four examples, the audio service can match an appropriate gain. For example, battery information can include current. When the battery is low, the amplitude of the vibration waveform will be smaller. Therefore, if the current of the electronic device is less than or equal to the current threshold, it indicates that the electronic device is in a low battery state, and the amplitude of the vibration waveform needs to be increased. Thus, the audio service can match a larger gain. As another example, generally, when the battery is high, the amplitude of the vibration waveform will be larger. Therefore, after obtaining the current from the battery information, if the current of the electronic device is greater than the current threshold, it indicates that the electronic device is in a high battery state, and the amplitude of the vibration waveform needs to be decreased. Thus, the audio service can match a smaller gain. Electronic devices can also directly obtain battery power. When the battery power is less than or equal to the power threshold, it indicates that the electronic device is in a low battery state, and the amplitude of the vibration waveform needs to be increased. Therefore, the audio service can match a larger gain. Again, generally, when the battery power is high, the amplitude of the vibration waveform will be larger. Therefore, when the battery power is greater than the power threshold, it indicates that the electronic device is in a high battery state, and the amplitude of the vibration waveform needs to be decreased. Thus, the audio service can match a smaller gain.
[0167] Optionally, the power threshold can be 10%, the voltage threshold can be, for example, the voltage value corresponding to 10% battery power, and the current threshold can be, for example, the current value corresponding to 10% battery power.
[0168] Optionally, the electronic device is pre-configured with gain flags corresponding to different conditions, and the electronic device can automatically match the appropriate gain flag according to the actual situation. For example: Condition A, high battery unfolded state corresponds to gain flag 1; Condition B, low battery unfolded state corresponds to gain flag 2; Condition C, high battery folded state corresponds to gain flag 3; Condition D, low battery folded state corresponds to gain flag 4.
[0169] The gain flag is different for different situations. In this way, different vibration parameters (such as the gain flag) can be obtained when the electronic device is in different usage states and with different power information. These vibration parameters are used to drive the motor vibration and can provide the user with the same or similar vibration feedback.
[0170] For example, in the audio data-driven scenario shown in Figure 5, the audio service obtains the Hall parameters reported by the audio driver in step ④ to determine the usage status of the electronic device. Furthermore, the audio service obtains the power information reported by the power driver in step ⑤ to determine the power status of the electronic device. Then, by combining the usage status and power status of the electronic device, the audio service can match the corresponding gain flag.
[0171] It should be understood that different gains corresponding to different conditions can also be directly configured in electronic devices. During operation, the electronic device can directly match the corresponding gain based on the actual situation. For example: Condition A, high battery unfolded state corresponds to gain 1; Condition B, low battery unfolded state corresponds to gain 2; Condition C, high battery folded state corresponds to gain 3; Condition D, low battery folded state corresponds to gain 4. In an example scenario, when the electronic device is in Condition A, high battery unfolded state, it can directly match gain 1 without first matching the corresponding gain flag, thus improving gain acquisition efficiency.
[0172] In some embodiments, vibration parameters may include vibration waveforms. The electronic device acquires the vibration waveforms via a motor service.
[0173] In some examples, the motor service can combine the electronic device's usage status and battery level information to match the corresponding vibration waveform. For instance, when the device is in a folded state, a smaller amplitude is needed to provide a greater vibration feedback to the user. Therefore, the motor service can match a smaller amplitude vibration waveform based on the folded state. Similarly, when the device is in an unfolded state, a larger amplitude is needed to provide normal vibration feedback. Therefore, the motor service can match a larger amplitude vibration waveform based on the unfolded state. Furthermore, when the battery level is low, the default triggered vibration waveform has a smaller amplitude. Therefore, after obtaining the voltage from the battery level information, the motor service can determine that the electronic device is in a low-battery state and requires a larger amplitude vibration waveform if the current voltage is less than or equal to a voltage threshold. Likewise, when the battery level is high, the default triggered vibration waveform has a larger amplitude. Therefore, after obtaining the voltage from the battery level information, the motor service can determine that the electronic device is in a high-battery state and requires a smaller amplitude vibration waveform if the current voltage is greater than a voltage threshold. Therefore, by combining the four scenarios described above, the motor service can match a suitable vibration waveform.
[0174] Optionally, the electronic device is pre-configured with vibration waveforms corresponding to different conditions. These vibration waveforms have different amplitudes, and the electronic device can automatically match the appropriate vibration waveform according to the actual situation. For example: Condition A, high charge unfolded state corresponds to vibration waveform 1; Condition B, low charge unfolded state corresponds to vibration waveform 2; Condition C, high charge folded state corresponds to vibration waveform 3; Condition D, low charge folded state corresponds to vibration waveform 4.
[0175] The vibration waveforms differ depending on the situation. Thus, different vibration parameters (e.g., vibration waveforms) can be obtained when the electronic device is in different usage states and with different battery levels. These vibration parameters are used to drive the motor vibration, providing the user with the same or similar vibration feedback.
[0176] It should be noted that the usage state of an electronic device can also include intermediate states. Combining the usage state and power information of the electronic device, the state of the electronic device can also include high power intermediate state, low power intermediate state, etc. In this case, the vibration parameters or vibration waveforms corresponding to the state of the electronic device are matched. For the description of the vibration parameters or vibration waveforms corresponding to other states of the electronic device in the embodiments of this application, it will not be repeated here.
[0177] For example, in the chip-driven scenario shown in Figure 6, the motor service obtains the Hall parameters reported by the motor driver in step ② to determine the usage status of the electronic device. Furthermore, the motor service obtains the power information reported by the power driver in step ③ to determine the power status of the electronic device. Then, by combining the usage status and power status of the electronic device, the motor service can match the corresponding vibration waveform.
[0178] In some embodiments, the electronic device sets the truth values of different bits through bit operations to represent the various cases described above. Thus, based on the bit values, the electronic device can map the final gain flag bit or vibration waveform sequence number.
[0179] In some examples, electronic devices use bitwise operations to set the truth value of the 0th bit to indicate the device's battery status. For example, 0 indicates a high battery status, and 1 indicates a low battery status. It should be understood that 1 can also represent a high battery status, and 0 can represent a low battery status.
[0180] In some examples, electronic devices use bitwise operations to set the truth value of the first bit to indicate the device's usage state. For example, 0 indicates the device is in an unfolded state, and 1 indicates it is in a folded state. It should be understood that 1 can also represent the unfolded state, and 0 can represent the folded state.
[0181] For example, consider the dual-folding screen electronic device shown in Figure 7(a). The electronic device obtains its usage status and battery information through steps S401 and S402 described above. Then, based on the usage status and battery information, the electronic device determines that it is currently in state A (high battery unfolded state) and sets the corresponding bit value to 00.
[0182] For example, consider the bi-fold screen electronic device shown in Figure 7(b). The electronic device obtains its usage status and battery information through steps S401 and S402 described above. Then, based on the usage status and battery information, the electronic device determines that it is currently in state C, the high-battery folded state, and sets the corresponding bit value to 10.
[0183] In some examples, electronic devices may be equipped with displays capable of multiple folds, such as a tri-fold folding screen device. In this case, the electronic device can use bitwise operations to set the truth value of more bits to represent the folding state. For example, as shown in Figure 8, for a tri-fold folding screen device, the display screen includes a first display area, a second display area, and a third display area. A folding axis 1 exists between the first and second display areas, and a folding axis 2 exists between the second and third display areas. The electronic device can use bitwise operations to set the truth value of the first bit to represent the folding state of the first and second display areas (or, in other words, the folding state of folding axis 1), and use bitwise operations to set the truth value of the second bit to represent the folding state of the second and third display areas. For example, 0 represents the unfolded state, and 1 represents the folded state.
[0184] It should be understood that 1 can also represent the unfolded state and 0 can represent the folded state (or it can be described as representing the folded state of the folding axis 2 of the electronic device). Furthermore, Figure 8 uses the second display area as the intermediate display area between folding axis 1 and folding axis 2, and the first and third display areas as the display areas on either side of the second display area as an example to illustrate the process of indicating the folded state of the electronic device through bit truth values. It should be understood that the connection order of the three display areas is not limited in this embodiment.
[0185] For example, consider the tri-fold screen electronic device shown in Figure 8(a). The electronic device obtains its usage status and battery information through the steps S401 and S402 described above. Then, based on the usage status and battery information, the electronic device determines that it is currently in a fully unfolded state with high battery, and sets the corresponding bit value to 000.
[0186] For example, consider the tri-fold screen electronic device shown in Figure 8(b). The electronic device obtains its usage status and battery information through steps S401 and S402 described above. Then, based on the usage status and battery information, the electronic device determines that it is currently in a high battery state, the first and second display areas are in a folded state, and the second and third display areas are in an unfolded state, and the corresponding bit value can be set to 010.
[0187] For example, consider the tri-fold screen electronic device shown in Figure 8(c). The electronic device obtains its usage status and battery information through steps S401 and S402. Then, based on the usage status and battery information, the electronic device determines that it is currently at high battery level, the first and second display areas are in an unfolded state, and the second and third display areas are in a folded state, and sets the corresponding bit value to 100.
[0188] As another example, consider the tri-fold screen electronic device shown in Figure 8(d). The electronic device obtains its usage status and battery information through steps S401 and S402 described above. Then, based on the usage status and battery information, the electronic device determines that it is currently in a fully folded state with high battery, and sets the corresponding bit value to 110.
[0189] In some examples, in audio data-driven scenarios, the audio service determines bit values based on the electronic device's usage status and battery level. The audio service can then match these bit values to the corresponding gain flag.
[0190] In other examples, in chip-driven scenarios, the motor service determines bit values based on the electronic device's usage status and power information. The motor service can then match these bit values to the corresponding vibration waveform.
[0191] In this way, by setting different bit values, the electronic device can adaptively match the corresponding vibration parameters, so as to drive the motor to vibrate according to the matched vibration parameters in subsequent steps.
[0192] It should be understood that the electronic device can set more bits to match the electronic device for potentially more folded axes. Optionally, if more bits are not used, the electronic device can set these bits to 0 (or 1).
[0193] S404. Electronic devices drive motors to vibrate according to vibration parameters.
[0194] In some embodiments, after acquiring vibration parameters, the electronic device can send the vibration parameters to the motor to drive the motor to vibrate according to the corresponding vibration parameters.
[0195] For example, in the audio data-driven scenario shown in Figure 5, after acquiring vibration parameters (e.g., a gain flag), the audio service sends the gain flag to the audio driver (e.g., step ⑥). The audio driver then forwards the gain flag to the audio codec chip to trigger the underlying path selection of the audio codec chip, where the selected underlying path corresponds to the gain flag. Optionally, the audio service sends interface information to the digital signal processor (DSP) through the audio driver. This interface information may include an interface identifier for transmitting audio data and an interface identifier for transmitting motor data (e.g., steps ⑥ and ⑦). The interface identifier indicates the interface for subsequent transmission of audio data or motor data. In some examples, the motor service sends a default vibration waveform to the DSP through the motor driver (e.g., steps ⑨ and ⑩). The DSP forwards the acquired default vibration waveform to the audio codec chip based on the interface identifier for the motor data (e.g., step ⑧). Optionally, the DSP may be, for example, a high-fidelity (HiFi) DSP. It should be understood that in usage scenarios where vibration is accompanied by audio playback, the information sent by the audio service also includes audio. The audio driver can send this audio to a digital signal processor (DSP). The DSP, based on the interface identifier of the audio data, forwards the audio to the audio module (e.g., a speaker) through an audio codec chip to trigger audio playback (e.g., steps ⑦ and ⑧). Afterward, the audio codec chip can obtain the corresponding gain based on the gain flag and correct the default vibration waveform using this gain. For example, after inputting the default waveform and gain to the audio codec chip, the chip can output the corresponding corrected vibration waveform. Optionally, the correction of the vibration waveform may include, for example, correcting parameters affecting the vibration sensation, such as the amplitude and frequency of the vibration waveform. Then, the audio codec chip can send the corrected vibration waveform to the motor to drive the motor to vibrate according to the corrected waveform (e.g., step ⑧). ).
[0196] It should be understood that in Figure 5, solid arrows indicate the direction in which the audio service transmits audio data to the lower-level hardware, such as the gain flag and the corrected motor vibration waveform. Dotted arrows indicate the direction in which the motor service transmits motor data to the lower-level hardware, such as the motor vibration waveform.
[0197] For example, in the chip-driven scenario shown in Figure 6, the motor service can obtain vibration parameters, such as a matching vibration waveform. Then, the motor service sends the vibration waveform to the motor chip through the motor driver, and the motor chip drives the motor to vibrate according to the vibration waveform (e.g., steps ④, ⑤, and ⑥).
[0198] It should be understood that the dotted horizontal arrows in Figure 6 indicate the direction in which the motor service transmits motor data to the lower-level hardware, such as the motor vibration waveform described above.
[0199] Optionally, the motor service can send a vibration waveform or a vibration waveform sequence number. If the motor service sends a vibration waveform sequence number, the audio codec chip or the motor can match the corresponding vibration waveform according to the vibration waveform sequence number.
[0200] Because the motor drives the electronic device to vibrate using the same waveform regardless of the device's usage state, the vibration feedback provided to the user varies. For example, when a foldable screen electronic device is folded, the relative position of the motor changes, thus altering the user's vibration perception. Another example is that the motor in an electronic device is typically mounted near the center, meaning that when the device is folded, the motor is encased within a multi-layered flexible screen. When the device vibrates, the flexibility of the screen causes the vibration energy generated by the motor with its set vibration parameters to be absorbed by the multi-layered flexible screen, resulting in a weaker vibration perceived from the outside of the device compared to its unfolded state, leading to a significant difference in vibration feedback. Therefore, by combining the device's usage state and battery level information, the vibration parameters can be comprehensively determined to suit the current usage scenario, allowing the electronic device to provide the same or similar vibration feedback to the user in different usage scenarios, thereby improving the user experience.
[0201] In some embodiments, the electronic device responds to a vibration event, acquires vibration parameters, and drives the motor to vibrate using these parameters. During the motor vibration process, the electronic device will not dynamically adjust the vibration waveform based on its usage status and battery level. This avoids frequent jumps in motor vibration during the folding and unfolding process, which could negatively impact the user experience.
[0202] In some embodiments, the electronic device may also obtain vibration parameters based solely on the electronic device's usage status or battery level information.
[0203] For example, in an audio data-driven scenario, the audio service determines the current battery status of the electronic device based on the battery information reported by the power driver. Then, the audio service matches the corresponding gain flag based on this battery status and sends the gain flag to the digital signal processor (DSP) via the audio driver. Additionally, the motor service sends a default vibration waveform to the DSP via the motor service. The DSP then sends the acquired vibration parameters, such as the default vibration waveform and the gain flag, to the audio codec chip. The audio codec chip can obtain the corresponding gain based on the gain flag and correct the default vibration waveform accordingly. For example, after inputting the default waveform and gain to the audio codec chip, the chip can output the corresponding corrected vibration waveform. The audio codec chip can then send the corrected vibration waveform to the motor to drive it to vibrate according to the corrected waveform.
[0204] For example, in a chip driver scenario, the motor service receives power information reported by the power driver to determine the current power status of the electronic device. Based on the power status, the motor service can then match a corresponding vibration waveform. The vibration parameters determined by the motor service may include, for example, the matched vibration waveform. Subsequently, the motor service sends this vibration waveform to the motor via the motor driver to drive the motor to vibrate according to that waveform.
[0205] For example, in an audio data-driven scenario, the audio service determines the current usage status of the electronic device based on the Hall parameters forwarded by the audio driver. Then, the audio service matches the corresponding gain flag based on this usage status and sends the gain flag to the digital signal processor (DSP) via the audio driver. Additionally, the motor service sends a default vibration waveform to the DSP via the motor service. The DSP then sends the acquired vibration parameters, such as the default vibration waveform and the gain flag, to the audio codec chip. The audio codec chip can obtain the corresponding gain based on the gain flag and correct the default vibration waveform accordingly. For instance, after inputting the default waveform and gain to the audio codec chip, the chip can output the corresponding corrected vibration waveform. The audio codec chip can then send the corrected vibration waveform to the motor to drive it to vibrate according to the corrected waveform.
[0206] For example, in a chip-driven scenario, the motor service obtains Hall parameters reported by the Hall sensor through the motor driver to determine the current usage status of the electronic device. Based on this status, the motor service can match a corresponding vibration waveform. The vibration parameters determined by the motor service may include, for example, the matched vibration waveform. Then, the motor service sends this vibration waveform to the motor through the motor driver to drive the motor to vibrate according to that waveform.
[0207] In this way, electronic devices can obtain vibration parameters through their usage status or power information, and drive the motor to vibrate according to these vibration parameters, thereby reducing the computational power consumption of the electronic devices.
[0208] In some embodiments, the electronic device is equipped with at least one Hall sensor or other sensor for detecting the usage status of the electronic device.
[0209] Optionally, when the display screen is attached or detached, the Hall sensor triggers a report of Hall parameters to the upper layer. The electronic device can then determine the change in its operating status based on these Hall parameters. Optionally, to improve the accuracy of Hall parameter detection, the Hall sensor is installed near the folding axis.
[0210] For example, in the bi-fold foldable screen electronic device scenario shown in Figure 7, the electronic device includes a folding axis, and a Hall sensor (not shown in Figure 7) is configured near the folding axis. Optionally, when the relationship between the first display area and the second display area changes to being flush, the Hall sensor sends Hall parameters to the upper layer via an interrupt trigger. Based on these Hall parameters, the electronic device can determine that its usage state is folded. Alternatively, when the relationship between the first display area and the second display area changes to being separated, the Hall sensor sends Hall parameters to the upper layer via an interrupt trigger. Based on these Hall parameters, the electronic device can determine that its usage state is unfolded.
[0211] For example, in the tri-fold screen electronic device scenario shown in Figure 8, the electronic device includes two folding axes, and a Hall sensor (not shown in Figure 8) is configured near each of these two folding axes. When the relationship between the first and second display areas changes from being joined to being separated, or from being separated to being joined, Hall sensor 1, located near folding axis 1, sends Hall parameter 1 to the upper layer via an interrupt trigger. When the relationship between the second and third display areas changes from being joined to being separated, or from being separated to being joined, Hall sensor 2, located near folding axis 2, sends Hall parameter 2 to the upper layer via an interrupt trigger. Therefore, the electronic device needs to combine Hall parameter 1 and Hall parameter 2 to determine the usage status of the electronic device.
[0212] In other words, when an electronic device is equipped with one Hall sensor, the audio service or motor service acquires one set of Hall parameters; when the electronic device is equipped with multiple Hall sensors, the audio service or motor service acquires multiple sets of Hall parameters. Then, the audio service or motor service determines the operating status of the electronic device based on all the acquired Hall parameters.
[0213] In this way, the electronic device adaptively determines the number of parameters needed to judge the usage status of the electronic device based on the actual Hall sensor configuration.
[0214] In some embodiments, the electronic device is equipped with at least one motor. For example, as shown in Figure 7 or Figure 8, the electronic device is equipped with at least one motor.
[0215] Thus, even if an electronic device is equipped with only one motor, it can adaptively adjust vibration feedback by fusing multiple information sources, combining the device's usage status and battery level information. Compared to existing technologies where the number of motors needs to match the number of display areas, the vibration control method provided in this application effectively reduces hardware costs.
[0216] In some embodiments, the electronic device can optionally disable the dynamic vibration adjustment function based on user operation. Optionally, the dynamic vibration adjustment function can be uniformly disabled or enabled to allow the electronic device to dynamically adjust vibration based on usage status and battery information. Alternatively, the dynamic vibration adjustment function can be individually disabled or enabled to allow the electronic device to dynamically adjust vibration based on usage status or battery information.
[0217] For example, if a user believes that sacrificing vibration feedback when the electronic device's battery is low can extend its usage time, then the user can choose to disable the device's ability to dynamically adjust vibration based on battery level. Alternatively, the user can also directly disable the device's ability to dynamically adjust vibration based on usage status and battery level.
[0218] Figure 9 is a schematic flowchart of another vibration control method provided in an embodiment of this application. It should be noted that this method is not limited to the specific order described in Figure 9 and below. It should be understood that in other embodiments, the order of some steps in this method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:
[0219] S901. When the electronic device is in a first usage state, in response to a vibration event, it obtains a first vibration parameter based on the first usage state and the first power information of the electronic device.
[0220] In some embodiments, the motor vibration event can be, for example, an incoming call event. When the electronic device detects an incoming call, it needs to trigger motor vibration. The electronic device can obtain the current first usage state and first battery level information, and then obtain the first vibration parameters based on the first usage state and first battery level information.
[0221] For example, based on the audio data driven scenario shown in Figure 5, the electronic device can match the first gain flag corresponding to the first usage state and the first power information, and obtain the vibration waveform 1 by correcting the default vibration waveform through the gain indicated by the first gain flag.
[0222] For example, based on the chip driving scenario shown in Figure 6, the electronic device can match the vibration waveform A corresponding to the first usage state and the first power information.
[0223] S902. The electronic device drives the motor to vibrate according to the first vibration parameter.
[0224] For example, based on the audio data driven scenario shown in Figure 5, the electronic device can drive the motor to vibrate according to the first vibration parameter, for example, drive the motor to vibrate according to the vibration waveform 1 after gain correction.
[0225] For example, based on the chip driving scenario shown in Figure 6, the electronic device can drive the motor to vibrate according to the first vibration parameter, for example, drive the motor to vibrate according to vibration waveform A.
[0226] S903. During vibration, in response to user operation, the electronic device switches to a second usage state.
[0227] The second usage state is different from the first usage state.
[0228] In some embodiments, the user operation is, for example, an operation that changes the usage state of the electronic device. For example, the user operation is the operation of folding or unfolding the foldable screen of the electronic device.
[0229] S904. The electronic device obtains the second vibration parameter based on the second usage state and the second power information of the electronic device.
[0230] In some embodiments, during vibration, when the electronic device detects an operation by the user that changes the usage state of the electronic device, in response to this operation, the electronic device can acquire a second usage state and second battery level information. A second vibration parameter can then be acquired based on this second usage state and second battery level information.
[0231] For example, based on the audio data driven scenario shown in Figure 5, the electronic device matches the second gain flag corresponding to the second usage state and the second power information, and obtains the vibration waveform 2 by correcting the default vibration waveform through the gain indicated by the second gain flag.
[0232] For example, based on the chip driving scenario shown in Figure 6, the electronic device matches the vibration waveform B corresponding to the second usage state and the second power information.
[0233] S905. The electronic device drives the motor to vibrate according to the second vibration parameter, and the vibration feedback corresponding to the first vibration parameter and the second vibration parameter is the same or has a first deviation.
[0234] In some embodiments, vibration feedback includes vibration acceleration. Exemplarily, a motor is driven to vibrate according to a first vibration parameter to generate a first vibration acceleration, and a second vibration parameter is driven to vibrate to generate a second vibration acceleration, wherein the first and second vibration accelerations are the same or have a first deviation.
[0235] For example, based on the audio data-driven scenario shown in Figure 5, the electronic device can drive the motor to vibrate according to the second vibration parameters, for example, driving the motor to vibrate according to vibration waveform 2. Here, the first vibration parameters and the second vibration parameters are different (e.g., the first gain flag and the second gain flag are different), but the vibration feedback provided to the user by driving the motor is the same or similar. It should be noted that "same" does not mean absolutely identical. The vibration acceleration generated by the motor vibration can deviate in different states of the electronic device. For example, there can be a deviation between the first vibration acceleration generated by driving the motor according to the first vibration parameters and the second vibration acceleration generated by driving the motor according to the second vibration parameters. For example, this first deviation can be ±30%. Thus, in the audio data-driven scenario, the electronic device can adaptively adjust the gain of the default vibration waveform according to the usage status and battery information, thereby providing the user with the same or similar vibration feedback.
[0236] For example, based on the chip-driven scenario shown in Figure 6, the electronic device can drive the motor to vibrate according to the second vibration parameter, for example, drive the motor to vibrate according to vibration waveform B. Here, the first vibration parameter and the second vibration parameter are different (e.g., vibration waveform A and vibration waveform B are different), but the vibration feedback provided to the user by driving the motor is the same or similar. Thus, in the chip-driven scenario, the electronic device can adaptively match the corresponding vibration waveform according to the usage status and power information, thereby providing the user with the same or similar vibration feedback.
[0237] In the above example scenario, the process of the electronic device acquiring the usage status (e.g., the first usage status or the second usage status), the process of acquiring power information (e.g., the first power information or the second power information), the process of acquiring vibration parameters (e.g., the first vibration parameter or the second vibration parameter) based on the usage status and power information, and the process of driving the motor to vibrate according to the vibration parameters can be referred to the relevant content of steps S401-S404 above, and will not be repeated here.
[0238] In some embodiments, in response to a vibration event, the electronic device acquires a first vibration parameter based on a first usage state and a first battery level. After driving a motor to vibrate using this first vibration parameter, if the electronic device switches from a first usage state to a second usage state during the motor vibration process, the electronic device will not dynamically adjust the vibration waveform based on the usage state and battery level during the switch. When the electronic device switches to the second usage state, it acquires a second vibration parameter based on the second usage state and the second battery level, and drives the motor to vibrate using this second vibration parameter. This avoids frequent jumps in motor vibration during the folding and unfolding process, which could negatively impact the user experience.
[0239] It should be understood that the above description of the adaptive adjustment process of vibration feedback uses multi-information fusion analysis based on the usage status and power information of electronic devices as an example. Furthermore, electronic devices can also incorporate more parameters affecting their vibration feedback for multi-information fusion analysis, providing users with a more accurate and consistent vibration experience.
[0240] In some solutions, multiple embodiments of this application can be combined, and the combined solution can be implemented. Optionally, some operations in the processes of each method embodiment may be combined, and / or the order of some operations may be changed. Furthermore, the execution order between the steps of each process is merely exemplary and does not constitute a limitation on the execution order between steps; other execution orders are also possible. It is not intended to indicate that the execution order is the only possible order in which these operations can be performed. Those skilled in the art will conceive of various ways to reorder the operations described herein. In addition, it should be noted that the process details involved in one embodiment of this document are similarly applicable to other embodiments, or different embodiments may be combined.
[0241] Furthermore, some steps in the method embodiments can be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and can be deleted in certain use cases. Or, other possible steps may be added to the method embodiments.
[0242] Furthermore, the various method embodiments can be implemented individually or in combination.
[0243] The vibration control method provided by the embodiments of this application has been described in detail above with reference to Figures 4-9. The electronic device provided by the embodiments of this application is described in detail below with reference to Figure 10.
[0244] In one possible design, FIG10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in FIG10, the electronic device 1000 may include a transceiver unit 1001 and a processing unit 1002. The electronic device 1000 can be used to implement the functions of the electronic device involved in the above method embodiments.
[0245] Optionally, the transceiver unit 1001 is used to support the electronic device 1000 in performing S401 and S402 in FIG4; and / or, to support the electronic device 1000 in performing S901 and S904 in FIG9.
[0246] Optionally, the processing unit 1002 is used to support the electronic device 1000 in executing S403 and S404 in FIG4; and / or, to support the electronic device 1000 in executing S902, S903 and S905 in FIG9.
[0247] The transceiver unit may include a receiving unit and a transmitting unit, and may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or transceiver module. The operation and / or function of each unit in the electronic device 1000 are respectively for implementing the corresponding process of the vibration control method described in the above method embodiments. All relevant content of each step involved in the above method embodiments can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, it will not be repeated here.
[0248] Optionally, the electronic device 1000 shown in FIG10 may further include a storage unit (not shown in FIG10) storing a program or instructions. When the transceiver unit 1001 and the processing unit 1002 execute the program or instructions, the electronic device 1000 shown in FIG10 can perform the vibration control method described in the above method embodiments.
[0249] The technical effects of the electronic device 1000 shown in Figure 10 can be referred to the technical effects of the vibration control method described in the above method embodiments, and will not be repeated here.
[0250] In addition to being in the form of electronic device 1000, the technical solution provided in this application can also be a functional unit or chip in an electronic device, or a device used in conjunction with an electronic device.
[0251] This application also provides a chip system, including: a processor coupled to a memory, the memory being used to store programs or instructions, wherein when the program or instructions are executed by the processor, the chip system implements the methods in any of the above method embodiments.
[0252] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0253] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.
[0254] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0255] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0256] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run on a computer, it causes the computer to perform the aforementioned steps to implement the vibration control method described in the above embodiments.
[0257] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the vibration control method described in the above embodiments.
[0258] In addition, this application also provides an apparatus. This apparatus may specifically be a component or module, and may include one or more processors and a memory connected together. The memory stores a computer program. When the computer program is executed by one or more processors, the apparatus performs the vibration control methods described in the above-described method embodiments.
[0259] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0260] The steps of the methods or algorithms described in conjunction with the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an application-specific integrated circuit (ASIC).
[0261] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the above functional modules is only used as an example. In practical applications, the above 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. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0262] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be electrical, mechanical or other forms.
[0263] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0264] Computer-readable storage media include, but are not limited to, any of the following: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media capable of storing program code.
[0265] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A vibration control method characterized by, The method is applied to an electronic device, and the electronic device is a folding screen electronic device, and the method comprises the following steps: obtaining a use state of the electronic device; obtaining power information of the electronic device; obtaining a vibration parameter according to the use state and the power information; driving a motor to vibrate according to the vibration parameter.
2. The method of claim 1, wherein, The vibration parameter comprises a gain flag bit, and driving the motor to vibrate according to the vibration parameter comprises the following steps: obtaining a gain corresponding to the gain flag bit; obtaining a first vibration waveform; correcting the first vibration waveform based on the gain through an audio codec chip to obtain a second vibration waveform; driving the motor to vibrate according to the second vibration waveform.
3. The method of claim 2, wherein, The step of obtaining the first vibration waveform comprises the following steps: obtaining the first vibration waveform output by a motor service through a first channel of the audio codec chip, wherein the first channel corresponds to the gain, and the first vibration waveform is a default vibration waveform.
4. The method according to claim 2 or 3, characterized in that, The step of obtaining the vibration parameter according to the use state and the power information comprises the following steps: matching a corresponding gain flag bit according to the use state and the power information.
5. The method of claim 1, wherein, The vibration parameter comprises a third vibration waveform, and driving the motor to vibrate according to the vibration parameter comprises the following steps: obtaining the third vibration waveform output by a motor service through a motor chip; driving the motor to vibrate through the motor chip according to the third vibration waveform.
6. The method of claim 5, wherein, The step of obtaining the vibration parameter according to the use state and the power information comprises the following steps: matching a corresponding third vibration waveform according to the use state and the power information.
7. The method according to any one of claims 1 to 6, characterized in that, The electronic device is provided with a Hall sensor, and the step of obtaining the use state of the electronic device comprises the following steps: obtaining a Hall parameter detected by the Hall sensor; obtaining the use state according to the Hall parameter.
8. A vibration control method characterized by, The method is applied to an electronic device, and the electronic device is a folding screen electronic device, and the method comprises the following steps: The electronic device is in a first use state, and a first vibration parameter is obtained according to the first use state and first power information of the electronic device in response to a vibration event; driving a motor to vibrate according to the first vibration parameter; switching the electronic device to a second use state in response to a user operation in a vibration process, wherein the second use state is different from the first use state; obtaining a second vibration parameter according to the second use state and second power information of the electronic device; driving the motor to vibrate according to the second vibration parameter; wherein vibration feedback corresponding to the first vibration parameter and the second vibration parameter is the same or has a first deviation.
9. The method of claim 8, wherein, The vibration feedback comprises vibration acceleration, and the vibration feedback corresponding to the first vibration parameter and the second vibration parameter is the same or has a first deviation, which comprises the following steps: driving the motor to generate a first vibration acceleration according to the first vibration parameter, and driving the motor to generate a second vibration acceleration according to the second vibration parameter, wherein the first vibration acceleration and the second vibration acceleration are the same or have a first deviation.
10. The method according to claim 8 or 9, characterized in that, The first vibration parameter comprises a gain flag bit, and driving the motor to vibrate according to the first vibration parameter comprises the following steps: obtaining a gain corresponding to the gain flag bit; obtaining a first vibration waveform; The first vibration waveform is corrected based on the gain by an audio codec chip, and a second vibration waveform is obtained; The motor is driven to vibrate according to the second vibration waveform.
11. The method of claim 10, wherein, The first vibration waveform is obtained by: The first vibration waveform output by the motor service is obtained through a first channel of the audio codec chip, and the first channel corresponds to the gain, and the first vibration waveform is a default vibration waveform.
12. The method according to claim 10 or 11, characterized in that, The first vibration parameter is obtained according to the first use state and the first power information, including: According to the first use state and the first power information, the corresponding gain flag bit is matched.
13. The method of claim 8 or 9, wherein, The first vibration parameter includes a third vibration waveform, and the motor is driven to vibrate according to the first vibration parameter, including: The third vibration waveform output by the motor service is obtained through a motor chip; The motor is driven to vibrate according to the third vibration waveform through the motor chip.
14. The method of claim 13, wherein, The first vibration parameter is obtained according to the first use state and the first power information, including: According to the first use state and the first power information, the corresponding third vibration waveform is matched.
15. The method according to any one of claims 8-14, characterized in that, The electronic device is configured with a Hall sensor, and the first use state of the electronic device is obtained, including: A Hall parameter detected by the Hall sensor is obtained; The first use state is obtained according to the Hall parameter.
16. An electronic device, comprising: Including: A processor and a memory, the memory is coupled with the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor reads the computer instructions from the memory, makes the electronic device execute the method as claimed in any one of claims 1-7; or, makes the electronic device execute the method as claimed in any one of claims 8-15.
17. A computer readable storage medium characterized by: The computer readable storage medium includes a computer program, when the computer program runs on the electronic device, makes the electronic device execute the method as claimed in any one of claims 1-7; or, makes the electronic device execute the method as claimed in any one of claims 8-15.
18. A computer program product, characterised in that, When the computer program product runs on the computer, makes the computer execute the method as claimed in any one of claims 1-7; or, makes the computer execute the method as claimed in any one of claims 8-15.
Citation Information
Patent Citations
Vibration control method and electronic equipment
CN121055818A
Electronic equipment vibration control system, method, controller and equipment
CN108881615A
Display method and electronic equipment
CN111142745A
Motor vibration control method and electronic equipment
CN112532145A
Method for controlling vibration of electronic equipment, audio compiling and decoding module and electronic equipment
CN113765445A