CN113726957A - Vibration control method and device and electronic equipment - Google Patents

Vibration control method and device and electronic equipment Download PDF

Info

Publication number
CN113726957A
CN113726957A CN202111002512.8A CN202111002512A CN113726957A CN 113726957 A CN113726957 A CN 113726957A CN 202111002512 A CN202111002512 A CN 202111002512A CN 113726957 A CN113726957 A CN 113726957A
Authority
CN
China
Prior art keywords
vibration
module
duration
state
controlling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111002512.8A
Other languages
Chinese (zh)
Other versions
CN113726957B (en
Inventor
王楠楠
杨建起
卞学恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202111002512.8A priority Critical patent/CN113726957B/en
Publication of CN113726957A publication Critical patent/CN113726957A/en
Application granted granted Critical
Publication of CN113726957B publication Critical patent/CN113726957B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M19/00Current supply arrangements for telephone systems
    • H04M19/02Current supply arrangements for telephone systems providing ringing current or supervisory tones, e.g. dialling tone or busy tone
    • H04M19/04Current supply arrangements for telephone systems providing ringing current or supervisory tones, e.g. dialling tone or busy tone the ringing-current being generated at the substations
    • H04M19/047Vibrating means for incoming calls
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/52Details of telephonic subscriber devices including functional features of a camera
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application provides a vibration control method, comprising the following steps: obtaining a vibration request; obtaining the state of an image acquisition module of the electronic equipment based on the vibration request; if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode; and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode. According to the scheme, after the vibration request is received, the image acquisition module is determined to be in the running state, and when the image acquisition module is in the non-running state, the vibration module of the electronic equipment is controlled to respond to the vibration request based on the standard mode, so that a user can quickly know information corresponding to the vibration request; when the image acquisition module is in a running state, the vibration module is controlled to respond to the vibration request based on the protection mode so as to reduce the vibration energy generated by the vibration module and reduce the influence of the vibration module on the acquisition content of the image acquisition module.

Description

Vibration control method and device and electronic equipment
Technical Field
The present application relates to the field of electronic device control, and more particularly, to a vibration control method and apparatus, and an electronic device.
Background
A camera having a function of taking pictures and taking images has been applied to various electronic apparatuses as an indispensable structure of the electronic apparatuses.
However, when the camera is in use (for example, taking a picture and recording a picture), the equipment vibrates, which may cause the camera to take a picture and record a picture in a ripple manner, thereby affecting the quality of taking a picture and recording a picture.
Disclosure of Invention
In view of the above, the present application provides a vibration control method, comprising:
a vibration control method comprising:
obtaining a vibration request;
obtaining the state of an image acquisition module of the electronic equipment based on the vibration request;
if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode;
and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode.
Optionally, in the method, the vibration effect generated by the vibration module responding to the vibration request based on the standard mode is better than the vibration effect generated by the vibration module responding to the vibration request based on the protection mode.
Optionally, the method for controlling the vibration module to respond to the vibration request based on the protection mode includes:
generating a vibration instruction based on the vibration request, wherein the vibration instruction comprises a first duration, the first duration is less than a second duration, and the second duration is a vibration duration in a standard mode;
and controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction.
Optionally, in the method, the controlling, based on the vibration instruction, the vibration module to perform at least one vibration for an actual vibration duration based on the first duration includes:
starting a vibration module in the electronic equipment and starting a first timer;
and controlling the time of the vibration module in a preset state to correspond to the timing duration of the first timer, wherein the preset state comprises an operating state and/or a stopping state.
Optionally, in the method, controlling the running time and the stop time of the vibration module to respectively correspond to the timing duration of the first timer includes:
reading values of preset parameters based on the timed duration reaching the first timer, wherein the values of the preset parameters represent states of the vibration module, and the states comprise an operating state and a stopping state;
and controlling the switching state of the vibration module according to the value of the preset parameter, and updating the value of the preset parameter based on the switched state.
Optionally, in the method, after controlling the vibration module to perform at least one vibration for an actual vibration duration based on the first duration based on the vibration instruction, the method further includes:
and when the running time of the vibration module reaches the second duration, controlling to stop the vibration module.
Optionally, in the method, when the operating time of the vibration module reaches the second duration, controlling to stop the operation of the vibration module includes:
when a vibration module in the electronic equipment is started, controlling to start a second timer, wherein the timing duration of the second timer is the same as the second duration;
judging whether the vibration module is in a running state or not based on the timed duration reaching the second timer to obtain a judgment result;
and characterizing that the vibration module is in an operating state based on the judgment result, and finishing control to stop the vibration module at the actual vibration duration of the vibration module.
An electronic device, comprising:
a vibration module;
the image acquisition module is used for acquiring images;
a processor for obtaining a vibration request; obtaining the state of an image acquisition module of the electronic equipment based on the vibration request; if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode; and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode.
Optionally, in the electronic device, the processor is specifically configured to:
generating a vibration instruction based on the vibration request, wherein the vibration instruction comprises a first duration, the first duration is less than a second duration, and the second duration is a vibration duration in a standard mode;
and controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction.
An electronic device, comprising: a memory, a processor;
wherein, the memory stores a vibration control program;
the processor is used for loading and executing the vibration control program stored in the memory so as to realize the steps of the vibration control method.
A readable storage medium having stored thereon a computer program for being invoked and executed by a processor for carrying out the steps of the vibration control method according to any of the preceding claims.
As can be seen from the above technical solutions, compared with the prior art, the present application provides a vibration control method, including: obtaining a vibration request; obtaining the state of an image acquisition module of the electronic equipment based on the vibration request; if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode; and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode. According to the scheme, after the vibration request is received, the image acquisition module is determined to be in the running state, and when the image acquisition module is in the non-running state, the vibration module of the electronic equipment is controlled to respond to the vibration request based on the standard mode, so that a user can quickly know information corresponding to the vibration request; when the image acquisition module is in a running state, the vibration module is controlled to respond to the vibration request based on the protection mode so as to reduce the vibration energy generated by the vibration module and reduce the influence of the vibration module on the acquisition content of the image acquisition module.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an embodiment 1 of a vibration control method provided in the present application;
fig. 2 is a flowchart of embodiment 2 of a vibration control method provided in the present application;
fig. 3 is a flowchart of embodiment 3 of a vibration control method provided in the present application;
fig. 4 is a flowchart of embodiment 4 of a vibration control method provided in the present application;
fig. 5 is a flowchart of embodiment 5 of a vibration control method provided in the present application;
fig. 6 is a schematic diagram of a vibration module operating in two modes in embodiment 5 of a vibration control method provided in the present application;
fig. 7 is a flowchart of embodiment 6 of a vibration control method provided by the present application;
fig. 8 is a schematic diagram of a vibration module operating in two modes in embodiment 6 of a vibration control method provided in the present application;
fig. 9 is a schematic structural diagram of an embodiment of an electronic device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, it is a flowchart of embodiment 1 of a vibration control method provided in the present application, where the method is applied to an electronic device, and the method includes the following steps:
step S101: obtaining a vibration request;
wherein the vibration request is generated based on a certain application in the electronic device receiving information.
It should be noted that a plurality of applications run in the electronic device, and one or more of the applications can perform information reminding in a vibration manner. For example, various messages such as short messages and incoming calls can be reminded in a vibration mode.
Specifically, when receiving the information, the application uploads a notification of the received information to an operating system (such as an Android system), and the operating system determines that the system is set to a vibration mode, then the operating system generates a vibration request to a driver, and the driver drives the vibration module to vibrate according to the vibration request.
The vibration control method in the present application may be applied to an operating system or a driver. When the scheme of the application is applied to an operating system, the vibration request is uploaded to the operating system by an application program, so that the operating system drives the vibration module to vibrate through a driving program; when the scheme of the application is applied to the driver, the vibration request is sent to the driver by the operating system, so that the driver drives the vibration module to vibrate based on the vibration request.
Step S102: obtaining the state of an image acquisition module of the electronic equipment based on the vibration request;
after the vibration request is obtained, the state of an image acquisition module in the electronic equipment is determined, wherein the state comprises an operation state and a non-operation state.
In the application, different mode response vibration requests are set for the image acquisition modules in different states.
Wherein the mode includes a standard mode and a protection mode.
It should be noted that the protection mode is protection for the image capturing module in the operating state, and the triggering of the protection mode is to reduce the vibration energy of the vibration module, so as to reduce the influence of the vibration mode on the capturing content of the image capturing module.
Step S103: if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode;
the vibration module can adopt a rotor motor or a linear motor, and the composition structure and the form of the vibration module are not limited in the application.
When the image acquisition module is in a non-running state, the vibration energy of the vibration module does not need to be reduced, and the vibration request is responded based on a standard mode.
Specifically, the standard mode is to control the vibration module to vibrate according to preset vibration parameters (such as amplitude, frequency and/or duration) in the electronic device.
In specific implementation, based on vibration requests generated by different applications, values of the vibration parameters of the standard mode may be the same or different.
For example, when the electronic device receives an incoming call, the vibration amplitude, frequency and/or duration of the standard mode may be slightly larger than those of the electronic device when receiving a new message; or the vibration amplitude and frequency of the two can be the same, but the time length is different.
Step S104: and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode.
When the image acquisition module is in the running state, the vibration energy of the vibration module needs to be reduced, and the vibration request is responded based on the protection mode.
Specifically, the protection mode responds to the vibration request, and the vibration request can be ignored without triggering the vibration module; it is also possible to reduce the vibration energy, such as reducing the vibration amplitude, reducing the vibration frequency, or reducing the vibration duration, etc.
It should be noted that the vibration effect generated by the vibration module responding to the vibration request based on the standard mode is better than the vibration effect generated by the vibration module responding to the vibration request based on the protection mode.
Specifically, in the standard mode, at least one of the vibration duration, amplitude and frequency of the vibration module is greater than the value thereof in the protection mode. From the perspective of user experience, the vibration module vibrates in the standard mode, and the user experiences greater vibration of the electronic device than the vibration of the vibration module in the protection mode.
In summary, the vibration control method provided in this embodiment includes: obtaining a vibration request; obtaining the state of an image acquisition module of the electronic equipment based on the vibration request; if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode; and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode. According to the scheme, after the vibration request is received, the image acquisition module is determined to be in the running state, and when the image acquisition module is in the non-running state, the vibration module of the electronic equipment is controlled to respond to the vibration request based on the standard mode, so that a user can quickly know information corresponding to the vibration request; when the image acquisition module is in a running state, the vibration module is controlled to respond to the vibration request based on the protection mode so as to reduce the vibration energy generated by the vibration module and reduce the influence of the vibration module on the acquisition content of the image acquisition module.
As shown in fig. 2, is a flowchart of embodiment 2 of a vibration control method provided by the present application, and the method includes the following steps:
step S201: obtaining a vibration request;
step S202: obtaining the state of an image acquisition module of the electronic equipment based on the vibration request;
step S203: if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode;
steps S201 to 203 are the same as steps S101 to 103 in embodiment 1, and are not described in detail in this embodiment.
Step S204: if the image acquisition module is in a running state, generating a vibration instruction based on the vibration request, wherein the vibration instruction comprises a first time length, the first time length is less than a second time length, and the second time length is the vibration time length in a standard mode;
when the scheme of the application is applied to the driver, the driver acquires the state of the image acquisition module through a General-purpose input/output (GPIO) interface after receiving the vibration request. The vibration request is sent to the driver by the operating system, and the vibration duration carried in the vibration request is a second duration, and the second duration is the vibration duration in the standard mode. And when the driver determines that the image acquisition module is in the running state, generating a vibration instruction based on the second time length, wherein the vibration time length included in the vibration instruction is a first time length, and the first time length is smaller than the second time length.
When the scheme of the application is applied to an operating system, an application program sends request information requesting response to the operating system, the operating system determines that the current system is set to be in a vibration mode after receiving the request information, acquires the state of an image acquisition module through information of a system layer, generates a vibration instruction based on the fact that the state of the image acquisition module is an operation state, and sends the vibration instruction to a driving program, so that the driving program drives a vibration module to vibrate based on the first time length in the vibration instruction.
Wherein, in this application, the length of time split is into a plurality of first duration with the vibration of standard mode to make the actual vibration time of this vibration module shorter, reduce the energy that the vibration module vibration produced.
It should be noted that the vibration module vibrates based on the vibration commands, the vibration commands are spaced, the first time length is the time length for controlling the vibration module to vibrate, and the time interval is formed between the two vibrations.
For example, the second duration is 1 second, the first duration is 100 milliseconds, the interval is 100 milliseconds or 50 milliseconds, and so on.
Specifically, the vibration request may also carry other vibration parameters, such as amplitude, frequency, and the like, and in specific implementation, the vibration energy generated by the vibration module may be further reduced by reducing the amplitude and/or the frequency according to an actual situation.
Step S205: and controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction.
And sending the vibration instruction to a vibration module so that the vibration module vibrates based on the first time length in the vibration instruction as the actual vibration time length.
In summary, in the vibration control method provided in this embodiment, the controlling the vibration module to respond to the vibration request based on the protection mode includes: generating a vibration instruction based on the vibration request, wherein the vibration instruction comprises a first duration, the first duration is less than a second duration, and the second duration is a vibration duration in a standard mode; and controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction. In this scheme, the vibration module is based on protection mode response vibration request, and the length of vibration is less than the standard mode response, reduces the vibration energy that the vibration module produced, reduces the vibration module to the influence of image acquisition module collection content.
As shown in fig. 3, is a flowchart of embodiment 3 of a vibration control method provided by the present application, and the method includes the following steps:
step S301: obtaining a vibration request;
step S302: obtaining the state of an image acquisition module of the electronic equipment based on the vibration request;
step S303: if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode;
step S304: if the image acquisition module is in a running state, generating a vibration instruction based on the vibration request;
steps S301 to 304 are the same as steps S201 to 204 in embodiment 2, and are not described in detail in this embodiment.
Step S305: starting a vibration module in the electronic equipment and starting a first timer;
and starting a vibration module in the electronic equipment based on the vibration instruction, and simultaneously starting a first timer.
Wherein the timing duration of the first timer is a first duration.
Step S306: and controlling the time of the vibration module in a preset state to correspond to the timing duration of the first timer, wherein the preset state comprises an operating state and/or a stopping state.
And controlling the state switching of the vibration module based on the timing duration of the first timer.
The preset state comprises an operation state and/or a stop state, and correspondingly, the maintaining time of the operation state and/or the maintaining time of the stop state of the vibration module are controlled to correspond to the timing duration of the first timer.
In specific implementation, when a vibration module of the electronic device is started, a first timer is started, and when the first timer reaches a timing duration, the state of the vibration module is switched.
In specific implementation, a plurality of timers are arranged in the vibration module, and different timers correspond to different timing durations. The first timer is a timer set for the protection mode in the vibration module.
As a specific example, the operation state and the stop state of the vibration module adopt the same timing duration, such as 100 milliseconds, the first timer is started when the vibration module is started, the vibration module is triggered to stop operating and switched to the stop state when the first timer reaches the timing duration, the first timer is started again when the stop state is entered, and the vibration module is triggered to start operating, switched to the operation state and started again when the first timer reaches the timing duration, so that the vibration module vibrates cyclically based on the first timer.
As a specific example, the active state and the inactive state of the vibration module may be timed to occur at different durations, such as 100 milliseconds for the active timer, 50 milliseconds for the inactive timer,
the vibration module is started when the vibration module is started, the vibration module is triggered to stop running and is switched to a stop state when the timer reaches the timing duration of 100 milliseconds, the timer is started again when the vibration module enters the stop state, the vibration module is triggered to start running and is switched to a running state when the first timer reaches the timing duration of 50 milliseconds, and the timer is started again, so that the vibration module vibrates circularly based on the first timer.
In summary, in the vibration control method provided in this embodiment, controlling the vibration module to execute at least one vibration for an actual vibration duration based on the first duration based on the vibration instruction includes: starting a vibration module in the electronic equipment and starting a first timer; and controlling the time of the vibration module in a preset state to correspond to the timing duration of the first timer, wherein the preset state comprises an operating state and/or a stopping state. In the scheme, the state maintaining time of the vibration module is controlled based on the set timing duration of the timer, and the process is simple and easy to implement.
As shown in fig. 4, is a flowchart of embodiment 4 of a vibration control method provided by the present application, where the method includes the following steps:
step S401: obtaining a vibration request;
step S402: obtaining the state of an image acquisition module of the electronic equipment based on the vibration request;
step S403: if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode;
step S404: if the image acquisition module is in a running state, generating a vibration instruction based on the vibration request;
step S405: starting a vibration module in the electronic equipment and starting a first timer;
steps S401 to 405 are the same as steps S301 to 305 in embodiment 3, and are not described in detail in this embodiment.
Step S406: reading a value of a preset parameter based on the timed duration reaching the first timer, wherein the value of the preset parameter represents the state of the vibration module;
wherein the states include an active state and a inactive state.
In specific implementation, a work queue cam _ work is set in a driver, and the work queue in the driver executes actions of controlling the vibration module to start vibration and end vibration and controlling the start of a timer.
Specifically, the value of the preset parameter is updated when the vibration module switches the state each time, the preset parameter represents the state of the vibration module, the working queue selects the corresponding timing duration according to the state, and the state is combined to control the vibration module to switch the state when the timing duration is over.
The value of the preset parameter represents the state of the vibration module, and when the timing duration of the first timer is reached, the state of the vibration module needs to be switched, and at the moment, the value of the preset parameter is read, so that the current state of the vibration module is determined, and a basis is provided for subsequent state switching.
Step S407: and controlling the switching state of the vibration module according to the value of the preset parameter, and updating the value of the preset parameter based on the switched state.
And determining the current state of the vibration module according to the read value of the preset parameter, controlling the vibration module to be switched to another state, and updating the value of the preset parameter.
The value of the preset parameter may be 0 or 1, for example, 0 represents a stop state, and 1 represents an operation state.
As an example, when the value of the preset parameter is 1, it represents that the vibration module is in an operating state at this time, and when the timing duration reaching the first timer represents that the state needs to be switched, it needs to be switched to a stop state, and the stop state is switched, and the value of the preset parameter is updated to be 0.
As an example, when the value of the preset parameter is 0, it represents that the vibration module is in a stop state at this time, and when the timing duration reaching the first timer represents that the state needs to be switched, it needs to be switched to an operation state, and the operation state is switched to an operation state, and the value of the preset parameter is updated to be 1.
Of course, in the specific implementation, the corresponding relationship between the preset parameter and the state of the vibration module may be represented by selecting different values according to the actual situation, such as high and low levels or other manners, which is not limited in this application.
In summary, in the vibration control method provided in this embodiment, controlling the running time and the stop time of the vibration module to respectively correspond to the timing duration of the first timer includes: reading values of preset parameters based on the timed duration reaching the first timer, wherein the values of the preset parameters represent states of the vibration module, and the states comprise an operating state and a stopping state; and controlling the switching state of the vibration module according to the value of the preset parameter, and updating the value of the preset parameter based on the switched state. In the scheme, a parameter for representing the state of the vibration module is set, the current state of the vibration module can be determined by reading the value of the parameter, the current state of the vibration module and the state to be switched can be rapidly and accurately determined when the state of the vibration module is switched, and the data processing capacity is small.
As shown in fig. 5, is a flowchart of embodiment 5 of a vibration control method provided by the present application, and the method includes the following steps:
step S501: obtaining a vibration request;
step S502: obtaining the state of an image acquisition module of the electronic equipment based on the vibration request;
step S503: if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode;
step S504: if the image acquisition module is in a running state, generating a vibration instruction based on the vibration request;
step S505: controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction;
steps S501 to 505 are the same as steps S201 to 205 in embodiment 2, and are not described in detail in this embodiment.
Step S506: and when the running time of the vibration module reaches the second duration, controlling to stop the vibration module.
The running duration comprises the time of the vibration module starting to run to the current moment based on the vibration instruction.
The operation time period comprises the total time period of the vibration module in the operation state and the stop state.
Wherein the second duration is a duration that the vibration module vibrates based on the standard mode.
The running time of the vibration module is consistent with the second duration, the user is prompted by the vibration which is split into a plurality of times and is short, the user of the electronic equipment can be guaranteed to have tactile feeling for the vibration prompt of the user, and the purpose of prompting the user is achieved on the premise of protecting the acquisition effect of the image acquisition module.
Fig. 6 is a schematic diagram showing the operation of the vibration module in two modes, wherein 1 is used to indicate the operation state of the vibration module, and 0 is used to indicate the stop state. In the standard mode, the vibration module is always in the operating state for the second duration, and the whole process of the second duration is maintained, and in fig. 6, the second duration is 1 second. Wherein in the protection mode the vibration module is in operation for a first period of time, the next period of time is in rest, and then in operation for the next period of time until the second period of time, the first period of time being 100 milliseconds in fig. 6.
In summary, the vibration control method provided in this embodiment further includes: and when the running time of the vibration module reaches the second duration, controlling to stop the vibration module. In the scheme, the second time length is set, the second time length is the time length of the vibration module in the standard mode, the longer vibration is split into several times of very short vibrations to prompt a user, and the purpose of prompting the user is achieved on the premise of protecting the acquisition effect of the image acquisition module.
As shown in fig. 7, is a flowchart of embodiment 6 of a vibration control method provided by the present application, and the method includes the following steps:
step S701: obtaining a vibration request;
step S702: obtaining the state of an image acquisition module of the electronic equipment based on the vibration request;
step S703: if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode;
step S704: if the image acquisition module is in a running state, generating a vibration instruction based on the vibration request;
step S705: controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction;
steps S701 to 705 are the same as steps S501 to 505 in embodiment 5, and are not described in detail in this embodiment.
Step S706: when a vibration module in the electronic equipment is started, controlling to start a second timer, wherein the timing duration of the second timer is the same as the second duration;
and starting a vibration module in the electronic equipment based on the vibration instruction, and simultaneously starting a second timer.
The second timer is a timer set corresponding to the standard mode of the vibration module.
Step S707: judging whether the vibration module is in a running state or not based on the timed duration reaching the second timer to obtain a judgment result;
after the vibration module is started, the second timer is always used for timing when the vibration module is in an operating state and a stopping state.
When the timing duration of the second timer is reached, judging whether the vibration module is in an operating state, if the state of the vibration module is in the operating state, representing that the timing duration of the first timer is not reached, and vibrating the vibration module at the moment; if the state of the vibration module is a stop state, representing the timing duration reaching the first timer, and the vibration module does not vibrate at the moment.
Specifically, when the time duration of the second timer is reached, the operation of the vibration module is to be ended, and if the vibration module is in a stop state, the operation of the vibration module can be ended without switching the vibration module to be in an operation state; if the vibration module is in the running state, the vibration module can wait for the completion of the running state of the vibration module so as to prevent the contradiction between the second timer and the vibration module controlled by the first timer.
Step S708: and characterizing that the vibration module is in an operating state based on the judgment result, and finishing control to stop the vibration module at the actual vibration duration of the vibration module.
Wherein, the actual vibration duration is the vibration duration of the vibration module in the operating state.
When the timing duration of the second timer is reached, the vibration module is in the running state, the timing duration of the first timer is not reached, the running state of the vibration module is maintained, the vibration module is prevented from suddenly stopping in the running process, and the vibration module is stopped until the vibration module is switched to the stopping state.
Specifically, when the actual vibration duration of the vibration module is over, the vibration module is switched from the running state to the stopped state, and the vibration module is controlled to stop at the moment to complete the response to the vibration request.
Fig. 8 is a schematic diagram showing the operation of the vibration module in two modes, wherein 1 is used to indicate the operation state of the vibration module, and 0 is used to indicate the stop state. In the standard mode, the vibration module is always in the operating state for the second duration, and the whole process of the second duration is maintained, and in fig. 8, the second duration is 1 second. In the protection mode, the vibration module is in an operating state within a first time period (200 milliseconds), the next time period (400 milliseconds) is in a stop state, then the vibration module is in the operating state within the next time period (100 milliseconds) until the second time period is finished, and the vibration module is stopped at the end of the first time period.
In summary, in the vibration control method provided in this embodiment, when the operation time of the vibration module reaches the second duration, controlling to stop the operation of the vibration module includes: when a vibration module in the electronic equipment is started, controlling to start a second timer, wherein the timing duration of the second timer is the same as the second duration; judging whether the vibration module is in a running state or not based on the timed duration reaching the second timer to obtain a judgment result; and characterizing that the vibration module is in an operating state based on the judgment result, and finishing control to stop the vibration module at the actual vibration duration of the vibration module. In the scheme, based on the timing duration of the second timer, the response to the vibration request is realized by controlling the whole vibration process of the vibration module, the timing duration of the second timer is reached, but the vibration module is still in the running state, the vibration process of the vibration module is ensured to be complete, the actual vibration duration of the vibration module is ended, and the vibration module is controlled to stop when being switched to the stop state, so that the response to the current vibration request is completed, namely, the response to the vibration request is ensured, and the safety of the vibration module is protected.
Corresponding to the embodiment of the vibration control method provided by the application, the application also provides an embodiment of the electronic device applying the vibration control method.
Fig. 9 is a schematic structural diagram of an embodiment of an electronic device provided in the present application, where the electronic device includes the following structures: a vibration module 901, an image acquisition module 902 and a processor 903;
an image acquisition module 902 for image acquisition;
a processor 903 for obtaining a vibration request; obtaining the state of an image acquisition module of the electronic equipment based on the vibration request; if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode; and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode.
In specific implementation, the vibration module may adopt a rotor motor or a linear motor, and the composition structure and form of the vibration module are not limited in this application.
It should be noted that, in the electronic device, the arrangement positions of the vibration module and the image capturing module may not be adjacent to each other, but the stability of the image capturing module is affected when the vibration module accumulates a certain amount of generated vibration energy during the vibration process.
Wherein the vibration effect produced by the vibration module responding to the vibration request based on the standard mode is better than the vibration effect produced by the vibration module responding to the vibration request based on the protection mode.
Optionally, the processor is specifically configured to:
generating a vibration instruction based on the vibration request, wherein the vibration instruction comprises a first duration, the first duration is less than a second duration, and the second duration is a vibration duration in a standard mode;
and controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction.
Optionally, the processor is specifically configured to:
starting a vibration module in the electronic equipment and starting a first timer;
and controlling the time of the vibration module in a preset state to correspond to the timing duration of the first timer, wherein the preset state comprises an operating state and/or a stopping state.
Optionally, the processor is specifically configured to:
reading values of preset parameters based on the timed duration reaching the first timer, wherein the values of the preset parameters represent states of the vibration module, and the states comprise an operating state and a stopping state;
and controlling the switching state of the vibration module according to the value of the preset parameter, and updating the value of the preset parameter based on the switched state.
Optionally, the processor is further configured to:
and when the running time of the vibration module reaches the second duration, controlling to stop the vibration module.
Optionally, the processor is specifically configured to:
when a vibration module in the electronic equipment is started, controlling to start a second timer, wherein the timing duration of the second timer is the same as the second duration;
judging whether the vibration module is in a running state or not based on the timed duration reaching the second timer to obtain a judgment result;
and characterizing that the vibration module is in an operating state based on the judgment result, and finishing control to stop the vibration module at the actual vibration duration of the vibration module.
For functional explanation of the processor, reference is made to the foregoing method embodiments, and details are not repeated in the device embodiments.
In summary, the present embodiment provides a vibration control apparatus, including: a vibration module; the image acquisition module is used for acquiring images; a processor for obtaining a vibration request; obtaining the state of an image acquisition module of the electronic equipment based on the vibration request; if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode; and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode. According to the scheme, after the vibration request is received, the image acquisition module is determined to be in the running state, and when the image acquisition module is in the non-running state, the vibration module of the electronic equipment is controlled to respond to the vibration request based on the standard mode, so that a user can quickly know information corresponding to the vibration request; when the image acquisition module is in a running state, the vibration module is controlled to respond to the vibration request based on the protection mode so as to reduce the vibration energy generated by the vibration module and reduce the influence of the vibration module on the acquisition content of the image acquisition module.
Corresponding to the embodiment of the vibration control method provided by the application, the application also provides a readable storage medium corresponding to the vibration control method.
Wherein, this electronic equipment includes: a memory, a processor;
wherein, the memory stores a vibration control program;
the processor is used for loading and executing the vibration control program stored in the memory so as to realize the steps of the vibration control method.
Specifically, the implementation control method of the electronic device may refer to the foregoing control method embodiment.
Wherein the readable storage medium has stored thereon a computer program, which is called up and executed by a processor, implementing the steps of the vibration control method according to any of the preceding claims.
Specifically, the computer program stored in the readable storage medium executes the vibration control method, and reference may be made to the foregoing embodiments of the vibration control method.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device provided by the embodiment, the description is relatively simple because the device corresponds to the method provided by the embodiment, and the relevant points can be referred to the method part for description.
The previous description of the provided embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features provided herein.

Claims (10)

1. A vibration control method comprising:
obtaining a vibration request;
obtaining the state of an image acquisition module of the electronic equipment based on the vibration request;
if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode;
and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode.
2. The method of claim 1, wherein the vibration pattern produces a vibration effect in response to the vibration request based on a standard mode that is greater than a vibration effect produced by the vibration pattern in response to the vibration request based on a protected mode.
3. The method of claim 1, controlling the vibration module to respond to the vibration request based on a protected mode, comprising:
generating a vibration instruction based on the vibration request, wherein the vibration instruction comprises a first duration, the first duration is less than a second duration, and the second duration is a vibration duration in a standard mode;
and controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction.
4. The method of claim 3, the controlling the vibration module based on the vibration instruction to perform at least one vibration for an actual vibration duration based on the first duration, comprising:
starting a vibration module in the electronic equipment and starting a first timer;
and controlling the time of the vibration module in a preset state to correspond to the timing duration of the first timer, wherein the preset state comprises an operating state and/or a stopping state.
5. The method of claim 4, wherein controlling the run time and the stop time of the vibration module to correspond to the timing duration of the first timer, respectively, comprises:
reading values of preset parameters based on the timed duration reaching the first timer, wherein the values of the preset parameters represent states of the vibration module, and the states comprise an operating state and a stopping state;
and controlling the switching state of the vibration module according to the value of the preset parameter, and updating the value of the preset parameter based on the switched state.
6. The method of claim 3, further comprising, after controlling the vibration module to perform at least one vibration for an actual vibration duration based on the first duration based on the vibration instruction:
and when the running time of the vibration module reaches the second duration, controlling to stop the vibration module.
7. The method of claim 6, wherein controlling the vibration module to stop operating when the vibration module operating time reaches the second duration comprises:
when a vibration module in the electronic equipment is started, controlling to start a second timer, wherein the timing duration of the second timer is the same as the second duration;
judging whether the vibration module is in a running state or not based on the timed duration reaching the second timer to obtain a judgment result;
and characterizing that the vibration module is in an operating state based on the judgment result, and finishing control to stop the vibration module at the actual vibration duration of the vibration module.
8. An electronic device, comprising:
a vibration module;
the image acquisition module is used for acquiring images;
a processor for obtaining a vibration request; obtaining the state of an image acquisition module of the electronic equipment based on the vibration request; if the image acquisition module is in a non-running state, controlling a vibration module of the electronic equipment to respond to the vibration request based on a standard mode; and if the image acquisition module is in a running state, controlling the vibration module to respond to the vibration request based on a protection mode.
9. The electronic device of claim 8, the processor to:
generating a vibration instruction based on the vibration request, wherein the vibration instruction comprises a first duration, the first duration is less than a second duration, and the second duration is a vibration duration in a standard mode;
and controlling the vibration module to execute at least one vibration for the actual vibration duration based on the first duration based on the vibration instruction.
10. A readable storage medium having stored thereon a computer program, which is invoked and executed by a processor, implementing the steps of the vibration control method according to any of the claims 1-7.
CN202111002512.8A 2021-08-30 2021-08-30 Vibration control method, electronic device and readable storage medium Active CN113726957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111002512.8A CN113726957B (en) 2021-08-30 2021-08-30 Vibration control method, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111002512.8A CN113726957B (en) 2021-08-30 2021-08-30 Vibration control method, electronic device and readable storage medium

Publications (2)

Publication Number Publication Date
CN113726957A true CN113726957A (en) 2021-11-30
CN113726957B CN113726957B (en) 2022-11-22

Family

ID=78679002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111002512.8A Active CN113726957B (en) 2021-08-30 2021-08-30 Vibration control method, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN113726957B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110053577A1 (en) * 2009-08-31 2011-03-03 Lee Changkee Methods and apparatus for communicating by vibrating or moving mobile devices
CN105827843A (en) * 2016-03-29 2016-08-03 乐视控股(北京)有限公司 Vibration separation control method and device, and mobile phone
CN108900702A (en) * 2018-06-08 2018-11-27 Oppo广东移动通信有限公司 The treating method and apparatus of vibration prompt
CN111829742A (en) * 2019-03-29 2020-10-27 Oppo(重庆)智能科技有限公司 Electronic equipment vibration testing method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110053577A1 (en) * 2009-08-31 2011-03-03 Lee Changkee Methods and apparatus for communicating by vibrating or moving mobile devices
CN105827843A (en) * 2016-03-29 2016-08-03 乐视控股(北京)有限公司 Vibration separation control method and device, and mobile phone
CN108900702A (en) * 2018-06-08 2018-11-27 Oppo广东移动通信有限公司 The treating method and apparatus of vibration prompt
CN111829742A (en) * 2019-03-29 2020-10-27 Oppo(重庆)智能科技有限公司 Electronic equipment vibration testing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113726957B (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN110162343B (en) Application starting method and device, electronic equipment and storage medium
JP2014209325A (en) Systems and methods for syncing haptic feedback calls
KR20200054305A (en) Bandwidth switching method, terminal device and computer storage medium
CN105260655B (en) Method, device and system for starting protection of application program
CN106054075A (en) Method for determining vibration motor driving parameter and electronic device
CN111913851A (en) Process monitoring method, system, terminal and storage medium
KR102551251B1 (en) Timer control method and timer control device
CN113726957B (en) Vibration control method, electronic device and readable storage medium
CN107222618A (en) Terminal screenshotss method and device
CN104702534A (en) Method and device for processing data of multi-process sharing port
CN106293792B (en) Software starting method and device
CN103458092A (en) Mobile terminal touch player and touch play method
CN111131696B (en) Focusing method, device, terminal and storage medium
CN112637422A (en) Vibration adjustment method, device, storage medium and electronic equipment
CN116578422A (en) Resource allocation method and electronic equipment
CN114071687B (en) Method, device and terminal for processing uplink Timing Advance (TA) value
CN111885746B (en) Network connection method and device of terminal equipment
CN113489839A (en) Event reminding method and device, storage medium and electronic equipment
CN111796958A (en) Transaction anti-hanging method and device under Dubbo frame
JP2006072698A (en) Power-saving-adapted device
CN117545031A (en) Message notification method, terminal and network equipment
CN104052877A (en) Mobile terminal and vibration control method thereof
CN110716759A (en) Electronic device, computer readable storage medium and operation parameter configuration method
JP5472177B2 (en) Information processing program, information processing apparatus, and information processing method
CN112672046B (en) Method and device for storing continuous shooting images, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant