WO2023005703A9 - Vibration control method and apparatus, device, and storage medium - Google Patents

Vibration control method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2023005703A9
WO2023005703A9 PCT/CN2022/106179 CN2022106179W WO2023005703A9 WO 2023005703 A9 WO2023005703 A9 WO 2023005703A9 CN 2022106179 W CN2022106179 W CN 2022106179W WO 2023005703 A9 WO2023005703 A9 WO 2023005703A9
Authority
WO
WIPO (PCT)
Prior art keywords
vibration
target
time
recovery
component
Prior art date
Application number
PCT/CN2022/106179
Other languages
French (fr)
Chinese (zh)
Other versions
WO2023005703A1 (en
Inventor
张其田
洪楷
徐士立
刘专
王昊
张亚军
吴海洋
刘思亮
杨奕青
尤翰昊
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023005703A1 publication Critical patent/WO2023005703A1/en
Publication of WO2023005703A9 publication Critical patent/WO2023005703A9/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/25Output arrangements for video game devices
    • A63F13/28Output arrangements for video game devices responding to control signals received from the game device for affecting ambient conditions, e.g. for vibrating players' seats, activating scent dispensers or affecting temperature or light
    • A63F13/285Generating tactile feedback signals via the game input device, e.g. force feedback
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/49Saving the game status; Pausing or ending the game
    • A63F13/493Resuming a game, e.g. after pausing, malfunction or power failure
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/803Driving vehicles or craft, e.g. cars, airplanes, ships, robots or tanks

Definitions

  • the present application relates to the field of Internet technology, specifically to the field of computer technology, and in particular to a vibration control method, device, equipment and storage medium.
  • the terminal when there is a vibrating object that needs to vibrate in the business scene presented by the application (such as shooting game scene, driving game scene, music playing scene, etc.), the terminal (such as smart phone, tablet computer, etc.) can drive the built-in vibration The component vibrates, thereby giving the user the experience of vibrating effects.
  • the existing terminal drives the vibrating component to vibrate as follows: setting a target duration for the vibrating component, and controlling the vibrating component to stop vibrating when the vibrating component reaches the target duration.
  • Such a vibration control method is relatively simple, which makes it impossible to achieve a perfect fit between the vibration effect of the vibration component and the application, which affects the user experience, and also brings loss to the vibration component when the vibration duration is fixed and long.
  • the target service scene of the target application includes a target vibration object that needs to be vibrated, notify the terminal to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target service scene ;
  • the target vibration waveform file When there is a vibration suspension event about the vibration component originating from the target application, record the target vibration waveform file and the current vibration time;
  • the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to : when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
  • the embodiment of the present application also provides a vibration control method executed by a terminal, the method comprising:
  • the target service scene of the target application includes a target vibration object to be vibrated, in the target service scene, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object;
  • the target vibration waveform file includes a plurality of vibration attribute values, and when there is the vibration suspension event, the The vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, and the current vibration time and the target vibration waveform file are recorded by the target application;
  • the vibration recovery notification is generated according to the vibration recovery time and the recorded target vibration waveform file;
  • the vibration recovery time is determined by the target application to restore the vibration of the vibration component When, and the business scenario of the target application is the target business scenario, it is generated based on the current vibration time;
  • the vibration recovery time and the target vibration waveform file are determined according to the vibration recovery notification, and the vibration component is driven to continue vibrating according to the determined vibration recovery time and the target vibration waveform file.
  • the embodiment of the present application also provides a vibration control method executed by a terminal, the method comprising:
  • the target service scene of the target application includes a target vibration object to be vibrated, in the target service scene, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object;
  • the target vibration waveform file When there is a vibration suspension event about the vibration component originating from the target application, record the target vibration waveform file and the current vibration time;
  • the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to : when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
  • the vibration component is driven to continue to vibrate.
  • the embodiment of the present application also provides a vibration control device, which includes:
  • the control unit is configured to notify the terminal to drive the mobile device in the terminal according to the target vibration waveform file associated with the target vibration object in the target service scenario when the target application includes a target vibration object that needs to vibrate.
  • the vibrating components vibrate;
  • a recording unit configured to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component originating from the target application;
  • the target vibration waveform file includes a plurality of vibration attribute values, the The current vibration time refers to: when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
  • a processing unit configured to generate a restoration vibration time based on the current vibration time if the business scenario of the target application is the target business scenario when the vibration of the vibration component needs to be restored;
  • the control unit is further configured to generate a vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, and send the vibration recovery notification to the terminal, so that the terminal can recover The notification drives the vibrating component to continue vibrating.
  • the embodiment of the present application also provides a vibration control device, which includes:
  • the driving unit is configured to drive the vibration component in the terminal to perform vibration in the target service scenario according to the target vibration waveform file associated with the target vibration object when the target application’s target service scenario includes a target vibration object that needs to vibrate. vibration;
  • the drive unit is configured to control the vibration component to suspend vibration when there is a vibration suspension event about the vibration component originating from the target application;
  • the target vibration waveform file includes a plurality of vibration attribute values.
  • the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, and the current vibration time and the target vibration waveform file are recorded by the target application;
  • the receiving unit is configured to receive the vibration recovery notification sent by the target application, the vibration recovery notification is generated according to the recovery vibration time and the recorded target vibration waveform file; the recovery vibration time is determined by the target application to restore the When the vibration component is vibrating, and the business scenario of the target application is the target business scenario, it is generated based on the current vibration time;
  • the determination unit is further configured to determine a recovery vibration time and a target vibration waveform file according to the vibration recovery notification, and drive the vibration component to continue vibrating according to the determined recovery vibration time and target vibration waveform file.
  • the embodiment of the present application also provides a vibration control device, which includes:
  • the driving unit is configured to drive the vibration component in the terminal according to the target vibration waveform file associated with the target vibration object in the target business scenario when the target service scene presented by the target application includes a target vibration object that needs to vibrate to vibrate;
  • a recording unit configured to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component originating from the target application;
  • the target vibration waveform file includes a plurality of vibration attribute values, the The current vibration time refers to: when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
  • a processing unit configured to generate a restoration vibration time based on the current vibration time if the business scenario presented by the target application is the target business scenario when the vibration of the vibration component needs to be restored;
  • the driving unit is further configured to drive the vibrating component to continue vibrating according to the resuming vibration time and the recorded target vibration waveform file.
  • the embodiment of the present application also provides a computer device, the computer device includes an input interface and an output interface, and the computer device also includes:
  • processor adapted to implement one or more computer readable instructions
  • a non-volatile computer-readable storage medium stores one or more computer-readable instructions, and the one or more computer-readable instructions are adapted to be loaded by the processor and execute the above-mentioned The steps of any vibration control method.
  • the embodiment of the present application also provides a non-volatile computer-readable storage medium, the computer-readable storage medium stores one or more computer-readable instructions, and the one or more computer-readable instructions are suitable for The above-mentioned vibration control method is loaded and executed by the processor.
  • Fig. 1a is a schematic diagram of a target application presenting a business scenario provided by an embodiment of the present application
  • Fig. 1b is a schematic diagram of another target application presenting business scenario provided by the embodiment of the present application.
  • Fig. 2 is a schematic flow chart of a vibration control method provided in an embodiment of the present application
  • Fig. 3a is a schematic diagram of recording the current vibration time provided by the embodiment of the present application.
  • Fig. 3b is a schematic diagram of restoring the vibration of the vibration component based on the current vibration time provided by the embodiment of the present application;
  • Fig. 4 is a schematic flow chart of a vibration control method provided by another embodiment of the present application.
  • Fig. 5a is a schematic diagram of processing logic of a system vibration interface provided by an embodiment of the present application.
  • Fig. 5b is a schematic diagram of a target application recording the target vibration waveform file and the current vibration time through the vibration controller provided by the embodiment of the present application;
  • Fig. 5c is a schematic diagram of a target application delivering a target vibration waveform file and current vibration time through a vibration controller provided by an embodiment of the present application;
  • Fig. 5d is a schematic flow diagram of a target application interacting with the underlying hardware through the system vibration interface to realize vibration control of the vibration component provided by the embodiment of the present application;
  • Fig. 6 is a schematic flowchart of a vibration control method provided by another embodiment of the present application.
  • Fig. 7 is a schematic structural diagram of a vibration control device provided by an embodiment of the present application.
  • Fig. 8 is a schematic structural diagram of a vibration control device provided by another embodiment of the present application.
  • Fig. 9 is a schematic structural diagram of a vibration control device provided in another embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the target application mentioned later may be any application program running on a computer device, and the so-called application program can be understood as a computer program for completing one or more specific tasks.
  • the target application mentioned later may be any of the following: cloud application, APP (application, client), light application, web application, and so on.
  • cloud application refers to the application program installed and running on the cloud server
  • APP refers to the application program installed and running on the terminal
  • Functional Quick App which usually runs as a subroutine in other clients
  • web application refers to an application that supports opening and running in the web page displayed by the browser APP.
  • the target application mentioned later may be any of the following: game application, instant messaging application, content sharing application, audio and video playing application, and so on.
  • the so-called game application refers to: an application program that provides game services for users to support users to play games
  • the so-called instant messaging application refers to: an application program that provides users with instant messaging services to support instant information interaction between users
  • the so-called The content sharing application refers to an application that provides users with content sharing services to support users to share content with the outside world, as well as viewing and commenting on other people’s shared content
  • audio and video playback applications refers to: provides users with audio and video playback services to support users An application that plays associated audio or video.
  • the target application may be various applications.
  • the target application is an APP, and from the perspective of the application business of the application, the target application is a game application; then, the target application can be any ordinary game application, the so-called The common game application of ’ refers to a game application installed and running on a terminal.
  • the target application is a cloud application from the perspective of the running mode of the application, and the target application is a game application from the perspective of the application business of the application; then, the target application can be understood as, the target application It can be understood as any cloud game application.
  • cloud games are based on cloud computing technology, which provides powerful graphics processing capabilities and data computing capabilities for cloud games; the so-called cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers , so that various application systems can obtain computing power, storage space and information services as needed.
  • the target application can present one or more business scenarios to the user.
  • the service scenario presented by the target application may include but not limited to: a session scenario of instant messaging.
  • the business scenarios presented by the target application may include but not limited to: an audio and video search scenario for searching a certain audio or video, and an audio and video playback scenario for playing a certain audio or video.
  • the business scenarios presented by the target application may include, but are not limited to: scenes in which avatars in games drive vehicles (such as cars, boats, etc.), scenes in which avatars in games hold guns A scene of shooting, a scene of virtual characters dancing in the game, a scene of at least two virtual characters in the game competing in a car, and so on.
  • any business scene presented by the target application if the any business scene includes a vibrating object that needs to vibrate, then the any business scene may be called a vibration scene of the target application.
  • the scene of a virtual character driving a vehicle presented in a game application since the scene includes a vibration object that needs to vibrate a vehicle, the scene of a virtual character driving a vehicle presented in a game application can be called is the vibration scene of the target application.
  • the vehicle driven by the two virtual characters The racing car needs to vibrate, that is, the scene includes the vibrating object of the racing car that needs to vibrate. Therefore, the scene in which at least two virtual character objects presented in the game application compete in a racing car can also be called the vibrating scene of the target application.
  • the way the target application presents the business scenario is also different.
  • the target application as a game application and the business scenario as an example where at least two virtual characters in the game are racing a car
  • the target application can be directly run on the terminal where it is located.
  • the game screen of two virtual characters racing a car as shown in Figure 1a is displayed on the terminal screen, thereby presenting the business scenario to the user; if the target application is run in the cloud game server, the target application can use
  • the game screen of the two virtual characters racing is sent to the connected terminal, so that the connected terminal displays the received game screen in sequence on the terminal screen, thereby presenting the business scene for the user, as shown in Figure 1b.
  • the terminal mentioned here refers to: any device that supports the user to hold or touch, and has one or more built-in vibration components; such as smartphones, tablet computers, laptops, smart watches, etc.; among them, the vibration A component is any component that has the ability to vibrate, such as a motor, shrapnel, motor, and so on.
  • an embodiment of the present application proposes a vibration control scheme.
  • the general principle of the vibration control scheme is as follows: when presenting any vibration scene of the target application, the terminal can drive the built-in at least A vibration component vibrates.
  • the target application can record the currently used vibration waveform file and vibration time, so that the vibration of the vibration component needs to be resumed in the target application , the target application can notify the terminal to drive the vibration component to continue to vibrate according to the recorded vibration waveform file and the recorded vibration time, so as to resume the vibration of the vibration component based on the position where the vibration is suspended.
  • the target application when the target application needs to restore the vibration of the vibration component, the target application can also only pass the recorded vibration waveform file without the recorded vibration time; in this case, the target application can notify the terminal according to the recorded vibration Waveform files and other vibration times (such as the initial vibration time in the recorded vibration waveform files, etc.), drive the vibration components to continue to vibrate.
  • the target application may not pass the recorded vibration waveform file and recorded vibration time; in this case, the target application may drive the vibration component to continue vibrating by notifying the terminal according to one or more new vibration waveform files.
  • the vibration control scheme can achieve the following beneficial effects: 1
  • the state of the vibration component can be changed in real time based on the playback or pause of the target application, and the state of the vibration component can be seamlessly switched from the vibration state to the pause state , and seamlessly switch from the pause state to the vibration state, to achieve the purpose of flexibly controlling the vibration pause and vibration recovery of the vibration component, improve the fit between the vibration effect and the target application, and avoid setting the vibration time for the vibration component.
  • the mechanical and solidified vibration mode of stopping the vibration when the vibration time reaches a long time after vibration has brought about the problem of large loss of vibration components in the terminal.
  • an embodiment of the present application proposes a vibration control method, which can be implemented by a target application running on a computer device, and the computer device can be a server or a terminal; for example, when the target application is an APP, that is When the target application is running in the terminal, the vibration control method can be implemented by the terminal through the APP; when the target application is a cloud application, that is, when the target application is not running in the terminal, the vibration control method can be implemented by the cloud server through the cloud application accomplish.
  • the vibration control method is described from the perspective of target application. Please refer to FIG. 2, the vibration control method may include the following steps S201-S205:
  • the terminal presents the target business scenario to the user by displaying a series of pictures describing the target business scenario on the terminal screen; that is, when the terminal presents any business scenario, the terminal screen will display Each frame picture involved in any business scene is displayed in sequence.
  • the meaning of "the target business scene includes the target vibration object that needs to vibrate" mentioned in the embodiment of the present application can be understood as: the screen displayed on the terminal screen includes the target vibration object that needs to vibrate.
  • the target vibration object may refer to any object to be vibrated.
  • the target application is a game application
  • the target business scenario is a scene in which two virtual characters are racing a car presented by the game application
  • the vehicle since in a real racing scene, when two vehicles collide or the vehicle is driving on an uneven road
  • the vehicle usually produces vibration; therefore, in order to create an atmosphere of racing in a real racing scene for the user and improve the user's gaming experience, it is also possible for the vehicle driven by the virtual character to collide or drive on an uneven road during the racing process.
  • control the vehicle driven by the avatar may vibrate.
  • the target vibration object may be any vehicle to be vibrated.
  • the target application running on the computer device can first obtain the target vibration waveform file associated with the target vibration object.
  • the target application running on the computer device can first obtain the target vibration description file associated with the target business scene, which may include: the vibration waveform files associated with each vibration object in the target business scene; then, the computer device
  • the target application running on the above can obtain the vibration waveform file associated with the target vibration object as the target vibration waveform file from the target vibration description file.
  • the target application running on the computer device After the target application running on the computer device obtains the target vibration waveform file, it can send the target vibration waveform file to the terminal to notify the terminal to drive The vibration component inside the terminal vibrates.
  • the target vibration waveform file may include vibration attribute values corresponding to multiple vibration times; correspondingly, the specific method for the terminal to drive the vibration component to vibrate according to the target vibration waveform file may be: according to the order of vibration time from early to late, sequentially The vibration attribute value of each vibration time is used to drive the vibration component to vibrate.
  • the vibration attribute value mentioned here may include at least one of the following: a vibration intensity value under the vibration intensity dimension, a vibration frequency value under the vibration frequency dimension, and so on.
  • the vibration attribute values corresponding to any two vibration times in the target waveform file may be the same or different, which is not limited; and the vibration time mentioned in the embodiment of the present application refers to the vibration time based on the vibration waveform
  • the relative time determined by the starting point is not the system time.
  • the target vibration waveform file may include the vibration attribute value of the 0th second, the vibration attribute value of the 1st second, etc.; it can be seen that the vibration time involved in the target waveform file is different from the device where the target application is located.
  • the system time has nothing to do with it.
  • the target application running by the computer device can also synchronously send a heartbeat signal to the terminal;
  • the heartbeat signal refers to a signal used to instruct the terminal to maintain the vibrating component to vibrate.
  • the embodiment of the present application does not limit the specific form of the heartbeat signal; for example, the heartbeat signal can be a specified value (such as "0", "1” and other values); as another example, the heartbeat signal can also be A preset text message (such as "please keep vibrating", “continue vibrating” and other text messages), and so on.
  • the target application running on the computer device can also generate a heartbeat signal according to the target frequency when the terminal drives the vibration component to vibrate according to the target vibration waveform file after sending the heartbeat signal for the first time;
  • the target frequency can be based on experience values or business Requirement setting, for example, the target frequency can be: the frequency of generating a heartbeat signal every 1 second, or the frequency of generating a heartbeat signal every 2 seconds, and so on.
  • the target application running on the computer device can send the generated heartbeat signal to the terminal after each generation of the heartbeat signal, so that the terminal maintains the vibration of the vibration component based on the heartbeat signal.
  • the terminal maintains the vibration of the vibration component based on the heartbeat signal means: as long as the terminal regularly receives the heartbeat signal every interval corresponding to the target frequency, it can drive the vibration component according to the target vibration waveform file Always vibrate; otherwise, suspend the vibration of the vibrating component.
  • the target frequency is the frequency at which heartbeat signals are generated every 1 second
  • the terminal regularly receives heartbeat signals every 1 second it can drive the vibration component to vibrate according to the standard vibration waveform file; otherwise, the vibration of the vibration component will be suspended.
  • the vibration of the vibrating component is triggered by the presence of a target vibration object that needs to vibrate in the target business scene, in actual practice, there may be situations where the vibration operation for the target vibration object is suspended. Therefore, in the embodiment of the present application, when the vibration of the target vibration object is suspended, the vibration component in the control terminal also suspends vibration, so that the vibration effect of the vibration component is consistent with the vibration effect of the target vibration object, and then the vibration of the vibration component is consistent with the target vibration effect.
  • the perfect fit between applications provides users with a real and complete vibration experience.
  • the target application running on the computer device can actively send a vibration suspension notification to the terminal in response to the vibration suspension operation on the target object, so as to notify the terminal to control the vibration component to suspend vibration.
  • the vibration pause event may include: the target application running on the computer device sends a vibration pause notification to the terminal in response to the vibration pause operation on the target object.
  • the vibration pause operation mentioned above may be any operation that triggers the target vibration object to pause vibration.
  • a trigger operation such as a click operation, a press operation, etc.
  • the target vibration object in pauses the vibration; then, in this case, the trigger operation for the screen pause component can be regarded as a vibration pause operation for the target vibration object.
  • the target application is a game application
  • the target vibration object is a vehicle driven by the virtual character used by the user.
  • Triggering the avatar used by the user to stop driving the vehicle will trigger the vehicle (that is, the target vibration object) to suspend vibration; then, in this case, the game operation that triggers the avatar's life value to be reduced to 0 can be regarded as targeting the target
  • the vibration pause action for the vibration object For another example, if the user closes the picture involved in the target business scene displayed on the terminal screen, the target vibration object will be triggered to suspend vibration; then, in this case, the operation of closing the picture involved in the target business scene, depending on Pauses the action for vibrations on the target vibration object.
  • the specific method for the user to close the screen involved in the target business scenario is not limited here.
  • the user can close the screen involved in the target business scenario by switching the screen involved in the target business scenario to the system main interface of the terminal, or close the screen involved in the target business scenario.
  • the terminal performs a screen-off operation to close the screens and the like involved in the target business scenario.
  • the target application running on the computer device can periodically send a heartbeat signal to the terminal according to the target frequency, so that the terminal maintains the vibration of the vibration component based on the heartbeat signal; in practice, there may be a target When the application is closed abnormally, the target application will not be able to regularly generate and send the heartbeat signal to the terminal according to the target frequency, resulting in the loss of the heartbeat signal. Therefore, in the embodiment of the present application, when the heartbeat signal is lost due to the abnormal shutdown of the target application, the vibration component in the control terminal also suspends the vibration, so that the vibration effect of the vibration component is consistent with the suspension of the target application, and further realizes the vibration component.
  • the vibration pause event may include: a heartbeat signal loss event.
  • the vibration pause event may include at least one of the following: 1 an event in which the target application running on the computer device sends a vibration pause notification to the terminal in response to the vibration pause operation on the target object; and, 2 the heartbeat signal is lost event.
  • the first kind of vibration pause event is actively caused by the target application running on the computer device, and the second kind of vibration pause event is passively caused by the target application.
  • the target application running on the computer device can record the target vibration waveform file and the current vibration time.
  • the target vibration waveform file includes multiple vibration attribute values corresponding to the vibration time; correspondingly, the current vibration time refers to: when the vibration pause event exists, the target vibration waveform file corresponds to the vibration attribute value adopted. vibration time.
  • the terminal initially uses the vibration attribute value of the 0th second in the target vibration waveform file to control the vibration component to vibrate, and then uses the vibration attribute value of the 1st second to control the vibration component to vibrate, and then uses the vibration of the second second Attribute value, control the vibration component to vibrate, and so on; if the terminal is using the vibration attribute value of the 30th second to control the vibration component to vibrate when there is a vibration pause event, the current vibration time can be recorded as the 30th second, as shown in the figure 3a shown.
  • the target application may be restarted in practice. Therefore, after the target application is restarted, it can be determined again that the vibration of the vibration component needs to be restored.
  • the target application can determine that the vibration of the vibration component needs to be restored when detecting the vibration restoration operation on the target vibration object. That is.
  • the situation that the vibration of the vibration component needs to be restored may include at least one of the following: the target application is restarted successfully after being closed abnormally; or, a vibration recovery operation for the target vibration object is detected.
  • the vibration recovery operation mentioned here may be any operation that triggers the target vibration object to resume vibration.
  • the user triggers an operation (such as click operation, press operation, etc.) on the screen playback component on the terminal screen, it will trigger the continuous display of the screen involved in the target business scene on the terminal screen, thereby triggering the target in the screen.
  • the vibration object continues to vibrate; then, in this case, the trigger operation for the screen playing component can be regarded as a vibration recovery operation for the target vibration object.
  • the target application is a game application
  • the target vibration object is a vehicle driven by the virtual character used by the user.
  • the life value of the virtual character used by the user increases to a valid value (such as 20, 30, etc.), then at this time, the virtual character used by the user will be triggered to continue driving the vehicle, thereby triggering the vehicle (that is, the target vibration object) to resume vibration; then, in this case, the life value of the triggered virtual character can be changed from
  • the game operation that increases from 0 to a valid value is regarded as a vibration recovery operation for the target vibration object.
  • the target vibration object will be triggered to resume vibration at this time; then, in this case, the operation of opening the picture involved in the target business scene, Treated as a vibration pause action on the target vibration object.
  • the target application running on the computer device can be based on For the current vibration time, generate a recovery vibration time, and continue to execute the subsequent steps S204-S205.
  • the recovery vibration time refers to: the vibration time for the control vibration component to start to recover vibration; based on the current vibration time, the specific method of generating the recovery vibration time can be any of the following:
  • the 30th second may be determined as the resuming vibration time.
  • the initial vibration time may be determined as the recovery vibration time.
  • the vibration time that is earlier than the current vibration time and differs from the current vibration time by the first specified duration can be determined as the recovery vibration time, etc.; the first specified duration here can be set according to business needs or experience values, such as the first The specified duration is 2 seconds, and the current vibration time is the 30th second, then the 28th second can be determined as the recovery vibration time.
  • the vibration time that is later than the current vibration time and differs from the current vibration time by a second specified duration can be determined as the recovery vibration time; the second specified duration here can be set according to business needs or experience values, such as according to business needs.
  • the second specified duration is set to 2 seconds, and the current vibration time is the 30th second, then the 32nd second can be determined as the recovery vibration time.
  • the target business scenario presented by the target application may be a real-time scenario; in this real-time scenario, the involved images change in real time as time goes by, and when the user pauses the displayed image and replays the image , it needs to jump to the latest real-time screen for display.
  • the vibration time that is later than the current vibration time and has a dynamic duration difference from the current vibration time can be determined as the recovery vibration time; the dynamic duration here is based on the existence of a vibration pause event
  • the time difference between the time and the time when the vibration of the vibrating component needs to be restored is determined.
  • the time when there is a vibration suspension event is the system time 10:58:10
  • the time when the vibration of the vibrating component is determined to be restored is the system time
  • the time is 10:58:15, and the time difference between these two moments is 5, then the dynamic duration can be determined to be 5 seconds. If the current vibration time is the 30th second, the 35th second can be determined as the recovery vibration time .
  • a vibration time can also be preset according to business requirements or experience values, so that the target When the application needs to restore the vibration of the vibration component and the business scenario of the target application is the target business scenario, the preset vibration time can be directly determined as the vibration recovery time.
  • the target application running on the computer device has already sent the target vibration waveform file to the terminal when implementing step S201; therefore, when the target application running on the computer device implements step S204, the Recover the vibration time and the file identification (such as file number, file name, etc.) of the recorded target vibration waveform file, and generate a vibration recovery notification.
  • the vibration recovery notification may include: the file identifier of the target vibration waveform file. Since the data volume of the file identification is usually much smaller than the data volume of the file itself, using this implementation method to generate the vibration recovery notification can effectively reduce the data volume of the vibration recovery notification, thereby saving the resources required for transmitting the vibration recovery notification and shortening the vibration time. Restore the transmission duration of notifications, thereby improving the timeliness of notifications.
  • the specific implementation method of step S204 can be: first, the current vibration time is used as a reference, and the relative time offset between the recovery vibration time and the current vibration time is calculated; for example, the current vibration time is set to be the 30th Seconds: If the recovery time is the 35th second, the relative time offset is 5; if the recovery time is the 28th second, the relative time offset is -2; if the recovery time is the 30th second, the relative The time offset is 0.
  • the target application can determine the file identification of the recorded target vibration waveform file. The target application can then generate a vibration resume notification based on the relative time offset and file identification. That is to say, the vibration recovery notification in this implementation manner may also include a relative time offset in addition to the file identifier.
  • step S204 may be: determine the file identifier of the recorded target vibration waveform file, and directly use the recovery time of vibration and the file identifier to generate a vibration recovery notification. That is to say, the vibration recovery notification in this implementation manner may also include the vibration recovery time in addition to the file identifier.
  • the vibration recovery notification can be generated directly according to the vibration recovery time and the recorded target vibration waveform file. That is, in this implementation manner, the vibration recovery notification may include: a target vibration waveform file.
  • Using this implementation method to generate a vibration recovery notification can directly send the target vibration waveform file to the terminal again, so that even if the terminal has deleted the target vibration waveform file before, there is no need to waste resources and time to request the computer device running the target application to send it Target vibration waveform files, thereby improving the timeliness of vibration recovery.
  • the target application running on the computer device After the target application running on the computer device generates the vibration recovery notification through step S204, it can send the vibration recovery notification to the terminal, so that the terminal first notifies the vibration recovery time and the target vibration waveform file according to the vibration recovery notification, and then Continue to use the vibration attribute values of each vibration time after the recovery vibration time in the target vibration waveform file, and drive the vibration component to continue to vibrate.
  • the recovery vibration time is determined by the aforementioned method 1, that is, the recovery vibration time is equal to the current vibration time, then the seamless connection between the vibration suspension and the recovery vibration of the vibration component can be realized through the embodiment of the application, and the vibration can be improved.
  • the continuity and integrity of the effect for example, the vibration component is suspended at the 30th second (that is, the current vibration time is the 30th second), and the resumed vibration time is the 30th second, then it can be used after the 30th second
  • the vibration attribute value of each vibration time controls the vibration component to continue to vibrate, so that the vibration component starts to resume vibration from the 30th second, as shown in Figure 3b.
  • the playback of the vibration effect of the vibration component can be realized through the embodiment of the present application; for example, the vibration component is at the 30th second If the vibration is suspended, the time to resume the vibration is the 28th second, then the vibration attribute value of each vibration time after the 28th second can be used to control the vibration component to continue to vibrate, so that the vibration component can resume vibration from the 28th second, so as to achieve playback Vibration effect between 28-30 seconds.
  • the application can realize the advancement of the vibration effect of the vibration component; for example, the vibration component pauses the vibration at the 30th second If the recovery vibration time is the 35th second, then the vibration attribute value of each vibration time after the 35th second can be used to control the vibration component to continue to vibrate, so that the vibration component can resume vibration from the 35th second, thereby skipping the 35th second.
  • the vibration effect between 30-35 seconds, to achieve the advancement of the vibration effect.
  • the target application running on the computer device
  • a new vibration description file associated with the new business scene can be obtained, and the new vibration description file includes: vibration waveform files associated with each vibration object in the new business scene.
  • the new vibration description file is sent to the terminal, so that the terminal drives the vibration component to vibrate according to each vibration waveform file in the new vibration description file. That is to say, in this case, the target application may not execute steps S203-S205.
  • the terminal when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene.
  • the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, improve the fit between the vibration effect and the target application, and avoid setting the vibration component
  • the vibration time is long, and the vibration is stopped when the vibration time is long after the vibration is started.
  • the target application can also record the target vibration waveform file and the current vibration time, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, the target application can be based on the record
  • the current vibration time generates the recovery vibration time; and notifies the terminal to drive the vibration component to continue to vibrate according to the recovery vibration time and the recorded target vibration waveform file.
  • FIG. 4 is a schematic flowchart of another vibration control method provided by an embodiment of the present application, and the method may be executed by the terminal mentioned above.
  • the vibration control method may include the following steps S401-S404:
  • the target business scene of the target application includes a target vibration object to be vibrated
  • the target business scene drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object.
  • the terminal can receive the target vibration waveform file associated with the target vibration object from the target application, and the target vibration waveform file can include vibration attribute values corresponding to multiple vibration times; In the later sequence, the vibration attribute value of each vibration time is used to drive the vibration component to vibrate.
  • the terminal can also receive a heartbeat signal from the target application, which is generated by the target application according to the target frequency; after each heartbeat signal is received, the vibration component can be maintained based on each received heartbeat signal. vibration.
  • the terminal if the terminal detects that the heartbeat signal is lost, it can determine that there is a vibration suspension event related to the vibration component from the target application; or, if the terminal receives the vibration suspension notification sent by the target application, it can determine that there is A vibration pause event on the vibration component from the target application.
  • the specific method for the terminal to detect whether the heartbeat signal is lost can be: the terminal can obtain the latest system time in real time, and calculate the interval between the latest system time and the last time when the heartbeat signal was received; If it is greater than or equal to the interval duration corresponding to the target frequency, it can be determined that the heartbeat signal is lost; if the calculated interval duration is less than the interval duration corresponding to the target frequency, it can be determined that the heartbeat signal is not lost.
  • the target frequency is set to generate a heartbeat signal every 2 seconds
  • the interval corresponding to the target frequency is 2 seconds.
  • set the latest system time as 11:02:36: If the last time the heartbeat signal was received was 11:02:35, then the difference between the latest system time and the last time the heartbeat signal was received can be calculated
  • the interval between the two is 1 second, which is shorter than the interval corresponding to the target frequency. In this case, it can be determined that the heartbeat signal is not lost.
  • the target vibration waveform file includes multiple vibration attribute values.
  • the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, and the current vibration time is the same as the target vibration time.
  • the vibration waveform file can be recorded by the target application, so that when the target application needs to restore the vibration of the vibration component, and the business scenario of the target application is the target business scenario, the recovery vibration time can be generated according to the recorded current vibration time, and based on the recovery vibration time and recorded target vibration waveform files to generate vibration recovery notifications.
  • the vibration restoration notification received by the terminal is generated according to the restoration vibration time and the recorded target vibration waveform file;
  • the restoration vibration time is when the target application determines that the vibration of the vibration component needs to be restored, and the business scenario of the target application is In business scenarios, it is generated based on the current vibration time.
  • the vibration recovery notification may include: a relative time offset between the vibration recovery time and the current vibration time; or, the vibration recovery notification may include the vibration recovery time.
  • the cloud server can deliver relevant data (such as target vibration waveform files, vibration recovery notifications, etc.) to the terminal via the Internet through the target application.
  • relevant data such as target vibration waveform files, vibration recovery notifications, etc.
  • the computer device where the target application is located is the same device as the terminal, that is, the target application runs on the terminal, then the interaction between the target application and the terminal can essentially be understood as the interaction between the target application and the underlying hardware in the terminal ; That is to say, the target application sends data to the terminal, which can essentially be understood as the target application sends data to the underlying hardware of the terminal.
  • the target application may deliver relevant data (such as target vibration waveform files, vibration recovery notifications, etc.) to the underlying hardware of the terminal through the system vibration interface in the terminal.
  • the system vibration interface may be an interface that integrates the file delivery function, the heartbeat delivery function, and the notification delivery function.
  • the system vibration interface can also include the following three sub-interfaces:
  • Sub-interface 1 Vibration playback interface; this interface can simultaneously support the settings of cycle, vibration intensity, vibration frequency, vibration mode, and vibration time indication information.
  • the vibration playback interface can be represented by the following code:
  • *@param interval is used to set the cycle interval, and its value range can be 0-1000; the cycle interval refers to the interval between vibrating the vibration object twice according to the target vibration waveform file, and the unit can be ms (milliseconds) or other orders of magnitude unit.
  • *@param amplitude is used to set the vibration intensity value, and its value range can be 1-255; among them, 1 is the smallest and 255 is the largest; this parameter is used to modify the HE file (vibration waveform file) for overall intensity signal adjustment/reduction .
  • *@paramfreq is used to set the vibration frequency value, and its value range can be 1-100; among them, 1 is the smallest and 100 is the largest; this parameter is used as a percentage to modify the HE file and adjust the overall frequency signal.
  • *@parampatten is used to set the vibration mode, the value equal to 0 means the preemption mode, and the value equal to 1 means the overlay mode; this parameter is used to inform the underlying hardware how to superimpose the vibration effect;
  • the so-called overlay mode means that different vibration objects can Fusion vibration, which can simulate the vibration effect caused by the resonance of multiple vibration objects in the real physical environment;
  • the so-called preemption mode means that different vibration objects cannot be fused and superimposed, and a vibration object can only be selected according to the vibration priority of each vibration object Vibrate; for example, select the vibration object with the highest vibration priority from multiple vibration objects to vibrate.
  • *@param level is used to set the vibration priority, and its value range is 1-10; among them, level 10 is the highest, followed by decreasing; this parameter is used in the preemptive mode, the higher the level is, the priority is played.
  • *@relative Time is used to set the vibration time information, which can be the recovery vibration time, or the relative time offset between the recovery vibration time and the current vibration time; when the vibration time information is a relative time offset, Its value can be negative, positive or 0; when the value is negative, it means the playback of the vibration effect; when the value is positive, it means jump to the specified time after the current vibration time and continue to vibrate. When the value is 0, it means continue to vibrate based on the recorded current vibration time.
  • Sub-interface 2 heartbeat delivery interface; this interface can support the delivery of heartbeat signals.
  • the heartbeat delivery interface can be represented by the following code:
  • beat is used to set the interval duration corresponding to the target frequency.
  • Sub-interface 3 Vibration recovery interface; this interface can support the delivery of vibration recovery notifications.
  • the vibration recovery interface can be represented by the following code:
  • relativeTime is used to set the vibration time indication information.
  • a heartbeat mechanism can be added to the system vibration interface, so as to detect whether there is a heartbeat loss based on the heartbeat mechanism. If there is no heartbeat loss, the vibration component can be maintained to continue vibrating according to the target vibration waveform file from the target application; if there is a heartbeat loss, the vibration component is controlled to suspend vibration, as shown in Figure 5a.
  • an independent vibration controller can be further set in the target application to The target application to realize vibration control through the vibration controller.
  • the vibration controller is essentially a software development kit (Software Development Kit, SDK); it is mainly used to automatically record the currently used vibration waveform file and the current vibration time when the heartbeat signal is lost or the target application actively suspends vibration , as shown in Figure 5b. That is to say, when there is a vibration suspension event about the vibration component originating from the target application, the target application can record the target vibration waveform file and the current vibration time through the vibration controller.
  • the target application can also restore the vibration component through the interface of the vibration controller; that is, when the target application actively restores the vibration of the vibration component, it can notify the vibration controller to send the recorded vibration waveform through the interface of the vibration controller
  • the file and the current vibration time are sent to the underlying hardware of the terminal, so that the underlying hardware drives the vibration component to vibrate according to the recorded vibration waveform file and the current vibration time, so as to realize the continued playback of the recorded vibration, as shown in Figure 5c.
  • the target application can also directly send a new vibration description file to the terminal through the vibration controller, or send a recorded vibration waveform file and other vibration times to the terminal.
  • a new vibration description file to the terminal through the vibration controller, or send a recorded vibration waveform file and other vibration times to the terminal.
  • the target application interacts with the underlying hardware through the system vibration interface to realize the specific process of vibration control of the vibration components in the terminal:
  • the target application can detect whether the target service scene includes the target vibration object that needs to vibrate; if it does, determine that the target service scene is a vibration scene; if not, determine that the target service scene is not a vibration scene.
  • the target application can send the target vibration waveform file associated with the target vibration object to the underlying hardware of the terminal through the system vibration interface; and generate a heartbeat signal and send the generated The heartbeat signal is sent to the underlying hardware.
  • the underlying hardware of the terminal can drive the vibration component to vibrate according to the target vibration waveform file in the target business scenario.
  • the underlying hardware can control the vibration component to suspend the vibration, and the target application can record the currently used target vibration through the vibration controller Wave file and current vibration time.
  • the target application can notify the vibration controller to determine the time for restoring the vibration.
  • the time for restoring the vibration can be equal to, earlier than, or later than the current time of vibration.
  • the vibration controller can generate a vibration recovery notification based on the recovery vibration time and the recorded target vibration waveform file, and send the vibration recovery notification to the underlying hardware of the terminal, so that the underlying hardware drives according to the recorded target vibration waveform file and recovery vibration time
  • the vibrating component vibrates to achieve vibration recovery of the vibrating component.
  • the embodiment of this application adopts a standardized interface method, so that the interface layer can support the application layer and the system hardware layer in a unified manner.
  • the innovative design of the application layer does not need to worry about the impact of experience differences caused by mismatching with the underlying hardware layer. It can enrich the development functions of the application layer.
  • the application layer can flexibly control the vibration suspension and recovery of the vibration component; and, when the target application is abnormally exited, the system vibration can also automatically exit, which can effectively improve the fit between the vibration effect of the vibration component and the target application, and improve user experience.
  • the target application and the terminal realize vibration control through interaction as an example; however, in practical applications, the terminal itself can also perform various steps to realize the vibration of the vibration component.
  • Control that is, operations such as recording the target waveform vibration file and the current vibration time performed by the target application, can be performed by the terminal.
  • the embodiment of the present application also proposes a schematic flowchart of the vibration control method shown in FIG. 6; referring to FIG. 6, the vibration control method can be executed by the terminal, and can specifically include the following steps S601-S604:
  • the target vibration waveform file includes a plurality of vibration attribute values corresponding to the vibration time
  • the current vibration time refers to the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file when there is a vibration pause event.
  • the vibration pause event mentioned in step S602 may be: an event of detection of a vibration pause operation on the target vibration object, or detection of an event of abnormal exit of the target application, and so on.
  • the terminal can obtain the new business scenario
  • the associated new vibration description file drives the vibration component to vibrate according to each vibration waveform file in the new vibration description file.
  • the terminal when the target service scene of the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target service scene.
  • the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application.
  • the target vibration waveform file and the current vibration time can also be recorded, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, it can be based on the recorded current vibration time Generate the recovery vibration time; thus, according to the recovery vibration time and the target vibration waveform file, the driving vibration component continues to vibrate.
  • the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
  • the embodiment of the present application also discloses a vibration control device
  • the vibration control device may be a computer program running on a computer device to realize the function of the target application (including program code).
  • the vibration control device can execute the method shown in Figure 2, please refer to Figure 7, the vibration control device can run the following units:
  • the control unit 701 is configured to notify the terminal to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target service scenario when the target application includes a target vibration object that needs to vibrate ;
  • the recording unit 702 is used to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component from the target application;
  • the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to: When there is a vibration pause event, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
  • the processing unit 703 is configured to generate a restoration vibration time based on the current vibration time if the business scenario of the target application is the target business scenario when the vibration of the vibration component needs to be restored;
  • the control unit 701 is further configured to generate a vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, and send the vibration recovery notification to the terminal, so that the terminal drives the vibration component to continue vibrating according to the vibration recovery notification.
  • processing unit 703 when the processing unit 703 is used to generate the vibration recovery notification according to the recovery vibration time and the recorded target vibration waveform file, it can be specifically used for:
  • processing unit 703 when used to generate the vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, it can be specifically used for:
  • the processing unit 703 when used to generate the recovery vibration time based on the current vibration time, it may be specifically used for:
  • a vibration time earlier than the current vibration time is determined as the recovery vibration time
  • a vibration time later than the current vibration time is determined as the recovery vibration time.
  • processing unit 703 may also be used to:
  • a heartbeat signal is generated according to the target frequency
  • the generated heartbeat signal is sent to the terminal, so that the terminal maintains the vibration of the vibrating component based on the heartbeat signal.
  • the vibration pause event includes at least one of the following:
  • the target application sends an event of vibration suspension notification to the terminal in response to the vibration suspension operation for the target object; and an event of heartbeat signal loss.
  • control unit 701 can also be used for:
  • the new vibration description file includes: the vibration waveform files associated with each vibration object in the new business scenario;
  • the new vibration description file is sent to the terminal, so that the terminal drives the vibration component to vibrate according to each vibration waveform file in the new vibration description file.
  • the various units in the vibration control device shown in Fig. 7 can be respectively or all combined into one or several other units to form, or some (some) units can be disassembled again. Divided into a plurality of functionally smaller units, this can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the vibration-based control device may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented cooperatively by multiple units.
  • a computer device including a processing element such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and a storage element
  • CPU central processing unit
  • RAM random access storage medium
  • ROM read-only storage medium
  • the computer program (comprising program code) of each step involved in the corresponding method shown in Figure 2 is used to construct the vibration control device equipment as shown in Figure 7, and to realize the vibration control device shown in Figure 2 in the embodiment of the present application. Vibration Control Methods.
  • the computer program can be recorded in, for example, a computer-readable recording medium, loaded into the above-mentioned computer device via the computer-readable recording medium, and executed therein.
  • the terminal when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene.
  • the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application.
  • the target vibration waveform file and the current vibration time can also be recorded, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, it can be based on the recorded current vibration time Generate the recovery vibration time; thus, according to the recovery vibration time and the target vibration waveform file, the driving vibration component continues to vibrate.
  • the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
  • the vibration control device may be a computer program (including program code) running in a terminal.
  • the vibration control device can execute the method shown in Figure 8, please refer to Figure 8, the vibration control device can run the following units:
  • the driving unit 801 is configured to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scenario when the target business scene presented by the target application includes a target vibration object to be vibrated;
  • the drive unit 801 is used to control the vibration component to suspend vibration when there is a vibration suspension event about the vibration component from the target application;
  • the target vibration waveform file includes a plurality of vibration attribute values.
  • the target vibration waveform file The vibration time corresponding to the vibration attribute value adopted in is the current vibration time, and the current vibration time and the target vibration waveform file are recorded by the target application;
  • the receiving unit 802 is configured to receive the vibration recovery notification sent by the target application.
  • the vibration recovery notification is generated according to the vibration recovery time and the recorded target vibration waveform file;
  • the vibration recovery time is when the target application determines that the vibration of the vibration component needs to be recovered, and the target When the business scenario of the application is the target business scenario, it is generated based on the current vibration time;
  • the driving unit 801 is further configured to determine the resuming vibration time and the target vibration waveform file according to the vibration resuming notification, and drive the vibrating component to continue vibrating according to the determined resuming vibration time and the target vibration waveform file.
  • the vibration recovery notification includes: the relative time offset between the vibration recovery time and the current vibration time; when the drive unit 801 is used to determine the vibration recovery time according to the vibration recovery notification, it can be specifically used for:
  • the recovery vibration time is calculated.
  • the driving unit 801 can also be used for: maintaining the vibration of the vibrating component based on each received heartbeat signal after each heartbeat signal is received.
  • the drive unit 801 can also be used for:
  • a vibration suspension notification sent by the target application it is determined that there is a vibration suspension event related to the vibration component originating from the target application.
  • the drive unit 801 can also be used for:
  • the new vibration description file is when the target application determines that the vibration of the vibration component needs to be restored.
  • the business scenario presented by the target application is a new business scenario, and the new business scenario includes one or more Obtained when the vibration object needs to vibrate; the new vibration description file includes: the vibration waveform file of each vibration object in the new business scene;
  • the various units in the vibration control device shown in Fig. 8 can be respectively or all combined into one or several other units to form, or some (some) units can be disassembled again. Divided into a plurality of functionally smaller units, this can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the vibration-based control device may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented cooperatively by multiple units.
  • a computer device including a processing element such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and a storage element
  • CPU central processing unit
  • RAM random access storage medium
  • ROM read-only storage medium
  • the computer program (including the program code) of each step involved in the corresponding method shown in Figure 4 is used to construct the vibration control device equipment as shown in Figure 8, and to realize the vibration control device shown in Figure 4 in the embodiment of the present application. Vibration Control Methods.
  • the computer program can be recorded in, for example, a computer-readable recording medium, loaded into the above-mentioned computer device via the computer-readable recording medium, and executed therein.
  • the terminal when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene.
  • the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to realize the vibration based on Play or pause the target application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application.
  • the target vibration waveform file and the current vibration time can also be recorded, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, it can be based on the recorded current vibration time Generate the recovery vibration time; thus, according to the recovery vibration time and the target vibration waveform file, the driving vibration component continues to vibrate.
  • the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
  • the vibration control device may be a computer program (including program code) running in a terminal.
  • the vibration control device can execute the method shown in Figure 9, please refer to Figure 9, the vibration control device can run the following units:
  • the driving unit 901 is configured to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scenario when the target business scene presented by the target application includes a target vibration object to be vibrated;
  • the recording unit 902 is used to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component originating from the target application;
  • the target vibration waveform file includes multiple vibration attribute values, and the current vibration time refers to: When there is a vibration pause event, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
  • the processing unit 903 is configured to generate a recovery vibration time based on the current vibration time if the business scenario presented by the target application is the target business scenario when the vibration of the vibration component needs to be restored;
  • the driving unit 901 is further configured to drive the vibration component to continue to vibrate according to the recovery time of vibration and the recorded target vibration waveform file.
  • the various units in the vibration control device shown in Fig. 9 can be respectively or all combined into one or several other units to form, or some (some) units can be disassembled again. Divided into a plurality of functionally smaller units, this can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the vibration-based control device may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented cooperatively by multiple units.
  • a computer device including a processing element such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and a storage element
  • CPU central processing unit
  • RAM random access storage medium
  • ROM read-only storage medium
  • the computer-readable instructions (including program codes) of the steps involved in the corresponding method shown in FIG. 6 are used to construct the vibration control device as shown in FIG.
  • the computer-readable instructions may be recorded, for example, on a computer-readable storage medium, loaded into the above-mentioned computer device through the computer-readable storage medium, and run there.
  • the terminal when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene.
  • the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application.
  • the target vibration waveform file and the current vibration time can also be recorded, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, it can be based on the recorded current vibration time Generate the recovery vibration time; thus, according to the recovery vibration time and the target vibration waveform file, the driving vibration component continues to vibrate.
  • the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
  • this embodiment of the present application also provides a computer device.
  • the computer device mentioned here may be the aforementioned terminal; optionally, when the aforementioned When the target application is a cloud application, the computer device may also be a cloud server running the target application.
  • the computer device at least includes a processor 1001, an input interface 1002, an output interface 1003, and a non-volatile computer-readable storage medium 1004; and the processor 1001, the input interface 1002, and the output interface in the computer device 1003 and the non-volatile computer-readable storage medium 1004 can be connected through a bus or other means.
  • the non-volatile computer-readable storage medium 1004 can be stored in the memory of the computer device, and the non-volatile computer-readable storage medium 1004 is used for storing computer-readable instructions, and the processor 1001 (or called CPU (Central Processing Unit, central processing unit)) is the computing core and control core of computer equipment, which is suitable for implementing one or more computer-readable instructions, and is specifically suitable for loading and executing one or more computer-readable instructions to realize the corresponding method flow or the corresponding function.
  • CPU Central Processing Unit, central processing unit
  • the processor 1001 described in the embodiment of the present application can be used to perform a series of vibration control processes, specifically including: in the target business scene presented by the target application When the target vibration object to be vibrated is included, the terminal is notified to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scenario; when there is a vibration from the target application When about the vibration suspension event of the vibration component, record the target vibration waveform file and the current vibration time; the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to: when there is the vibration suspension event, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file; when the vibration of the vibration component needs to be restored, if the business scene presented by the target application is the target business scene, then Based on the current vibration time, generate a recovery vibration time; generate a vibration recovery notification according to the recovery vibration time and the recorded target vibration waveform file,
  • the processor 1001 described in the embodiment of the present application can be used to perform a series of vibration control processing, specifically including: including the target that needs to be vibrated in the target business scene presented by the target application When vibrating the object, in the target business scenario, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object; when there is a vibration suspension event about the vibration component originating from the target application When the vibration component is controlled to suspend vibration; the target vibration waveform file includes a plurality of vibration attribute values, and when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, the current vibration time and the target vibration waveform file are recorded by the target application; receive the vibration recovery notification sent by the target application, and the vibration recovery notification is based on the recovery vibration time and the recorded target vibration The waveform file is generated; the restoration vibration time is generated based on the current vibration time when the target application determines that the vibration of the vibration component
  • the processor 1001 described in the embodiment of the present application can be used to perform a series of vibration control processing, specifically including: including the target that needs to be vibrated in the target business scene presented by the target application
  • the vibration component in the terminal When vibrating the object, in the target business scenario, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object; when there is a vibration suspension about the vibration component originating from the target application
  • the target vibration waveform file includes a plurality of vibration attribute values
  • the current vibration time refers to: when there is the vibration pause event, the target vibration waveform The vibration time corresponding to the vibration attribute value adopted in the file; when the vibration of the vibration component needs to be restored, if the business scenario presented by the target application is the target business scenario, based on the current vibration time, generate Restoring the vibration time; according to the restoring vibration time and the target vibration waveform file, driving the vibrating component to continue vibrating,
  • the embodiment of the present application also provides a non-volatile computer-readable storage medium (Memory).
  • the storage medium is a memory device in a computer device and is used to store programs and data. It can be understood that the storage medium here may include built-in storage media in the computer equipment, and of course may also include extended storage media supported by the computer equipment.
  • the storage medium provides storage space, which stores the operating system of the computer device.
  • one or more computer-readable instructions adapted to be loaded and executed by the processor 1001 are also stored in the storage space, and these instructions may be one or more computer-readable instructions (including program codes).
  • the storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory; computer readable storage media.
  • one or more computer-readable instructions stored in the computer-readable storage medium can be loaded and executed by the processor 1001, so as to realize corresponding steps of the method in the above vibration control method embodiment.
  • a computer program product or computer program includes computer-readable instructions, and the computer-readable instructions are stored in a computer-readable storage medium .
  • the processor of the computer device reads the computer-readable instructions from the computer-readable storage medium, and the processor executes the computer-readable instructions, so that the computer device executes the embodiments provided in the various optional modes of the above-mentioned vibration control method.

Abstract

A vibration control method, comprising: when a target service scenario of a target application comprises a target vibration object to be vibrated, notifying a terminal to drive, in the target service scenario and according to a target vibration waveform file of the target vibration object, a vibration assembly to vibrate (S201); when a vibration pause event derived from the target application and concerning the vibration assembly exists, recording the target vibration waveform file and the current vibration time (S202); when the vibration of the vibration assembly needs to be restored and if the service scenario of the target application is the target service scenario, generating a vibration restoration time on the basis of the current vibration time (S203); generating a vibration restoration notification on the basis of the vibration restoration time and the recorded target vibration waveform file (S204), and issuing the vibration restoration notification to the terminal such that, according to the vibration restoration notification, the terminal drives the vibration assembly to continue to vibrate.

Description

振动控制方法、装置、设备及存储介质Vibration control method, device, equipment and storage medium
本申请要求于2021年07月27日提交中国专利局,申请号为202110854628.8,申请名称为“振动控制方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110854628.8 and the application name "vibration control method, device, equipment and storage medium" submitted to the China Patent Office on July 27, 2021, the entire contents of which are incorporated by reference in In this application.
技术领域technical field
本申请涉及互联网技术领域,具体涉及计算机技术领域,尤其涉及一种振动控制方法、装置、设备及存储介质。The present application relates to the field of Internet technology, specifically to the field of computer technology, and in particular to a vibration control method, device, equipment and storage medium.
背景技术Background technique
目前,当应用所呈现的业务场景(如射击游戏场景、开车游戏场景、音乐播放场景等)中,存在需要振动的振动对象时,终端(如智能手机、平板电脑等)可通过驱动内置的振动组件进行振动,从而给用户带来振动效果的体验。现有的终端驱动振动组件进行振动的方式是:为振动组件设置一个目标时长,当振动组件的振动时长达到该目标时长时,控制振动组件停止振动。这样的振动控制方式较为简单,使得振动组件的振动效果和应用之间无法实现完美的契合,影响用户体验,而且在振动时长固定且较长的情况下还会给振动组件带来损耗。At present, when there is a vibrating object that needs to vibrate in the business scene presented by the application (such as shooting game scene, driving game scene, music playing scene, etc.), the terminal (such as smart phone, tablet computer, etc.) can drive the built-in vibration The component vibrates, thereby giving the user the experience of vibrating effects. The existing terminal drives the vibrating component to vibrate as follows: setting a target duration for the vibrating component, and controlling the vibrating component to stop vibrating when the vibrating component reaches the target duration. Such a vibration control method is relatively simple, which makes it impossible to achieve a perfect fit between the vibration effect of the vibration component and the application, which affects the user experience, and also brings loss to the vibration component when the vibration duration is fixed and long.
发明内容Contents of the invention
本申请实施例提供了一种振动控制方法,由计算机设备执行,所述方法包括:An embodiment of the present application provides a vibration control method executed by a computer device, the method comprising:
在目标应用的目标业务场景中包括需振动的目标振动对象时,通知终端在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动所述终端内的振动组件进行振动;When the target service scene of the target application includes a target vibration object that needs to be vibrated, notify the terminal to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target service scene ;
当存在源自目标应用的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;When there is a vibration suspension event about the vibration component originating from the target application, record the target vibration waveform file and the current vibration time; the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to : when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
在需恢复所述振动组件的振动时,若所述目标应用的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;When the vibration of the vibrating component needs to be restored, if the business scenario of the target application is the target business scenario, generating a recovery vibration time based on the current vibration time;
根据所述恢复振动时间和记录的目标振动波形文件生成振动恢复通知,并将所述振动恢复通知下发给所述终端,以使所述终端根据所述振动恢复通知驱动所述振动组件继续振动。Generate a vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, and send the vibration recovery notification to the terminal, so that the terminal drives the vibration component to continue vibrating according to the vibration recovery notification .
本申请实施例还提供了一种振动控制方法,由终端执行,所述方法包括:The embodiment of the present application also provides a vibration control method executed by a terminal, the method comprising:
在目标应用的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;When the target service scene of the target application includes a target vibration object to be vibrated, in the target service scene, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object;
当存在源自目标应用的关于所述振动组件的振动暂停事件时,控制所述振动组件暂停振动;所述目标振动波形文件包括多个振动属性值,在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间为当前振动时间,所述当前振动时间和所述目标振动波形文件被所述目标应用记录;When there is a vibration suspension event about the vibration component originating from the target application, control the vibration component to suspend vibration; the target vibration waveform file includes a plurality of vibration attribute values, and when there is the vibration suspension event, the The vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, and the current vibration time and the target vibration waveform file are recorded by the target application;
接收所述目标应用发送的振动恢复通知,所述振动恢复通知是根据恢复振动时间和记 录的目标振动波形文件生成的;所述恢复振动时间是所述目标应用确定需恢复所述振动组件的振动时,且所述目标应用的业务场景为所述目标业务场景时,基于所述当前振动时间生成的;receiving the vibration recovery notification sent by the target application, the vibration recovery notification is generated according to the vibration recovery time and the recorded target vibration waveform file; the vibration recovery time is determined by the target application to restore the vibration of the vibration component When, and the business scenario of the target application is the target business scenario, it is generated based on the current vibration time;
根据所述振动恢复通知确定恢复振动时间和目标振动波形文件,并根据确定的恢复振动时间和目标振动波形文件,驱动所述振动组件继续振动。The vibration recovery time and the target vibration waveform file are determined according to the vibration recovery notification, and the vibration component is driven to continue vibrating according to the determined vibration recovery time and the target vibration waveform file.
本申请实施例还提供了一种振动控制方法,由终端执行,所述方法包括:The embodiment of the present application also provides a vibration control method executed by a terminal, the method comprising:
在目标应用的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;When the target service scene of the target application includes a target vibration object to be vibrated, in the target service scene, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object;
当存在源自目标应用的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;When there is a vibration suspension event about the vibration component originating from the target application, record the target vibration waveform file and the current vibration time; the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to : when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
在需恢复所述振动组件的振动时,若所述目标应用的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;When the vibration of the vibrating component needs to be restored, if the business scenario of the target application is the target business scenario, generating a recovery vibration time based on the current vibration time;
根据所述恢复振动时间和记录的目标振动波形文件,驱动所述振动组件继续振动。According to the resumed vibration time and the recorded target vibration waveform file, the vibration component is driven to continue to vibrate.
本申请实施例还提供了一种振动控制装置,所述装置包括:The embodiment of the present application also provides a vibration control device, which includes:
控制单元,用于在目标应用的目标业务场景中包括需振动的目标振动对象时,通知终端在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动所述终端内的振动组件进行振动;The control unit is configured to notify the terminal to drive the mobile device in the terminal according to the target vibration waveform file associated with the target vibration object in the target service scenario when the target application includes a target vibration object that needs to vibrate. The vibrating components vibrate;
记录单元,用于当存在源自目标应用的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;A recording unit, configured to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component originating from the target application; the target vibration waveform file includes a plurality of vibration attribute values, the The current vibration time refers to: when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
处理单元,用于在需恢复所述振动组件的振动时,若所述目标应用的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;A processing unit, configured to generate a restoration vibration time based on the current vibration time if the business scenario of the target application is the target business scenario when the vibration of the vibration component needs to be restored;
所述控制单元,还用于根据所述恢复振动时间和记录的目标振动波形文件生成振动恢复通知,并将所述振动恢复通知下发给所述终端,以使所述终端根据所述振动恢复通知驱动所述振动组件继续振动。The control unit is further configured to generate a vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, and send the vibration recovery notification to the terminal, so that the terminal can recover The notification drives the vibrating component to continue vibrating.
本申请实施例还提供了一种振动控制装置,所述装置包括:The embodiment of the present application also provides a vibration control device, which includes:
驱动单元,用于在目标应用的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;The driving unit is configured to drive the vibration component in the terminal to perform vibration in the target service scenario according to the target vibration waveform file associated with the target vibration object when the target application’s target service scenario includes a target vibration object that needs to vibrate. vibration;
所述驱动单元,用于当存在源自目标应用的关于所述振动组件的振动暂停事件时,控制所述振动组件暂停振动;所述目标振动波形文件包括多个振动属性值,在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间为当前振动时间,所述当前振动时间和所述目标振动波形文件被所述目标应用记录;The drive unit is configured to control the vibration component to suspend vibration when there is a vibration suspension event about the vibration component originating from the target application; the target vibration waveform file includes a plurality of vibration attribute values. When a vibration pause event occurs, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, and the current vibration time and the target vibration waveform file are recorded by the target application;
接收单元,用于接收所述目标应用发送的振动恢复通知,所述振动恢复通知是根据恢复振动时间和记录的目标振动波形文件生成的;所述恢复振动时间是所述目标应用确定需恢复所述振动组件的振动时,且所述目标应用的业务场景为所述目标业务场景时,基于所 述当前振动时间生成的;The receiving unit is configured to receive the vibration recovery notification sent by the target application, the vibration recovery notification is generated according to the recovery vibration time and the recorded target vibration waveform file; the recovery vibration time is determined by the target application to restore the When the vibration component is vibrating, and the business scenario of the target application is the target business scenario, it is generated based on the current vibration time;
所述确定单元,还用于根据所述振动恢复通知确定恢复振动时间和目标振动波形文件,根据确定的恢复振动时间和目标振动波形文件,驱动所述振动组件继续振动。The determination unit is further configured to determine a recovery vibration time and a target vibration waveform file according to the vibration recovery notification, and drive the vibration component to continue vibrating according to the determined recovery vibration time and target vibration waveform file.
本申请实施例还提供了一种振动控制装置,所述装置包括:The embodiment of the present application also provides a vibration control device, which includes:
驱动单元,用于在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;The driving unit is configured to drive the vibration component in the terminal according to the target vibration waveform file associated with the target vibration object in the target business scenario when the target service scene presented by the target application includes a target vibration object that needs to vibrate to vibrate;
记录单元,用于当存在源自目标应用的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;A recording unit, configured to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component originating from the target application; the target vibration waveform file includes a plurality of vibration attribute values, the The current vibration time refers to: when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
处理单元,用于在需恢复所述振动组件的振动时,若所述目标应用呈现的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;A processing unit, configured to generate a restoration vibration time based on the current vibration time if the business scenario presented by the target application is the target business scenario when the vibration of the vibration component needs to be restored;
所述驱动单元,还用于根据所述恢复振动时间和记录的目标振动波形文件,驱动所述振动组件继续振动。The driving unit is further configured to drive the vibrating component to continue vibrating according to the resuming vibration time and the recorded target vibration waveform file.
本申请实施例还提供了一种计算机设备,所述计算机设备包括输入接口和输出接口,所述计算机设备还包括:The embodiment of the present application also provides a computer device, the computer device includes an input interface and an output interface, and the computer device also includes:
处理器,适于实现一条或多条计算机可读指令;以及,a processor adapted to implement one or more computer readable instructions; and,
非易失性的计算机可读存储介质,所述计算机可读存储介质存储有一条或多条计算机可读指令,所述一条或多条计算机可读指令适于由所述处理器加载并执行上述任一振动控制方法的步骤。A non-volatile computer-readable storage medium, the computer-readable storage medium stores one or more computer-readable instructions, and the one or more computer-readable instructions are adapted to be loaded by the processor and execute the above-mentioned The steps of any vibration control method.
本申请实施例还提供了一种非易失性的计算机可读存储介质,所述计算机可读存储介质存储有一条或多条计算机可读指令,所述一条或多条计算机可读指令适于由处理器加载并执行上述所提及的振动控制方法。The embodiment of the present application also provides a non-volatile computer-readable storage medium, the computer-readable storage medium stores one or more computer-readable instructions, and the one or more computer-readable instructions are suitable for The above-mentioned vibration control method is loaded and executed by the processor.
附图说明Description of drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can also obtain other drawings based on these drawings on the premise of not paying creative work.
图1a是本申请实施例提供的一种目标应用呈现业务场景的示意图;Fig. 1a is a schematic diagram of a target application presenting a business scenario provided by an embodiment of the present application;
图1b是本申请实施例提供的另一种目标应用呈现业务场景的示意图;Fig. 1b is a schematic diagram of another target application presenting business scenario provided by the embodiment of the present application;
图2是本申请实施例提供的一种振动控制方法的流程示意图;Fig. 2 is a schematic flow chart of a vibration control method provided in an embodiment of the present application;
图3a是本申请实施例提供的一种记录当前振动时间的示意图;Fig. 3a is a schematic diagram of recording the current vibration time provided by the embodiment of the present application;
图3b是本申请实施例提供的一种基于当前振动时间恢复振动组件的振动的示意图;Fig. 3b is a schematic diagram of restoring the vibration of the vibration component based on the current vibration time provided by the embodiment of the present application;
图4是本申请另一实施例提供的一种振动控制方法的流程示意图;Fig. 4 is a schematic flow chart of a vibration control method provided by another embodiment of the present application;
图5a是本申请实施例提供的一种系统振动接口的处理逻辑示意图;Fig. 5a is a schematic diagram of processing logic of a system vibration interface provided by an embodiment of the present application;
图5b是本申请实施例提供的一种目标应用通过振动控制器记录目标振动波形文件和当前振动时间的示意图;Fig. 5b is a schematic diagram of a target application recording the target vibration waveform file and the current vibration time through the vibration controller provided by the embodiment of the present application;
图5c是本申请实施例提供的一种目标应用通过振动控制器下发目标振动波形文件和当前振动时间的示意图;Fig. 5c is a schematic diagram of a target application delivering a target vibration waveform file and current vibration time through a vibration controller provided by an embodiment of the present application;
图5d是本申请实施例提供的一种目标应用通过系统振动接口和底层硬件进行交互,以实现对振动组件进行振动控制的流程示意图;Fig. 5d is a schematic flow diagram of a target application interacting with the underlying hardware through the system vibration interface to realize vibration control of the vibration component provided by the embodiment of the present application;
图6是本申请另一实施例提供的一种振动控制方法的流程示意图;Fig. 6 is a schematic flowchart of a vibration control method provided by another embodiment of the present application;
图7是本申请实施例提供的一种振动控制装置的结构示意图;Fig. 7 is a schematic structural diagram of a vibration control device provided by an embodiment of the present application;
图8是本申请另一实施例提供的一种振动控制装置的结构示意图;Fig. 8 is a schematic structural diagram of a vibration control device provided by another embodiment of the present application;
图9是本申请又一实施例提供的一种振动控制装置的结构示意图;Fig. 9 is a schematic structural diagram of a vibration control device provided in another embodiment of the present application;
图10是本申请实施例提供的一种计算机设备的结构示意图。FIG. 10 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
在本申请实施例中,后续所提及的目标应用可以是依托计算机设备所运行的任一应用程序,所谓的应用程序可理解成是完成某项或多项特定工作的计算机程序。In the embodiment of the present application, the target application mentioned later may be any application program running on a computer device, and the so-called application program can be understood as a computer program for completing one or more specific tasks.
具体的,从应用程序的运行方式的角度看,后续所提及的目标应用可以是以下任一种:云应用、APP(application,客户端)、轻应用、网页应用,等等。所谓的云应用是指:在云端服务器中安装并运行的应用程序;所谓的APP是指:在终端中安装并运行的应用程序;所谓的轻应用是指:无需下载、即搜即用的全功能的Quick App(快应用),其通常作为子程序运行于其他客户端中;所谓的网页应用是指:支持在浏览器APP所显示的网页中打开,从而运行的应用程序。Specifically, from the perspective of the running mode of the application program, the target application mentioned later may be any of the following: cloud application, APP (application, client), light application, web application, and so on. The so-called cloud application refers to the application program installed and running on the cloud server; the so-called APP refers to the application program installed and running on the terminal; Functional Quick App (quick application), which usually runs as a subroutine in other clients; the so-called web application refers to an application that supports opening and running in the web page displayed by the browser APP.
从应用程序的应用业务的角度看,后续所提及的目标应用可以是以下任一种:游戏应用、即时通讯应用、内容分享应用、音视频播放应用,等等。所谓的游戏应用是指:为用户提供游戏业务以支持用户游玩游戏的应用程序;所谓的即时通讯应用是指:为用户提供即时通讯业务以支持用户之间进行即时的信息交互的应用程序;所谓的内容分享应用是指:为用户提供内容分享业务以支持用户向外界分享内容,以及查看、评论他人的分享内容的应用程序;音视频播放应用是指:为用户提供音视频播放业务以支持用户播放相关音频或视频的应用程序。From the perspective of the application business of the application program, the target application mentioned later may be any of the following: game application, instant messaging application, content sharing application, audio and video playing application, and so on. The so-called game application refers to: an application program that provides game services for users to support users to play games; the so-called instant messaging application refers to: an application program that provides users with instant messaging services to support instant information interaction between users; the so-called The content sharing application refers to an application that provides users with content sharing services to support users to share content with the outside world, as well as viewing and commenting on other people’s shared content; audio and video playback applications refers to: provides users with audio and video playback services to support users An application that plays associated audio or video.
基于上述描述可见,综合应用程序的运行方式的角度和应用业务的角度看,目标应用可以是各式各样的应用程序。例如,如果从应用程序的运行方式的角度来看,目标应用为APP,且从应用程序的应用业务的角度来看,目标应用为游戏应用;那么,目标应用可以是任一普通游戏应用,所谓的普通游戏应用是指在终端中安装并运行的游戏应用。又如,如果从应用程序的运行方式的角度来看,目标应用为云应用,且从应用程序的应用业务的角度来看,目标应用为游戏应用;那么,目标应用可理解成,该目标应用可理解成是任一云游戏应用,所谓的云游戏是指在云游戏服务器中运行的游戏。也就是说,云游戏并不在用户设备中运行,而是在游戏服务器中运行;游戏服务器可将云游戏中的游戏画面、游戏音频压缩编码为媒体流,然后通过网络将媒体流传输给用户设备进行图像显示和音频播放。当用户在游戏界面中触发各种操作时,用户设备可将这些操作产生的操作数据上报给游戏服务器,由游戏服务器在对应的云游戏中根据操作数据而刷新云游戏的游戏画面,再将刷新后的游戏画面返回至用户设备中进行显示,以实现云游戏的游玩。可见,云游戏以云计算技术为基础,云计算技术为云游戏提供强大的图形处理能力与数据运算能力;所谓的云计算是一种计算模式,它将计算任务分布在大量计算机构成的资源池上,使各种应用 系统能够根据需要获取计算力、存储空间和信息服务。Based on the above description, it can be seen that from the perspective of the operating mode of the integrated application program and the perspective of application services, the target application may be various applications. For example, if from the perspective of the running mode of the application, the target application is an APP, and from the perspective of the application business of the application, the target application is a game application; then, the target application can be any ordinary game application, the so-called The common game application of ’ refers to a game application installed and running on a terminal. For another example, if the target application is a cloud application from the perspective of the running mode of the application, and the target application is a game application from the perspective of the application business of the application; then, the target application can be understood as, the target application It can be understood as any cloud game application. The so-called cloud game refers to the game running on the cloud game server. In other words, cloud games do not run on user devices, but on game servers; game servers can compress and encode game screens and game audio in cloud games into media streams, and then transmit the media streams to user devices through the network Perform image display and audio playback. When the user triggers various operations in the game interface, the user device can report the operation data generated by these operations to the game server, and the game server will refresh the game screen of the cloud game according to the operation data in the corresponding cloud game, and then refresh the The final game screen is returned to the user device for display, so as to realize the playing of cloud games. It can be seen that cloud games are based on cloud computing technology, which provides powerful graphics processing capabilities and data computing capabilities for cloud games; the so-called cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers , so that various application systems can obtain computing power, storage space and information services as needed.
在目标应用的运行过程中,该目标应用可为用户呈现一种或多种业务场景。例如,当目标应用为即时通讯应用时,该目标应用所呈现的业务场景可包括但不限于:即时通讯的会话场景。又如,当目标应用为音视频播放应用时,该目标应用所呈现的业务场景可包括但不限于:搜索某音频或视频的音视频搜索场景、播放某音频或视频的音视频播放场景。再如,当目标应用为游戏应用时,该目标应用所呈现的业务场景可包括但不限于:游戏中的虚拟角色驾驶载具(如汽车、船等)的场景、游戏中的虚拟角色持枪射击的场景、游戏中的虚拟角色跳舞的场景、游戏中的至少两个虚拟角色进行赛车比赛的场景,等等。During the running process of the target application, the target application can present one or more business scenarios to the user. For example, when the target application is an instant messaging application, the service scenario presented by the target application may include but not limited to: a session scenario of instant messaging. For another example, when the target application is an audio and video playback application, the business scenarios presented by the target application may include but not limited to: an audio and video search scenario for searching a certain audio or video, and an audio and video playback scenario for playing a certain audio or video. For another example, when the target application is a game application, the business scenarios presented by the target application may include, but are not limited to: scenes in which avatars in games drive vehicles (such as cars, boats, etc.), scenes in which avatars in games hold guns A scene of shooting, a scene of virtual characters dancing in the game, a scene of at least two virtual characters in the game competing in a car, and so on.
进一步的,针对目标应用所呈现的任一业务场景而言,若该任一业务场景中包括需振动的振动对象,则该任一业务场景可称为是目标应用的振动场景。例如,针对游戏应用中所呈现的虚拟角色驾驶载具的场景而言,由于该场景中包括需要振动的载具这一振动对象,因此游戏应用中呈现的虚拟角色驾驶载具的场景可称为是目标应用的振动场景。又如,针对游戏应用中所呈现的至少两个虚拟角色对象进行赛车比赛的场景而言,由于该场景中的至少两个虚拟角色在赛车过程中发生了碰撞,这两个虚拟角色所驾驶的赛车便会需要振动,即该场景中包括了需要振动的赛车这一振动对象,因此游戏应用中呈现的至少两个虚拟角色对象进行赛车比赛的场景也可称为是目标应用的振动场景。Further, for any business scene presented by the target application, if the any business scene includes a vibrating object that needs to vibrate, then the any business scene may be called a vibration scene of the target application. For example, for the scene of a virtual character driving a vehicle presented in a game application, since the scene includes a vibration object that needs to vibrate a vehicle, the scene of a virtual character driving a vehicle presented in a game application can be called is the vibration scene of the target application. As another example, for a scene in which at least two virtual character objects presented in a game application compete in a car race, since at least two virtual characters in the scene collide during the racing process, the vehicle driven by the two virtual characters The racing car needs to vibrate, that is, the scene includes the vibrating object of the racing car that needs to vibrate. Therefore, the scene in which at least two virtual character objects presented in the game application compete in a racing car can also be called the vibrating scene of the target application.
需要说明的是,随着目标应用的运行方式的不同,目标应用呈现业务场景的方式也随之不同。以目标应用为游戏应用,且业务场景为游戏中的至少两个虚拟角色进行赛车的场景为例,若目标应用的运行方式是在终端中运行的方式,则目标应用可直接在所处终端的终端屏幕中显示如图1a所示的两个虚拟角色进行赛车的游戏画面,从而为用户呈现出该业务场景;若目标应用的运行方式是在云游戏服务器中运行的方式,则目标应用可将两个虚拟角色进行赛车的游戏画面下发至相连接的终端,使得该相连接的终端在终端屏幕中依次显示接收到的游戏画面,从而为用户呈现出该业务场景,如图1b所示。此处所提及的终端是指:支持用户手持或触碰,且内置有一个或多个振动组件的任一设备;如智能手机、平板电脑、笔记本电脑、智能手表,等等;其中,振动组件是指具有振动能力的任一组件,如马达、弹片、电机,等等。It should be noted that, with the different operating modes of the target application, the way the target application presents the business scenario is also different. Taking the target application as a game application and the business scenario as an example where at least two virtual characters in the game are racing a car, if the target application is run in a terminal, the target application can be directly run on the terminal where it is located. The game screen of two virtual characters racing a car as shown in Figure 1a is displayed on the terminal screen, thereby presenting the business scenario to the user; if the target application is run in the cloud game server, the target application can use The game screen of the two virtual characters racing is sent to the connected terminal, so that the connected terminal displays the received game screen in sequence on the terminal screen, thereby presenting the business scene for the user, as shown in Figure 1b. The terminal mentioned here refers to: any device that supports the user to hold or touch, and has one or more built-in vibration components; such as smartphones, tablet computers, laptops, smart watches, etc.; among them, the vibration A component is any component that has the ability to vibrate, such as a motor, shrapnel, motor, and so on.
为了实现在目标应用呈现振动场景时,可以灵活地控制终端中的振动组件进行振动,使得振动组件的振动效果和目标应用之间可以契合,本申请实施例提出了一种振动控制方案。具体的,该振动控制方案的大致原理如下:在呈现目标应用的任一振动场景时,终端可以按照指定的振动波形文件(包括多个振动时间对应的振动属性值的文件),驱动内置的至少一个振动组件进行振动。在振动组件的振动过程中,若存在源自目标应用的关于振动组件的振动暂停事件,则目标应用可记录当前所使用的振动波形文件以及振动时间,以使得在目标应用需恢复振动组件的振动时,目标应用可通知终端按照该记录的振动波形文件和记录的振动时间,驱动振动组件继续振动,以实现基于振动暂停的位置来恢复振动组件的振动。当然可选的,在目标应用需恢复振动组件的振动时,目标应用也可只通过记录的振动波形文件,而不记录的振动时间;这种情况下,目标应用可通过通知终端按照记录的振动波形文件和其他振动时间(如记录的振动波形文件中的起始振动时间等),驱动振动组件继续振动。或者,目标应用也可不通过记录的振动波形文件和记录的振动时间;这种情况下,目标应用可通过通知终端按照一个或多个新的振动波形文件,驱动振动组件继 续振动。In order to flexibly control the vibration component in the terminal to vibrate when the target application presents a vibration scene, so that the vibration effect of the vibration component can match the target application, an embodiment of the present application proposes a vibration control scheme. Specifically, the general principle of the vibration control scheme is as follows: when presenting any vibration scene of the target application, the terminal can drive the built-in at least A vibration component vibrates. During the vibration process of the vibration component, if there is a vibration suspension event about the vibration component originating from the target application, the target application can record the currently used vibration waveform file and vibration time, so that the vibration of the vibration component needs to be resumed in the target application , the target application can notify the terminal to drive the vibration component to continue to vibrate according to the recorded vibration waveform file and the recorded vibration time, so as to resume the vibration of the vibration component based on the position where the vibration is suspended. Optionally, when the target application needs to restore the vibration of the vibration component, the target application can also only pass the recorded vibration waveform file without the recorded vibration time; in this case, the target application can notify the terminal according to the recorded vibration Waveform files and other vibration times (such as the initial vibration time in the recorded vibration waveform files, etc.), drive the vibration components to continue to vibrate. Alternatively, the target application may not pass the recorded vibration waveform file and recorded vibration time; in this case, the target application may drive the vibration component to continue vibrating by notifying the terminal according to one or more new vibration waveform files.
由此可见,通过该振动控制方案可实现如下有益效果:①可基于目标应用的播放或暂停,对振动组件的状态进行实时变化,即可将振动组件的状态从振动状态无缝切换至暂停状态,以及从暂停状态无缝切换至振动状态,达到灵活控制振动组件的振动暂停和振动恢复的目的,提升振动效果和目标应用之间的契合度,还避免了为振动组件设置振动时长,在启动振动后达到振动时长时才停止振动这种机械、固化的振动方式,带来的终端中的振动组件损耗较大的问题。②通过记录存在振动暂停事件时所涉及的振动波形文件以及振动时间,可实现在需恢复振动组件的振动时,支持振动组件基于振动暂停的位置来恢复振动,提升振动暂停和继续播放的连续性,从而在一定程度上保障用户体验的连续性和完整性,实现更真实完整的振动体验。It can be seen that the vibration control scheme can achieve the following beneficial effects: ① The state of the vibration component can be changed in real time based on the playback or pause of the target application, and the state of the vibration component can be seamlessly switched from the vibration state to the pause state , and seamlessly switch from the pause state to the vibration state, to achieve the purpose of flexibly controlling the vibration pause and vibration recovery of the vibration component, improve the fit between the vibration effect and the target application, and avoid setting the vibration time for the vibration component. The mechanical and solidified vibration mode of stopping the vibration when the vibration time reaches a long time after vibration has brought about the problem of large loss of vibration components in the terminal. ②By recording the vibration waveform files and vibration time involved in the existence of vibration pause events, it can be realized that when the vibration of the vibration component needs to be restored, the vibration component can be supported to resume vibration based on the position of the vibration pause, and the continuity of vibration pause and continuous playback can be improved , so as to guarantee the continuity and integrity of user experience to a certain extent, and realize a more real and complete vibration experience.
基于上述的描述,本申请实施例提出一种振动控制方法,该振动控制方法可以由计算机设备上运行的目标应用实现,该计算机设备可以是服务器或终端;例如,当目标应用为APP时,即目标应用运行于终端中时,该振动控制方法可以由终端通过该APP实现,当目标应用为云应用时,即目标应用未运行于终端中时,该振动控制方法可以由云服务器通过该云应用实现。Based on the above description, an embodiment of the present application proposes a vibration control method, which can be implemented by a target application running on a computer device, and the computer device can be a server or a terminal; for example, when the target application is an APP, that is When the target application is running in the terminal, the vibration control method can be implemented by the terminal through the APP; when the target application is a cloud application, that is, when the target application is not running in the terminal, the vibration control method can be implemented by the cloud server through the cloud application accomplish.
基于上述的描述,本申请实施例提出一种振动控制方法,在下面的实施例中,从目标应用的角度对该振动控制方法进行说明。请参见图2,该振动控制方法可包括以下步骤S201-S205:Based on the above description, an embodiment of the present application proposes a vibration control method. In the following embodiments, the vibration control method is described from the perspective of target application. Please refer to FIG. 2, the vibration control method may include the following steps S201-S205:
S201,在目标应用的目标业务场景中包括需振动的目标振动对象时,通知终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。S201. When the target service scene of the target application includes a target vibration object to be vibrated, notify the terminal to drive a vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target service scene.
其中,目标业务场景又可称为当前业务场景,其具体是指目标应用最近所呈现的业务场景,即呈现时间与系统时间距离最近的业务场景。例如,设目标应用总共可提供4个业务场景,依次为:业务场景A、业务场景B、业务场景C、业务场景D。若终端正在呈现目标应用的业务场景A,则目标业务场景便为该业务场景A;若终端已呈现了目标应用的业务场景A,此时正在呈现业务场景B,则目标业务场景便为该业务场景B;若终端已呈现了业务场景A-D这4个业务场景,此时正在重新呈现业务场景A,则目标业务场景为该业务场景A,以此类推。Wherein, the target business scenario may also be called the current business scenario, which specifically refers to the business scenario presented by the target application recently, that is, the business scenario whose presentation time is closest to the system time. For example, it is assumed that the target application can provide a total of four business scenarios, which are: business scenario A, business scenario B, business scenario C, and business scenario D. If the terminal is presenting the business scenario A of the target application, the target business scenario is the business scenario A; Scenario B; if the terminal has presented the four business scenarios of business scenarios A-D and is re-presenting business scenario A at this time, then the target business scenario is the business scenario A, and so on.
由前述可知,终端是通过在终端屏幕中显示用于描述目标业务场景的一系列画面,来为用户呈现该目标业务场景的;也就是说,当终端呈现任一业务场景时,终端屏幕中会依次显示该任一业务场景所涉及的各帧画面。基于此,本申请实施例所提及的“目标业务场景中包括需振动的目标振动对象”的含义,可理解成是:终端屏幕所显示的画面中包括需振动的目标振动对象。其中,目标振动对象可以是指:需振动的任一对象。例如,假设目标应用为游戏应用,目标业务场景为该游戏应用所呈现的两个虚拟角色进行赛车的场景,则由于在真实赛车场景中,当两个车辆发生碰撞或者车辆行驶在不平整的道路上时,车辆通常会产生振动;因此为给用户营造在真实赛车场景中进行赛车的氛围,提升用户游戏体验,也可在虚拟角色驾驶的车辆在赛车过程中发生碰撞或驾驶在不平整的道路上时,控制虚拟角色所驾驶的车辆进行振动。那么此情况下,目标振动对象可以是需振动的任一车辆。It can be seen from the foregoing that the terminal presents the target business scenario to the user by displaying a series of pictures describing the target business scenario on the terminal screen; that is, when the terminal presents any business scenario, the terminal screen will display Each frame picture involved in any business scene is displayed in sequence. Based on this, the meaning of "the target business scene includes the target vibration object that needs to vibrate" mentioned in the embodiment of the present application can be understood as: the screen displayed on the terminal screen includes the target vibration object that needs to vibrate. Wherein, the target vibration object may refer to any object to be vibrated. For example, assuming that the target application is a game application, and the target business scenario is a scene in which two virtual characters are racing a car presented by the game application, since in a real racing scene, when two vehicles collide or the vehicle is driving on an uneven road When driving, the vehicle usually produces vibration; therefore, in order to create an atmosphere of racing in a real racing scene for the user and improve the user's gaming experience, it is also possible for the vehicle driven by the virtual character to collide or drive on an uneven road during the racing process. When on, control the vehicle driven by the avatar to vibrate. In this case, the target vibration object may be any vehicle to be vibrated.
在步骤S201的具体实施过程中,若终端所呈现目标应用的目标业务场景中包括需振 动的目标振动对象,则计算机设备上运行的目标应用可先获取目标振动对象相关联的目标振动波形文件。具体的,计算机设备上运行的目标应用可先获取目标业务场景关联的目标振动描述文件,该目标振动描述文件中可包括:目标业务场景中的各个振动对象关联的振动波形文件;然后,计算机设备上运行的目标应用可从该目标振动描述文件中获取目标振动对象关联的振动波形文件作为目标振动波形文件。计算机设备上运行的目标应用在获取到该目标振动波形文件后,可将该目标振动波形文件下发至终端,以通知终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。其中,该目标振动波形文件可包括多个振动时间对应的振动属性值;相应的,终端按照目标振动波形文件驱动振动组件进行振动的具体方式可以是:按照振动时间从早到晚的顺序,依次采用各个振动时间的振动属性值驱动振动组件进行振动。此处所提及的振动属性值可包括以下至少一项:振动强度维度下的振动强度值,以及振动频率维度下的振动频率值,等等。需要说明的是,目标波形文件中的任意两个振动时间对应的振动属性值可相同,也可不同,对此不作限定;并且,本申请实施例所提及的振动时间是指基于振动波形的起始点所确定的相对时间,并非是系统时间。例如,基于振动波形的起始点,目标振动波形文件可包括第0秒的振动属性值,第1秒的振动属性值,等等;可见,目标波形文件所涉及的振动时间与目标应用所处设备的系统时间无任何关系。In the specific implementation process of step S201, if the target service scene of the target application presented by the terminal includes a target vibration object that needs to vibrate, the target application running on the computer device can first obtain the target vibration waveform file associated with the target vibration object. Specifically, the target application running on the computer device can first obtain the target vibration description file associated with the target business scene, which may include: the vibration waveform files associated with each vibration object in the target business scene; then, the computer device The target application running on the above can obtain the vibration waveform file associated with the target vibration object as the target vibration waveform file from the target vibration description file. After the target application running on the computer device obtains the target vibration waveform file, it can send the target vibration waveform file to the terminal to notify the terminal to drive The vibration component inside the terminal vibrates. Wherein, the target vibration waveform file may include vibration attribute values corresponding to multiple vibration times; correspondingly, the specific method for the terminal to drive the vibration component to vibrate according to the target vibration waveform file may be: according to the order of vibration time from early to late, sequentially The vibration attribute value of each vibration time is used to drive the vibration component to vibrate. The vibration attribute value mentioned here may include at least one of the following: a vibration intensity value under the vibration intensity dimension, a vibration frequency value under the vibration frequency dimension, and so on. It should be noted that the vibration attribute values corresponding to any two vibration times in the target waveform file may be the same or different, which is not limited; and the vibration time mentioned in the embodiment of the present application refers to the vibration time based on the vibration waveform The relative time determined by the starting point is not the system time. For example, based on the starting point of the vibration waveform, the target vibration waveform file may include the vibration attribute value of the 0th second, the vibration attribute value of the 1st second, etc.; it can be seen that the vibration time involved in the target waveform file is different from the device where the target application is located. The system time has nothing to do with it.
进一步的,计算机设备通过运行的目标应用在实现步骤S201时,还可同步地向终端下发一个心跳信号;该心跳信号是指:用于指示终端维持振动组件进行振动的信号。需说明的是,本申请实施例对心跳信号的具体形态不作限定;例如,该心跳信号可以是一个指定数值(如“0”、“1”等数值);又如,该心跳信号也可以是一个预设的文本信息(如“请维持振动”、“继续振动”等文本信息),等等。计算机设备上运行的目标应用,在首次下发心跳信号后,还可在终端按照目标振动波形文件驱动振动组件进行振动的过程中,按照目标频率生成心跳信号;该目标频率可以根据经验值或者业务需求设置,例如目标频率可以是:每隔1秒生成一个心跳信号的频率,或者每隔2秒生成一个心跳信号的频率,等等。计算机设备上运行的目标应用可在每次生成心跳信号后,将生成的心跳信号下发至终端,以使得终端基于心跳信号维持振动组件的振动。此处所提及的“终端基于心跳信号维持振动组件的振动”的含义是指:终端只要每隔目标频率所对应的间隔时长,定期接收到心跳信号,则可按照目标振动波形文件驱动振动组件一直振动;否则,则暂停振动组件的振动。例如,目标频率为每隔1秒生成心跳信号的频率,则终端只要每隔1秒定期接收到心跳信号,则可按照标振动波形文件驱动振动组件一直振动;否则,则暂停振动组件的振动。Further, when the target application running by the computer device implements step S201, it can also synchronously send a heartbeat signal to the terminal; the heartbeat signal refers to a signal used to instruct the terminal to maintain the vibrating component to vibrate. It should be noted that the embodiment of the present application does not limit the specific form of the heartbeat signal; for example, the heartbeat signal can be a specified value (such as "0", "1" and other values); as another example, the heartbeat signal can also be A preset text message (such as "please keep vibrating", "continue vibrating" and other text messages), and so on. The target application running on the computer device can also generate a heartbeat signal according to the target frequency when the terminal drives the vibration component to vibrate according to the target vibration waveform file after sending the heartbeat signal for the first time; the target frequency can be based on experience values or business Requirement setting, for example, the target frequency can be: the frequency of generating a heartbeat signal every 1 second, or the frequency of generating a heartbeat signal every 2 seconds, and so on. The target application running on the computer device can send the generated heartbeat signal to the terminal after each generation of the heartbeat signal, so that the terminal maintains the vibration of the vibration component based on the heartbeat signal. The meaning of "the terminal maintains the vibration of the vibration component based on the heartbeat signal" mentioned here means: as long as the terminal regularly receives the heartbeat signal every interval corresponding to the target frequency, it can drive the vibration component according to the target vibration waveform file Always vibrate; otherwise, suspend the vibration of the vibrating component. For example, if the target frequency is the frequency at which heartbeat signals are generated every 1 second, as long as the terminal regularly receives heartbeat signals every 1 second, it can drive the vibration component to vibrate according to the standard vibration waveform file; otherwise, the vibration of the vibration component will be suspended.
S202,当存在源自目标应用的关于振动组件的振动暂停事件时,记录目标振动波形文件以及当前振动时间。S202. When there is a vibration suspension event about the vibration component originating from the target application, record the target vibration waveform file and the current vibration time.
在一种具体实现中,由于振动组件的振动是由于目标业务场景中存在需振动的目标振动对象而触发的,而在实际运用中,可能存在针对该目标振动对象的振动暂停操作的情况。因此,本申请实施例可在目标振动对象被暂停振动时,控制终端中的振动组件也暂停振动,从而实现振动组件的振动效果和目标振动对象的振动效果一致,进而实现振动组件的振动与目标应用之间的完美契合,为用户提供真实完整的振动体验。基于此,计算机设备上运行的目标应用可响应于针对目标对象的振动暂停操作,主动向终端发送振动暂停通知,以通知终端控制振动组件暂停振动。那么,在此实现中,振动暂停事件可以包括:计算机设 备上运行的目标应用响应于针对目标对象的振动暂停操作,向终端发送振动暂停通知的事件。In a specific implementation, since the vibration of the vibrating component is triggered by the presence of a target vibration object that needs to vibrate in the target business scene, in actual practice, there may be situations where the vibration operation for the target vibration object is suspended. Therefore, in the embodiment of the present application, when the vibration of the target vibration object is suspended, the vibration component in the control terminal also suspends vibration, so that the vibration effect of the vibration component is consistent with the vibration effect of the target vibration object, and then the vibration of the vibration component is consistent with the target vibration effect. The perfect fit between applications provides users with a real and complete vibration experience. Based on this, the target application running on the computer device can actively send a vibration suspension notification to the terminal in response to the vibration suspension operation on the target object, so as to notify the terminal to control the vibration component to suspend vibration. Then, in this implementation, the vibration pause event may include: the target application running on the computer device sends a vibration pause notification to the terminal in response to the vibration pause operation on the target object.
其中,上述所提及的振动暂停操作可以是:触发目标振动对象暂停振动的任一操作。例如,若用户对终端屏幕中的画面暂停显示组件执行了触发操作(如点击操作、按压操作等),则此时会触发在终端屏幕中暂停显示目标业务场景所涉及的画面,从而会触发画面中的目标振动对象暂停振动;那么,此情况下可将针对画面暂停组件的触发操作,视为针对目标振动对象的振动暂停操作。又如,目标应用为游戏应用,目标振动对象为用户所使用的虚拟角色所驾驶的车辆,若用户通过某游戏操作,导致该用户所使用的虚拟角色的生命值减少至0,则此时会触发用户所使用的虚拟角色暂停驾驶该车辆,从而会触发该车辆(即目标振动对象)暂停振动;那么,此情况下可将触发虚拟角色的生命值减少至0的游戏操作,视为针对目标振动对象的振动暂停操作。再如,若用户关闭了终端屏幕中所显示的目标业务场景所涉及的画面,则此时会触发目标振动对象暂停振动;那么,此情况下可关闭目标业务场景所涉及的画面的操作,视为针对目标振动对象的振动暂停操作。此处不对用户关闭目标业务场景所涉及的画面的具体方式进行限定,如用户可通过将目标业务场景所涉及的画面切换至终端的系统主界面以关闭目标业务场景所涉及的画面,也可对终端执行熄屏操作以关闭目标业务场景所涉及的画面等。Wherein, the vibration pause operation mentioned above may be any operation that triggers the target vibration object to pause vibration. For example, if the user performs a trigger operation (such as a click operation, a press operation, etc.) on the screen pause display component in the terminal screen, it will trigger the pause display of the screen involved in the target business scene on the terminal screen, thereby triggering the screen The target vibration object in pauses the vibration; then, in this case, the trigger operation for the screen pause component can be regarded as a vibration pause operation for the target vibration object. For another example, the target application is a game application, and the target vibration object is a vehicle driven by the virtual character used by the user. Triggering the avatar used by the user to stop driving the vehicle will trigger the vehicle (that is, the target vibration object) to suspend vibration; then, in this case, the game operation that triggers the avatar's life value to be reduced to 0 can be regarded as targeting the target The vibration pause action for the vibration object. For another example, if the user closes the picture involved in the target business scene displayed on the terminal screen, the target vibration object will be triggered to suspend vibration; then, in this case, the operation of closing the picture involved in the target business scene, depending on Pauses the action for vibrations on the target vibration object. The specific method for the user to close the screen involved in the target business scenario is not limited here. For example, the user can close the screen involved in the target business scenario by switching the screen involved in the target business scenario to the system main interface of the terminal, or close the screen involved in the target business scenario. The terminal performs a screen-off operation to close the screens and the like involved in the target business scenario.
另一种具体实现中,由于计算机设备上运行的目标应用可按照目标频率,定期地向终端发送心跳信号,以使得终端基于该心跳信号维持振动组件的振动;而在实际运用中,可能存在目标应用被异常关闭的情况,此情况下会导致目标应用无法按照目标频率定期生成并发送心跳信号给终端,造成心跳信号丢失的情况。因此,本申请实施例可在因目标应用被异常关闭而造成心跳信号丢失时,控制终端中的振动组件也暂停振动,从而实现振动组件的振动效果和目标应用的暂停一致,进而实现振动组件的振动与目标应用之间的完美契合,为用户提供真实完整的振动体验。那么,在此实现中,振动暂停事件可以包括:心跳信号丢失的事件。In another specific implementation, since the target application running on the computer device can periodically send a heartbeat signal to the terminal according to the target frequency, so that the terminal maintains the vibration of the vibration component based on the heartbeat signal; in practice, there may be a target When the application is closed abnormally, the target application will not be able to regularly generate and send the heartbeat signal to the terminal according to the target frequency, resulting in the loss of the heartbeat signal. Therefore, in the embodiment of the present application, when the heartbeat signal is lost due to the abnormal shutdown of the target application, the vibration component in the control terminal also suspends the vibration, so that the vibration effect of the vibration component is consistent with the suspension of the target application, and further realizes the vibration component. The perfect fit between vibration and target applications provides users with a real and complete vibration experience. Then, in this implementation, the vibration pause event may include: a heartbeat signal loss event.
基于上述描述可知,振动暂停事件可包括以下至少一项:①计算机设备上运行的目标应用响应于针对目标对象的振动暂停操作,向所述终端发送振动暂停通知的事件;以及,②心跳信号丢失的事件。其中,第①种振动暂停事件是由计算机设备上运行的目标应用主动引发的,第②种振动暂停事件是由目标应用被动引发的。当存在该振动暂停事件时,计算机设备上运行的目标应用可记录目标振动波形文件以及当前振动时间。由前述可知,目标振动波形文件包括多个振动时间对应的振动属性值;相应的,当前振动时间是指:在存在该振动暂停事件时,目标振动波形文件中被采用的振动属性值所对应的振动时间。例如,终端最开始采用目标振动波形文件中的第0秒的振动属性值,控制振动组件进行振动,并接着采用第1秒的振动属性值,控制振动组件进行振动,再采用第2秒的振动属性值,控制振动组件进行振动,以此类推;若在存在振动暂停事件时,终端正采用第30秒的振动属性值控制振动组件进行振动,则可记录当前振动时间为第30秒,如图3a所示。Based on the above description, it can be known that the vibration pause event may include at least one of the following: ① an event in which the target application running on the computer device sends a vibration pause notification to the terminal in response to the vibration pause operation on the target object; and, ② the heartbeat signal is lost event. Among them, the first kind of vibration pause event is actively caused by the target application running on the computer device, and the second kind of vibration pause event is passively caused by the target application. When the vibration pause event exists, the target application running on the computer device can record the target vibration waveform file and the current vibration time. As can be seen from the foregoing, the target vibration waveform file includes multiple vibration attribute values corresponding to the vibration time; correspondingly, the current vibration time refers to: when the vibration pause event exists, the target vibration waveform file corresponds to the vibration attribute value adopted. vibration time. For example, the terminal initially uses the vibration attribute value of the 0th second in the target vibration waveform file to control the vibration component to vibrate, and then uses the vibration attribute value of the 1st second to control the vibration component to vibrate, and then uses the vibration of the second second Attribute value, control the vibration component to vibrate, and so on; if the terminal is using the vibration attribute value of the 30th second to control the vibration component to vibrate when there is a vibration pause event, the current vibration time can be recorded as the 30th second, as shown in the figure 3a shown.
S203,在需恢复振动组件的振动时,若目标应用的业务场景为目标业务场景,则基于当前振动时间,生成恢复振动时间。S203. When the vibration of the vibration component needs to be restored, if the business scenario of the target application is the target business scenario, generate a vibration restoration time based on the current vibration time.
在一种具体实现中,若振动组件的暂停振动由于目标应用被异常关闭而导致心跳信号丢失从而被触发的,则在实际运用中,可能存在重新启动目标应用的情况。因此,目标应 用重新启动后,可再次确定需恢复振动组件的振动。另一种具体实现中,若振动组件的暂停振动由于目标业务场景中的目标振动对象被暂停振动而触发的,则在实际运用中,可能存在针对该目标振动对象的振动恢复操作的情况。因此,目标应用可在检测到针对该目标振动对象的振动恢复操作时,确定需恢复振动组件的振动。也就是说。需恢复振动组件的振动的情况可包括以下至少一种:目标应用在被异常关闭后,再次被重新成功启动;或者,检测到针对目标振动对象的振动恢复操作。In a specific implementation, if the suspended vibration of the vibrating component is triggered due to the loss of the heartbeat signal due to the abnormal shutdown of the target application, the target application may be restarted in practice. Therefore, after the target application is restarted, it can be determined again that the vibration of the vibration component needs to be restored. In another specific implementation, if the suspension of vibration of the vibration component is triggered by the suspension of vibration of a target vibration object in the target business scene, in actual practice, there may be cases of a vibration recovery operation for the target vibration object. Therefore, the target application can determine that the vibration of the vibration component needs to be restored when detecting the vibration restoration operation on the target vibration object. That is. The situation that the vibration of the vibration component needs to be restored may include at least one of the following: the target application is restarted successfully after being closed abnormally; or, a vibration recovery operation for the target vibration object is detected.
其中,此处所提及的振动恢复操作可以是:触发目标振动对象恢复振动的任一操作。例如,若用户对终端屏幕中的画面播放组件触发操作(如点击操作、按压操作等),则此时会触发在终端屏幕中继续显示目标业务场景所涉及的画面,从而会触发画面中的目标振动对象继续振动;那么,此情况下可将针对画面播放组件的触发操作,视为针对目标振动对象的振动恢复操作。又如,目标应用为游戏应用,目标振动对象为用户所使用的虚拟角色所驾驶的车辆,若用户通过某生命值增加操作,使得该用户所使用的虚拟角色的生命值增加至有效数值(如20、30等),则此时会触发用户所使用的虚拟角色继续驾驶该车辆,从而会触发该车辆(即目标振动对象)恢复振动;那么,此情况下可将触发虚拟角色的生命值从0增加至有效数值的游戏操作,视为针对目标振动对象的振动恢复操作。再如,若用户再次打开了终端屏幕中所显示的目标业务场景所涉及的画面,则此时会触发目标振动对象恢复振动;那么,此情况下可打开目标业务场景所涉及的画面的操作,视为针对目标振动对象的振动暂停操作。Wherein, the vibration recovery operation mentioned here may be any operation that triggers the target vibration object to resume vibration. For example, if the user triggers an operation (such as click operation, press operation, etc.) on the screen playback component on the terminal screen, it will trigger the continuous display of the screen involved in the target business scene on the terminal screen, thereby triggering the target in the screen. The vibration object continues to vibrate; then, in this case, the trigger operation for the screen playing component can be regarded as a vibration recovery operation for the target vibration object. For another example, the target application is a game application, and the target vibration object is a vehicle driven by the virtual character used by the user. If the user performs a life value increase operation, the life value of the virtual character used by the user increases to a valid value (such as 20, 30, etc.), then at this time, the virtual character used by the user will be triggered to continue driving the vehicle, thereby triggering the vehicle (that is, the target vibration object) to resume vibration; then, in this case, the life value of the triggered virtual character can be changed from The game operation that increases from 0 to a valid value is regarded as a vibration recovery operation for the target vibration object. For another example, if the user opens the picture involved in the target business scene displayed in the terminal screen again, the target vibration object will be triggered to resume vibration at this time; then, in this case, the operation of opening the picture involved in the target business scene, Treated as a vibration pause action on the target vibration object.
计算机设备上运行的目标应用在需恢复振动组件的振动时,若目标应用的业务场景(即需恢复振动组件的振动时的业务场景)为目标业务场景,则计算机设备上运行的目标应用可基于当前振动时间,生成恢复振动时间,并继续执行后续步骤S204-S205。其中,恢复振动时间是指:控制振动组件开始恢复振动的振动时间;基于当前振动时间,生成恢复振动时间的具体方式可以是以下任一种:When the target application running on the computer device needs to restore the vibration of the vibration component, if the business scenario of the target application (that is, the business scenario when the vibration of the vibration component needs to be restored) is the target business scenario, then the target application running on the computer device can be based on For the current vibration time, generate a recovery vibration time, and continue to execute the subsequent steps S204-S205. Among them, the recovery vibration time refers to: the vibration time for the control vibration component to start to recover vibration; based on the current vibration time, the specific method of generating the recovery vibration time can be any of the following:
①将当前振动时间确定为恢复振动时间。例如,当前振动时间为第30秒,则可将第30秒确定为恢复振动时间。① Determine the current vibration time as the recovery vibration time. For example, if the current vibration time is the 30th second, the 30th second may be determined as the resuming vibration time.
②将早于当前振动时间的一个振动时间确定为恢复振动时间。例如,可将起始振动时间确定为恢复振动时间。又如,可将早于当前振动时间、且与当前振动时间相差第一指定时长的振动时间确定为恢复振动时间等;此处的第一指定时长可根据业务需求或者经验值设置,如第一指定时长为2秒,当前振动时间为第30秒,则可将第28秒确定为恢复振动时间。② Determine a vibration time earlier than the current vibration time as the recovery vibration time. For example, the initial vibration time may be determined as the recovery vibration time. As another example, the vibration time that is earlier than the current vibration time and differs from the current vibration time by the first specified duration can be determined as the recovery vibration time, etc.; the first specified duration here can be set according to business needs or experience values, such as the first The specified duration is 2 seconds, and the current vibration time is the 30th second, then the 28th second can be determined as the recovery vibration time.
③将晚于当前振动时间的一个振动时间确定为恢复振动时间。例如,可将晚于当前振动时间、且与当前振动时间相差第二指定时长的振动时间确定为恢复振动时间;此处的第二指定时长可根据业务需求或者经验值设置,如根据业务需求将第二指定时长设置为2秒,当前振动时间为第30秒,则可将第32秒确定为恢复振动时间。又如,考虑到目标应用所呈现的目标业务场景可能是一个实时场景;在这种实时场景下,其所涉及的画面随着时间的流逝而实时变化,在用户暂停显示了画面并重新播放画面时,需跳转至实时最新的画面进行显示。因此,为保证后续的振动效果和画面的一致性,可将晚于当前振动时间、且与当前振动时间相差动态时长的振动时间确定为恢复振动时间;此处的动态时长是根据存在振动暂停事件的时刻,与确定需恢复振动组件的振动的时刻之间的时刻差确定的,如 存在振动暂停事件的时刻为系统时刻10点58分10秒,而确定需恢复振动组件的振动的时刻为系统时刻10点58分15秒,则这两个时刻之间的时刻差为5,那么可确定动态时长为5秒,若当前振动时间为第30秒,则可将第35秒确定为恢复振动时间。③ Determine a vibration time later than the current vibration time as the recovery vibration time. For example, the vibration time that is later than the current vibration time and differs from the current vibration time by a second specified duration can be determined as the recovery vibration time; the second specified duration here can be set according to business needs or experience values, such as according to business needs. The second specified duration is set to 2 seconds, and the current vibration time is the 30th second, then the 32nd second can be determined as the recovery vibration time. As another example, considering that the target business scenario presented by the target application may be a real-time scenario; in this real-time scenario, the involved images change in real time as time goes by, and when the user pauses the displayed image and replays the image , it needs to jump to the latest real-time screen for display. Therefore, in order to ensure the consistency of the subsequent vibration effect and the screen, the vibration time that is later than the current vibration time and has a dynamic duration difference from the current vibration time can be determined as the recovery vibration time; the dynamic duration here is based on the existence of a vibration pause event The time difference between the time and the time when the vibration of the vibrating component needs to be restored is determined. For example, the time when there is a vibration suspension event is the system time 10:58:10, and the time when the vibration of the vibrating component is determined to be restored is the system time The time is 10:58:15, and the time difference between these two moments is 5, then the dynamic duration can be determined to be 5 seconds. If the current vibration time is the 30th second, the 35th second can be determined as the recovery vibration time .
需要说明的是,上述只是示例性地列举了几种确定恢复振动时间的实现方式,并非穷举;例如,在其他实施例中,也可根据业务需求或经验值预设一个振动时间,使得目标应用在需恢复振动组件的振动时,且目标应用的业务场景为目标业务场景时,可直接将预设的振动时间确定为恢复振动时间。It should be noted that the above are just examples of several ways to determine the recovery vibration time, and are not exhaustive; for example, in other embodiments, a vibration time can also be preset according to business requirements or experience values, so that the target When the application needs to restore the vibration of the vibration component and the business scenario of the target application is the target business scenario, the preset vibration time can be directly determined as the vibration recovery time.
S204,基于恢复振动时间和记录的目标振动波形文件生成振动恢复通知。S204. Generate a vibration recovery notification based on the vibration recovery time and the recorded target vibration waveform file.
在一种具体实现中,考虑到计算机设备上运行的目标应用在实现步骤S201时,已将目标振动波形文件下发给终端;因此,计算机设备上运行的目标应用在实现步骤S204时,可根据恢复振动时间和记录的目标振动波形文件的文件标识(如文件号、文件名称等),生成振动恢复通知。即此具体实现中,振动恢复通知中可包括:目标振动波形文件的文件标识。由于文件标识的数据量通常远小于文件本身的数据量,因此采用此实施方式生成振动恢复通知,可有效减小振动恢复通知的数据量,从而节省传输振动恢复通知所需的资源,以及缩短振动恢复通知的传输时长,进而提升通知的及时性。In a specific implementation, it is considered that the target application running on the computer device has already sent the target vibration waveform file to the terminal when implementing step S201; therefore, when the target application running on the computer device implements step S204, the Recover the vibration time and the file identification (such as file number, file name, etc.) of the recorded target vibration waveform file, and generate a vibration recovery notification. That is, in this specific implementation, the vibration recovery notification may include: the file identifier of the target vibration waveform file. Since the data volume of the file identification is usually much smaller than the data volume of the file itself, using this implementation method to generate the vibration recovery notification can effectively reduce the data volume of the vibration recovery notification, thereby saving the resources required for transmitting the vibration recovery notification and shortening the vibration time. Restore the transmission duration of notifications, thereby improving the timeliness of notifications.
那么在此具体实现中,步骤S204的具体实施方式可以是:先将当前振动时间作为基准,计算恢复振动时间和当前振动时间之间的相对时间偏移量;例如,设当前振动时间为第30秒:若恢复振动时间为第35秒,则相对时间偏移量为5;若恢复振动时间为第28秒,则相对时间偏移量为-2;若恢复振动时间为第30秒,则相对时间偏移量为0。另外,目标应用可确定记录的目标振动波形文件的文件标识。然后,目标应用可根据相对时间偏移量和文件标识,生成振动恢复通知。也就是说,此实施方式下的振动恢复通知除了包括文件标识外,还可包括相对时间偏移量。或者,步骤S204的具体实施方式可以是:确定记录的目标振动波形文件的文件标识,并直接采用恢复振动时间和文件标识,生成振动恢复通知。也就是说,此实施方式下的振动恢复通知除了包括文件标识外,还可包括该恢复振动时间。Then in this specific implementation, the specific implementation method of step S204 can be: first, the current vibration time is used as a reference, and the relative time offset between the recovery vibration time and the current vibration time is calculated; for example, the current vibration time is set to be the 30th Seconds: If the recovery time is the 35th second, the relative time offset is 5; if the recovery time is the 28th second, the relative time offset is -2; if the recovery time is the 30th second, the relative The time offset is 0. Additionally, the target application can determine the file identification of the recorded target vibration waveform file. The target application can then generate a vibration resume notification based on the relative time offset and file identification. That is to say, the vibration recovery notification in this implementation manner may also include a relative time offset in addition to the file identifier. Alternatively, the specific implementation manner of step S204 may be: determine the file identifier of the recorded target vibration waveform file, and directly use the recovery time of vibration and the file identifier to generate a vibration recovery notification. That is to say, the vibration recovery notification in this implementation manner may also include the vibration recovery time in addition to the file identifier.
另一种具体实现中,考虑到虽然计算机设备上运行的目标应用在实现步骤S201时,已将目标振动波形文件下发给终端,但是终端可能在控制振动组件停止振动后,已删除该目标振动波形文件。因此,目标应用在执行步骤S204时,可直接根据恢复振动时间和记录的目标振动波形文件,生成振动恢复通知。即此实施方式下,振动恢复通知中可包括:目标振动波形文件。采用此实施方式生成振动恢复通知,可直接将目标振动波形文件再次下发给终端,使得终端即使之前已删除目标振动波形文件,也无需再浪费资源和时间来请求运行目标应用的计算机设备下发目标振动波形文件,从而提升振动恢复的及时性。In another specific implementation, it is considered that although the target application running on the computer device has sent the target vibration waveform file to the terminal when implementing step S201, the terminal may have deleted the target vibration after the vibration control component stops vibrating. wave file. Therefore, when the target application executes step S204, the vibration recovery notification can be generated directly according to the vibration recovery time and the recorded target vibration waveform file. That is, in this implementation manner, the vibration recovery notification may include: a target vibration waveform file. Using this implementation method to generate a vibration recovery notification can directly send the target vibration waveform file to the terminal again, so that even if the terminal has deleted the target vibration waveform file before, there is no need to waste resources and time to request the computer device running the target application to send it Target vibration waveform files, thereby improving the timeliness of vibration recovery.
那么在此具体实现中,步骤S204的具体实施方式可以是:先将当前振动时间作为基准,计算恢复振动时间和当前振动时间之间的相对时间偏移量;然后,目标应用可根据相对时间偏移量和目标振动波形文件,生成振动恢复通知。或者,步骤S204的具体实施方式可以是:直接采用恢复振动时间和目标振动波形文件,生成振动恢复通知。Then in this specific implementation, the specific implementation method of step S204 can be: first, using the current vibration time as a reference, calculate the relative time offset between the recovery vibration time and the current vibration time; then, the target application can calculate the relative time offset according to the relative time offset Shift and target vibration waveform files to generate vibration recovery notifications. Alternatively, the specific implementation manner of step S204 may be: directly adopt the recovery vibration time and the target vibration waveform file to generate the vibration recovery notification.
S205,将振动恢复通知下发给终端,以使终端根据振动恢复通知驱动振动组件继续振动。S205. Send the vibration recovery notification to the terminal, so that the terminal drives the vibration component to continue vibrating according to the vibration recovery notification.
具体的,计算机设备上运行的目标应用在通过步骤S204生成振动恢复通知后,可将 该振动恢复通知下发给终端,以使得终端先根据振动恢复通知出恢复振动时间和目标振动波形文件,然后继续采用目标振动波形文件中位于恢复振动时间之后的各个振动时间的振动属性值,驱动振动组件继续振动。其中,若恢复振动时间是采用前述第①种方式确定的,即恢复振动时间等于当前振动时间,则通过本申请实施例可实现振动组件的暂停振动和恢复振动之间的无缝衔接,提升振动效果的连续性和完整性;例如,振动组件是在第30秒时暂停振动的(即当前振动时间为第30秒),恢复振动时间为第30秒,那么可实现接着使用位于第30秒之后的各个振动时间(如第31秒、第32秒等)的振动属性值控制振动组件继续振动,从而实现振动组件从第30秒开始恢复振动,如图3b所示。若恢复振动时间是采用前述第②种方式确定的,即恢复振动时间早于当前振动时间,则通过本申请实施例可实现振动组件的振动效果的回放;例如,振动组件是在第30秒时暂停振动的,恢复振动时间为第28秒,那么可实现使用位于第28秒之后的各个振动时间的振动属性值控制振动组件继续振动,从而实现振动组件从第28秒开始恢复振动,从而实现回放第28-30秒之间的振动效果。若目标振动时是采用前述第③种方式确定的,即恢复振动时间晚于当前振动时间,则通过本申请可实现振动组件的振动效果的前进;例如,振动组件是在第30秒时暂停振动的,恢复振动时间为第35秒,那么可实现使用位于第35秒之后的各个振动时间的振动属性值控制振动组件继续振动,从而实现振动组件从第35秒开始恢复振动,从而实现跳过第30-35秒之间的振动效果,实现振动效果的前进。Specifically, after the target application running on the computer device generates the vibration recovery notification through step S204, it can send the vibration recovery notification to the terminal, so that the terminal first notifies the vibration recovery time and the target vibration waveform file according to the vibration recovery notification, and then Continue to use the vibration attribute values of each vibration time after the recovery vibration time in the target vibration waveform file, and drive the vibration component to continue to vibrate. Among them, if the recovery vibration time is determined by the aforementioned method ①, that is, the recovery vibration time is equal to the current vibration time, then the seamless connection between the vibration suspension and the recovery vibration of the vibration component can be realized through the embodiment of the application, and the vibration can be improved. The continuity and integrity of the effect; for example, the vibration component is suspended at the 30th second (that is, the current vibration time is the 30th second), and the resumed vibration time is the 30th second, then it can be used after the 30th second The vibration attribute value of each vibration time (such as the 31st second, the 32nd second, etc.) controls the vibration component to continue to vibrate, so that the vibration component starts to resume vibration from the 30th second, as shown in Figure 3b. If the recovery vibration time is determined by the aforementioned method ②, that is, the recovery vibration time is earlier than the current vibration time, the playback of the vibration effect of the vibration component can be realized through the embodiment of the present application; for example, the vibration component is at the 30th second If the vibration is suspended, the time to resume the vibration is the 28th second, then the vibration attribute value of each vibration time after the 28th second can be used to control the vibration component to continue to vibrate, so that the vibration component can resume vibration from the 28th second, so as to achieve playback Vibration effect between 28-30 seconds. If the target vibration time is determined by the aforementioned third method, that is, the recovery vibration time is later than the current vibration time, then the application can realize the advancement of the vibration effect of the vibration component; for example, the vibration component pauses the vibration at the 30th second If the recovery vibration time is the 35th second, then the vibration attribute value of each vibration time after the 35th second can be used to control the vibration component to continue to vibrate, so that the vibration component can resume vibration from the 35th second, thereby skipping the 35th second. The vibration effect between 30-35 seconds, to achieve the advancement of the vibration effect.
可选的,在需恢复振动组件振动时,若目标应用的业务场景为新的业务场景,且该新的业务场景中包括一个或多个需振动的振动对象时,计算机设备上运行的目标应用可获取新的业务场景所关联的新振动描述文件,该新振动描述文件中包括:新的业务场景中的各个振动对象关联的振动波形文件。然后,将新振动描述文件下发给终端,使得终端根据新振动描述文件中的各个振动波形文件,驱动振动组件振动。也就是说,此情况下,目标应用可不执行步骤S203-S205。Optionally, when the vibration of the vibration component needs to be restored, if the business scenario of the target application is a new business scenario, and the new business scenario includes one or more vibration objects that need to vibrate, the target application running on the computer device A new vibration description file associated with the new business scene can be obtained, and the new vibration description file includes: vibration waveform files associated with each vibration object in the new business scene. Then, the new vibration description file is sent to the terminal, so that the terminal drives the vibration component to vibrate according to each vibration waveform file in the new vibration description file. That is to say, in this case, the target application may not execute steps S203-S205.
本申请实施例在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,可由终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。当存在源自目标应用的关于振动组件的振动暂停事件时,可触发终端控制振动组件暂停振动;并在目标应用需恢复振动组件的振动时,由终端继续驱动振动组件进行振动,从而实现基于目标应用的播放或暂停,对振动组件的状态进行实时变化,无缝切换,达到灵活控制振动组件的暂停和恢复的目的,提升振动效果和目标应用之间的契合度,还避免了为振动组件设置振动时长,在启动振动后达到振动时长时才停止振动这种机械、固化的振动方式,带来的终端中的振动组件损耗较大的问题。进一步的,当存在振动暂停事件时,目标应用还可记录目标振动波形文件以及当前振动时间,从而实现在需恢复振动组件的振动时,若目标应用仍呈现目标业务场景,则目标应用可基于记录的当前振动时间生成恢复振动时间;并通知终端根据恢复振动时间和记录的目标振动波形文件,驱动振动组件继续振动。通过记录当前振动时间,并基于当前振动时间来生成恢复振动时间,可在一定程度上实现振动暂停和继续播放的连续性,进一步提升用户体验。In the embodiment of the present application, when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene. When there is a vibration suspension event about the vibration component originating from the target application, the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, improve the fit between the vibration effect and the target application, and avoid setting the vibration component The vibration time is long, and the vibration is stopped when the vibration time is long after the vibration is started. This mechanical and solidified vibration mode brings about a large loss of vibration components in the terminal. Further, when there is a vibration suspension event, the target application can also record the target vibration waveform file and the current vibration time, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, the target application can be based on the record The current vibration time generates the recovery vibration time; and notifies the terminal to drive the vibration component to continue to vibrate according to the recovery vibration time and the recorded target vibration waveform file. By recording the current vibration time and generating the recovery vibration time based on the current vibration time, the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
请参见图4,是本申请实施例提供的另一种振动控制方法的流程示意图,该方法可以由上述所提及的终端执行。请参见图4,该振动控制方法可包括以下步骤S401-S404:Please refer to FIG. 4 , which is a schematic flowchart of another vibration control method provided by an embodiment of the present application, and the method may be executed by the terminal mentioned above. Please refer to FIG. 4, the vibration control method may include the following steps S401-S404:
S401,在目标应用的目标业务场景中包括需振动的目标振动对象时,在目标业务场景 下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。S401. When the target business scene of the target application includes a target vibration object to be vibrated, in the target business scene, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object.
在具体实施过程中,终端可接收源自目标应用的目标振动对象关联的目标振动波形文件,该目标振动波形文件可包括多个振动时间对应的振动属性值;然后,可按照振动时间从早到晚的顺序,依次采用各个振动时间的振动属性值驱动振动组件进行振动。可选的,终端还可接收源自目标应用的心跳信号,该心跳信号是由目标应用按照目标频率生成的;每次接收到心跳信号后,可基于每次接收到的心跳信号维持振动组件的振动。In the specific implementation process, the terminal can receive the target vibration waveform file associated with the target vibration object from the target application, and the target vibration waveform file can include vibration attribute values corresponding to multiple vibration times; In the later sequence, the vibration attribute value of each vibration time is used to drive the vibration component to vibrate. Optionally, the terminal can also receive a heartbeat signal from the target application, which is generated by the target application according to the target frequency; after each heartbeat signal is received, the vibration component can be maintained based on each received heartbeat signal. vibration.
S402,当存在源自目标应用的关于振动组件的振动暂停事件时,控制振动组件暂停振动。S402. When there is a vibration suspension event about the vibration component originating from the target application, control the vibration component to suspend vibration.
在具体实施过程中,终端若检测到心跳信号丢失,则可确定存在源自目标应用的关于振动组件的振动暂停事件;或者,终端若接收到目标应用发送的振动暂停通知,则可确定存在源自目标应用的关于振动组件的振动暂停事件。其中,终端检测心跳信号是否丢失的具体方式可以是:终端可实时获取最新的系统时刻,并计算最新的系统时刻和上一次接收到心跳信号的时刻之间的间隔时长;若计算得到的间隔时长大于或等于目标频率所对应的间隔时长,则可确定心跳信号丢失;若计算的到的间隔时长小于目标频率所对应的间隔时长,则可确定心跳信号未丢失。In the specific implementation process, if the terminal detects that the heartbeat signal is lost, it can determine that there is a vibration suspension event related to the vibration component from the target application; or, if the terminal receives the vibration suspension notification sent by the target application, it can determine that there is A vibration pause event on the vibration component from the target application. Among them, the specific method for the terminal to detect whether the heartbeat signal is lost can be: the terminal can obtain the latest system time in real time, and calculate the interval between the latest system time and the last time when the heartbeat signal was received; If it is greater than or equal to the interval duration corresponding to the target frequency, it can be determined that the heartbeat signal is lost; if the calculated interval duration is less than the interval duration corresponding to the target frequency, it can be determined that the heartbeat signal is not lost.
举例说明,设目标频率为每隔2秒生成一个心跳信号的频率,则目标频率对应的间隔时长为2秒。进一步,设最新的系统时刻为11点02分36秒:若上一次接收到心跳信号的时刻为11点02分35秒,则可计算得到最新的系统时刻和上一次接收到心跳信号的时刻之间的间隔时长为1秒,其小于目标频率对应的间隔时长,那么此情况下,便可确定心跳信号未丢失。若上一次接收到心跳信号的时刻为11点02分33秒,则可计算得到最新的系统时刻和上一次接收到心跳信号的时刻之间的间隔时长为3秒,其大于目标频率对应的间隔时长,那么此情况下,便可确定心跳信号丢失。For example, if the target frequency is set to generate a heartbeat signal every 2 seconds, then the interval corresponding to the target frequency is 2 seconds. Further, set the latest system time as 11:02:36: If the last time the heartbeat signal was received was 11:02:35, then the difference between the latest system time and the last time the heartbeat signal was received can be calculated The interval between the two is 1 second, which is shorter than the interval corresponding to the target frequency. In this case, it can be determined that the heartbeat signal is not lost. If the last time the heartbeat signal was received was 11:02:33, the interval between the latest system time and the last time the heartbeat signal was received can be calculated as 3 seconds, which is greater than the interval corresponding to the target frequency In this case, it can be determined that the heartbeat signal is lost.
S403,接收目标应用发送的振动恢复通知。S403. Receive a vibration recovery notification sent by the target application.
由前述可知,目标振动波形文件包括多个振动属性值,在存在振动暂停事件时,目标振动波形文件中被采用的振动属性值所对应的振动时间为当前振动时间,且该当前振动时间和目标振动波形文件可被目标应用记录,使得在目标应用需恢复振动组件的振动时,且目标应用的业务场景为目标业务场景时,可根据记录的当前振动时间生成恢复振动时间,并基于恢复振动时间和记录的目标振动波形文件来生成振动恢复通知。由此可见,终端接收到的振动恢复通知是根据恢复振动时间和记录的目标振动波形文件生成的;该恢复振动时间是目标应用确定需恢复振动组件的振动时,且目标应用的业务场景为目标业务场景时,基于当前振动时间生成的。具体的,振动恢复通知可包括:恢复振动时间和所述当前振动时间之间的相对时间偏移量;或者,该振动恢复通知可包括恢复振动时间。As can be seen from the foregoing, the target vibration waveform file includes multiple vibration attribute values. When there is a vibration pause event, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, and the current vibration time is the same as the target vibration time. The vibration waveform file can be recorded by the target application, so that when the target application needs to restore the vibration of the vibration component, and the business scenario of the target application is the target business scenario, the recovery vibration time can be generated according to the recorded current vibration time, and based on the recovery vibration time and recorded target vibration waveform files to generate vibration recovery notifications. It can be seen that the vibration restoration notification received by the terminal is generated according to the restoration vibration time and the recorded target vibration waveform file; the restoration vibration time is when the target application determines that the vibration of the vibration component needs to be restored, and the business scenario of the target application is In business scenarios, it is generated based on the current vibration time. Specifically, the vibration recovery notification may include: a relative time offset between the vibration recovery time and the current vibration time; or, the vibration recovery notification may include the vibration recovery time.
S404,根据振动恢复通知确定恢复振动时间和目标振动波形文件,并根据确定的恢复振动时间和目标振动波形文件,驱动振动组件继续振动。S404. Determine the vibration recovery time and the target vibration waveform file according to the vibration recovery notification, and drive the vibration component to continue vibrating according to the determined vibration recovery time and the target vibration waveform file.
在具体实施过程中,若振动恢复通知包括:恢复振动时间和当前振动时间之间的相对时间偏移量,则根据振动恢复通知确定恢复振动时间的具体实施方式可以是:首先,从振动恢复通知中解析出相对时间偏移量;然后基于相对时间偏移量和当前振动时间,计算出恢复振动时间,该当前振动时间可以是由终端在确定存在振动暂停事件时,自己记录的。若振动恢复通知包括:恢复振动时间,则根据振动恢复通知确定恢复振动时间的具体实施 方式可以是:从振动恢复通知中解析出恢复振动时间。在采用上述任一种实施方式确定出恢复振动时间和目标振动波形文件后,终端可根据目标振动波形文件中位于恢复振动时间之后的各个振动时间的振动属性值,驱动振动组件继续振动。In the specific implementation process, if the vibration recovery notification includes: the relative time offset between the vibration recovery time and the current vibration time, the specific implementation method of determining the vibration recovery time according to the vibration recovery notification can be: first, from the vibration recovery notification The relative time offset is analyzed in the method; and then based on the relative time offset and the current vibration time, the vibration recovery time is calculated. The current vibration time may be recorded by the terminal itself when it is determined that there is a vibration suspension event. If the vibration recovery notification includes: the vibration recovery time, then the specific implementation manner of determining the vibration recovery time according to the vibration recovery notification may be: parsing the vibration recovery time from the vibration recovery notification. After the recovery vibration time and the target vibration waveform file are determined by any one of the above implementation manners, the terminal can drive the vibration component to continue to vibrate according to the vibration attribute values of each vibration time after the recovery vibration time in the target vibration waveform file.
需要说明的是,步骤S403-S404是在确定需恢复振动组件的振动时,且目标应用的业务场景为目标业务场景的情况下执行的;若目标应用的业务场景不是目标业务场景,而是新的业务场景,则终端不会通过步骤S403接收到振动恢复通知,从而也不会执行步骤S404。在此情况下,终端可接收源自目标应用的新振动描述文件,该新振动描述文件是目标应用确定需恢复振动组件的振动时,目标应用的业务场景为新的业务场景,且新的业务场景中包括一个或多个需振动的振动对象时,获取的;该新振动描述文件中包括:新的业务场景中的各个振动对象的振动波形文件。然后,终端可根据新振动描述文件中的各个振动波形文件,驱动振动组件振动。It should be noted that steps S403-S404 are performed when it is determined that the vibration of the vibration component needs to be restored, and the business scenario of the target application is the target business scenario; if the business scenario of the target application is not the target business scenario, but a new In the business scenario, the terminal will not receive the vibration recovery notification through step S403, and thus will not execute step S404. In this case, the terminal can receive a new vibration description file from the target application, the new vibration description file is when the target application determines that the vibration of the vibration component needs to be restored, the service scenario of the target application is a new service scenario, and the new service Acquired when the scene includes one or more vibration objects that need to vibrate; the new vibration description file includes: vibration waveform files of each vibration object in the new business scene. Then, the terminal can drive the vibration component to vibrate according to each vibration waveform file in the new vibration description file.
本申请实施例在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,可由终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。当存在源自目标应用的关于振动组件的振动暂停事件时,可触发终端控制振动组件暂停振动;并在目标应用需恢复振动组件的振动时,由终端继续驱动振动组件进行振动,从而实现基于目标应用的播放或暂停,对振动组件的状态进行实时变化,无缝切换,达到灵活控制振动组件的暂停和恢复的目的,提升振动效果和目标应用之间的契合度。进一步的,当存在振动暂停事件时,目标应用还可记录目标振动波形文件以及当前振动时间,从而实现在需恢复振动组件的振动时,若目标应用仍呈现目标业务场景,则目标应用可基于记录的当前振动时间生成恢复振动时间;并通知终端根据恢复振动时间和记录的目标振动波形文件,驱动振动组件继续振动。通过记录当前振动时间,并基于当前振动时间来生成恢复振动时间,可在一定程度上实现振动暂停和继续播放的连续性,进一步提升用户体验。In the embodiment of the present application, when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene. When there is a vibration suspension event about the vibration component originating from the target application, the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application. Further, when there is a vibration suspension event, the target application can also record the target vibration waveform file and the current vibration time, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, the target application can be based on the record The current vibration time generates the recovery vibration time; and notifies the terminal to drive the vibration component to continue to vibrate according to the recovery vibration time and the recorded target vibration waveform file. By recording the current vibration time and generating the recovery vibration time based on the current vibration time, the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
针对上述图2和图4所示的振动控制方法实施例,需说明以下几点:With regard to the embodiment of the vibration control method shown in Figure 2 and Figure 4 above, the following points need to be explained:
1)在上述图2和图4所示的方法实施例中,若目标应用所处的计算机设备与终端不是同一个设备,即目标应用未运行在终端中,运行在其它计算机设备如云服务器中,则云服务器可通过目标应用,经由互联网向终端下发相关数据(如目标振动波形文件、振动恢复通知等)。若目标应用所处的计算机设备与终端是同一个设备,即目标应用运行在终端中,则目标应用与终端之间的交互,本质上可理解成目标应用与终端中的底层硬件之间的交互;也就是说,目标应用将数据下发至终端,本质上可理解成目标应用将数据下发至终端的底层硬件。并且,目标应用具体可通过终端中的系统振动接口,向终端的底层硬件下发相关数据(如目标振动波形文件、振动恢复通知等)。具体的,该系统振动接口可以是一个集成文件下发功能、心跳下发功能以及通知下发功能的接口。或者,该系统振动接口也可以包括如下三个子接口:1) In the above method embodiments shown in Figure 2 and Figure 4, if the computer device where the target application is located is not the same device as the terminal, that is, the target application is not running on the terminal, but is running on other computer devices such as cloud servers , the cloud server can deliver relevant data (such as target vibration waveform files, vibration recovery notifications, etc.) to the terminal via the Internet through the target application. If the computer device where the target application is located is the same device as the terminal, that is, the target application runs on the terminal, then the interaction between the target application and the terminal can essentially be understood as the interaction between the target application and the underlying hardware in the terminal ; That is to say, the target application sends data to the terminal, which can essentially be understood as the target application sends data to the underlying hardware of the terminal. In addition, the target application may deliver relevant data (such as target vibration waveform files, vibration recovery notifications, etc.) to the underlying hardware of the terminal through the system vibration interface in the terminal. Specifically, the system vibration interface may be an interface that integrates the file delivery function, the heartbeat delivery function, and the notification delivery function. Alternatively, the system vibration interface can also include the following three sub-interfaces:
子接口1:振动播放接口;该接口可同时支持循环、振动强度、振动频率、振动模式、以及振动时间指示信息的设置。具体的,振动播放接口可采用如下代码表示:Sub-interface 1: Vibration playback interface; this interface can simultaneously support the settings of cycle, vibration intensity, vibration frequency, vibration mode, and vibration time indication information. Specifically, the vibration playback interface can be represented by the following code:
public void start(int loop,int interval,int amplitude,int freq,int patten,int level,int relativeTime){}public void start(int loop,int interval,int amplitude,int freq,int patten,int level,int relativeTime){}
下面对上述字段所包含的各个参数进行简要注释。The following is a brief comment on each parameter contained in the above fields.
/**/**
*@param loop用于设置循环次数;当取值=1时,表示不循环对振动对象进行振动;当取值大于1时,取值表示对振动对象循环振动该取值对应的次数;当取值为-1时,表示无限循环对振动对象进行振动。*@param loop is used to set the number of loops; when the value = 1, it means that the vibrating object is not cyclically vibrated; when the value is greater than 1, the value indicates the number of times the vibrating object is cyclically vibrated; when set When the value is -1, it means that the vibration object is vibrated in an infinite loop.
*@param interval用于设置循环间隔,其取值范围可以为0-1000;循环间隔是指两次按照目标振动波形文件对振动对象进行振动的间隔,单位可以是ms(毫秒)或者其他量级单位。*@param interval is used to set the cycle interval, and its value range can be 0-1000; the cycle interval refers to the interval between vibrating the vibration object twice according to the target vibration waveform file, and the unit can be ms (milliseconds) or other orders of magnitude unit.
*@param amplitude用于设置振动强度值,其取值范围可以为1-255;其中,1最小,255最大;此参数用于修饰HE文件(振动波形文件),进行整体的强度信号调整/缩减。*@param amplitude is used to set the vibration intensity value, and its value range can be 1-255; among them, 1 is the smallest and 255 is the largest; this parameter is used to modify the HE file (vibration waveform file) for overall intensity signal adjustment/reduction .
*@paramfreq用于设置振动频率值,其取值范围可以为1-100;其中,1最小,100最大;此参数作为百分比用于修饰HE文件,进行整体的频率信号进行调整。*@paramfreq is used to set the vibration frequency value, and its value range can be 1-100; among them, 1 is the smallest and 100 is the largest; this parameter is used as a percentage to modify the HE file and adjust the overall frequency signal.
*@parampatten用于设置振动模式,取值等于0则表示抢占模式,取值等于1则表示叠加模式;此参数用于通知底层硬件如何进行振动效果的叠加;所谓叠加模式是指不同振动对象可融合振动,这可以模拟真实物理环境中多个振动对象共振所带来的振动效果;所谓抢占模式可是指不同振动对象不可融合叠加,则只能根据各个振动对象的振动优先级,选择一个振动对象进行振动;例如,从多个振动对象中选取振动优先级最高的振动对象进行振动。*@parampatten is used to set the vibration mode, the value equal to 0 means the preemption mode, and the value equal to 1 means the overlay mode; this parameter is used to inform the underlying hardware how to superimpose the vibration effect; the so-called overlay mode means that different vibration objects can Fusion vibration, which can simulate the vibration effect caused by the resonance of multiple vibration objects in the real physical environment; the so-called preemption mode means that different vibration objects cannot be fused and superimposed, and a vibration object can only be selected according to the vibration priority of each vibration object Vibrate; for example, select the vibration object with the highest vibration priority from multiple vibration objects to vibrate.
*@param level用于设置振动优先级,其取值范围为1-10;其中,10级最高,其次递减;此参数用于在抢占模式下,level越高的优先播放。*@param level is used to set the vibration priority, and its value range is 1-10; among them, level 10 is the highest, followed by decreasing; this parameter is used in the preemptive mode, the higher the level is, the priority is played.
*@relative Time用于设置振动时间信息,其具体可以是恢复振动时间,也可以是恢复振动时间和当前振动时间之间的相对时间偏移量;当振动时间信息为相对时间偏移量时,其取值可以为负数、正数或0;当取值为负数时,表示振动效果的回放,当取值为正数时,表示跳转至位于当前振动时间之后的指定时继续振动,当取值为0时,表示基于记录的当前振动时间继续振动。*@relative Time is used to set the vibration time information, which can be the recovery vibration time, or the relative time offset between the recovery vibration time and the current vibration time; when the vibration time information is a relative time offset, Its value can be negative, positive or 0; when the value is negative, it means the playback of the vibration effect; when the value is positive, it means jump to the specified time after the current vibration time and continue to vibrate. When the value is 0, it means continue to vibrate based on the recorded current vibration time.
/**/**
子接口2:心跳下发接口;该接口可支持心跳信号的下发。具体的,心跳下发接口可采用如下代码表示:Sub-interface 2: heartbeat delivery interface; this interface can support the delivery of heartbeat signals. Specifically, the heartbeat delivery interface can be represented by the following code:
public void heardbeat(int beat){}public void heardbeat(int beat){}
其中,beat用于设置表示目标频率对应的间隔时长。Among them, beat is used to set the interval duration corresponding to the target frequency.
子接口3:振动恢复口;该接口可支持振动恢复通知的下发。具体的,振动恢复接口可采用如下代码表示:Sub-interface 3: Vibration recovery interface; this interface can support the delivery of vibration recovery notifications. Specifically, the vibration recovery interface can be represented by the following code:
public void recover(int relativeTime){}public void recover(int relativeTime){}
其中,relativeTime用于设置振动时间指示信息。Among them, relativeTime is used to set the vibration time indication information.
需要说明的是,上述只是对系统振动接口的表示形态进行示例性说明,并对此进行限定。进一步的,该系统振动接口可增加一个心跳机制,以基于该心跳机制检测是否存在心跳丢失的情况。若未存在心跳丢失,则可按照源自目标应用的目标振动波形文件,维持振动组件继续振动;若存在心跳丢失,则控制振动组件暂停振动,如图5a所示。It should be noted that, the above is only an exemplary description of the representation form of the system vibration interface, and this is not limited. Further, a heartbeat mechanism can be added to the system vibration interface, so as to detect whether there is a heartbeat loss based on the heartbeat mechanism. If there is no heartbeat loss, the vibration component can be maintained to continue vibrating according to the target vibration waveform file from the target application; if there is a heartbeat loss, the vibration component is controlled to suspend vibration, as shown in Figure 5a.
2)在上述图2和图4所示的方法实施例中,为便于目标应用灵活控制终端中的振动组件的振动暂停和振动恢复,可进一步在目标应用中设置一个独立的振动控制器,以使得 目标应用可通过该振动控制器来实现振动控制。具体的,该振动控制器本质上是一个软件开发工具包(Software Development Kit,SDK);主要用于当心跳信号丢失或者目标应用主动暂停振动时,自动记录当前使用的振动波形文件以及当前振动时间,如图5b所示。也就是说,当存在源自目标应用的关于振动组件的振动暂停事件时,目标应用可通过该振动控制器记录目标振动波形文件以及当前振动时间。进一步的,目标应用还可通过该振动控制器的接口振动组件的恢复操作;即当目标应用主动恢复振动组件的振动时,可通过振动控制器的接口,通知振动控制器下发记录的振动波形文件和当前振动时间至终端的底层硬件,使得底层硬件按照该记录的振动波形文件和当前振动时间驱动振动组件进行振动,以实现记录的振动继续播放,如图5c所示。可选的,目标应用也可通过振动控制器直接下发新振动描述文件至终端,或者下发记录的振动波形文件和其他振动时间至终端,具体可参见前述步骤S203的相关描述。2) In the above method embodiments shown in FIG. 2 and FIG. 4, in order to facilitate the target application to flexibly control the vibration suspension and vibration recovery of the vibration component in the terminal, an independent vibration controller can be further set in the target application to The target application can realize vibration control through the vibration controller. Specifically, the vibration controller is essentially a software development kit (Software Development Kit, SDK); it is mainly used to automatically record the currently used vibration waveform file and the current vibration time when the heartbeat signal is lost or the target application actively suspends vibration , as shown in Figure 5b. That is to say, when there is a vibration suspension event about the vibration component originating from the target application, the target application can record the target vibration waveform file and the current vibration time through the vibration controller. Further, the target application can also restore the vibration component through the interface of the vibration controller; that is, when the target application actively restores the vibration of the vibration component, it can notify the vibration controller to send the recorded vibration waveform through the interface of the vibration controller The file and the current vibration time are sent to the underlying hardware of the terminal, so that the underlying hardware drives the vibration component to vibrate according to the recorded vibration waveform file and the current vibration time, so as to realize the continued playback of the recorded vibration, as shown in Figure 5c. Optionally, the target application can also directly send a new vibration description file to the terminal through the vibration controller, or send a recorded vibration waveform file and other vibration times to the terminal. For details, please refer to the relevant description of the aforementioned step S203.
下面结合图5d,对目标应用通过系统振动接口和底层硬件进行交互,以实现对终端中的振动组件进行振动控制的具体流程进行阐述:In the following, combined with Figure 5d, the target application interacts with the underlying hardware through the system vibration interface to realize the specific process of vibration control of the vibration components in the terminal:
首先,目标应用可检测目标业务场景中是否包括需振动的目标振动对象;若包括,则确定目标业务场景为振动场景;若不包括,则确定目标业务场景不是振动场景。其次,在检测到目标业务场景为振动场景后,目标应用可通过系统振动接口将目标振动对象关联的目标振动波形文件下发至终端的底层硬件;以及,生成心跳信号并通过系统振动接口将生成的心跳信号下发至底层硬件。相应的,终端的底层硬件在接收到该心跳信号和目标振动波形文件后,可在目标业务场景下,按照该目标振动波形文件驱动振动组件进行振动。First, the target application can detect whether the target service scene includes the target vibration object that needs to vibrate; if it does, determine that the target service scene is a vibration scene; if not, determine that the target service scene is not a vibration scene. Secondly, after detecting that the target business scene is a vibration scene, the target application can send the target vibration waveform file associated with the target vibration object to the underlying hardware of the terminal through the system vibration interface; and generate a heartbeat signal and send the generated The heartbeat signal is sent to the underlying hardware. Correspondingly, after receiving the heartbeat signal and the target vibration waveform file, the underlying hardware of the terminal can drive the vibration component to vibrate according to the target vibration waveform file in the target business scenario.
在按照目标振动波形文件驱动振动组件进行振动的过程中,若存在针对振动组件的振动暂停事件,则底层硬件可控制振动组件暂停振动,且目标应用可通过振动控制器可记录当前使用的目标振动波形文件以及当前振动时间。当目标应用确定需恢复振动组件的振动时,目标应用可通知振动控制器确定恢复振动时间,该恢复振动时间可以等于当前振动时间,或早于当前振动时间,或晚于当前振动时间。然后,振动控制器可基于恢复振动时间和记录的目标振动波形文件生成振动恢复通知,将振动恢复通知下发至终端的底层硬件,使得底层硬件按照该记录的目标振动波形文件和恢复振动时间驱动振动组件进行振动,以实现振动组件的振动恢复。In the process of driving the vibration component to vibrate according to the target vibration waveform file, if there is a vibration suspension event for the vibration component, the underlying hardware can control the vibration component to suspend the vibration, and the target application can record the currently used target vibration through the vibration controller Wave file and current vibration time. When the target application determines that the vibration of the vibrating component needs to be restored, the target application can notify the vibration controller to determine the time for restoring the vibration. The time for restoring the vibration can be equal to, earlier than, or later than the current time of vibration. Then, the vibration controller can generate a vibration recovery notification based on the recovery vibration time and the recorded target vibration waveform file, and send the vibration recovery notification to the underlying hardware of the terminal, so that the underlying hardware drives according to the recorded target vibration waveform file and recovery vibration time The vibrating component vibrates to achieve vibration recovery of the vibrating component.
综上所述,本申请实施例采用标准化接口的方式,使得接口层面可统一支持应用层和系统硬件层,应用层的创新设计无需担心与底层硬件层之间不匹配而造成体验差异的影响,可丰富应用层的开发功能。另外,应用层可灵活控制振动组件的振动暂停和恢复;并且,在目标应用被异常退出时,系统振动也能自动退出,可有效提升振动组件的振动效果和目标应用之间的契合度,提升用户体验。To sum up, the embodiment of this application adopts a standardized interface method, so that the interface layer can support the application layer and the system hardware layer in a unified manner. The innovative design of the application layer does not need to worry about the impact of experience differences caused by mismatching with the underlying hardware layer. It can enrich the development functions of the application layer. In addition, the application layer can flexibly control the vibration suspension and recovery of the vibration component; and, when the target application is abnormally exited, the system vibration can also automatically exit, which can effectively improve the fit between the vibration effect of the vibration component and the target application, and improve user experience.
还需说明的是,在上述实施例中,均是以目标应用和终端通过交互实现振动控制为例进行说明的;但在实际应用中,也可由终端自己来执行各个步骤来实现振动组件的振动控制,即目标应用所执行的记录目标波形振动文件和当前振动时间等操作,均可由终端执行。基于此,本申请实施例还提出了图6所示的振动控制方法的流程示意图;参见图6所示,该振动控制方法可由终端执行,具体可包括如下步骤S601-S604:It should also be noted that in the above embodiments, the target application and the terminal realize vibration control through interaction as an example; however, in practical applications, the terminal itself can also perform various steps to realize the vibration of the vibration component. Control, that is, operations such as recording the target waveform vibration file and the current vibration time performed by the target application, can be performed by the terminal. Based on this, the embodiment of the present application also proposes a schematic flowchart of the vibration control method shown in FIG. 6; referring to FIG. 6, the vibration control method can be executed by the terminal, and can specifically include the following steps S601-S604:
S601,在目标应用的目标业务场景中包括需振动的目标振动对象时,在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。S601. When the target service scene of the target application includes a target vibration object to be vibrated, in the target service scene, drive a vibration component in the terminal to vibrate according to a target vibration waveform file associated with the target vibration object.
S602,当存在源自目标应用的关于振动组件的振动暂停事件时,记录目标振动波形文件以及当前振动时间。S602. When there is a vibration suspension event about the vibration component originating from the target application, record the target vibration waveform file and the current vibration time.
其中,目标振动波形文件包括多个振动时间对应的振动属性值,当前振动时间是指:在存在振动暂停事件时,目标振动波形文件中被采用的振动属性值所对应的振动时间。步骤S602提及的振动暂停事件可以是:检测到针对目标振动对象的振动暂停操作的事件,或者检测到目标应用被异常退出的事件,等等。Wherein, the target vibration waveform file includes a plurality of vibration attribute values corresponding to the vibration time, and the current vibration time refers to the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file when there is a vibration pause event. The vibration pause event mentioned in step S602 may be: an event of detection of a vibration pause operation on the target vibration object, or detection of an event of abnormal exit of the target application, and so on.
S603,在需恢复振动组件的振动时,若目标应用的业务场景为目标业务场景,则基于当前振动时间,生成恢复振动时间。S603. When the vibration of the vibration component needs to be restored, if the business scenario of the target application is the target business scenario, generate a vibration restoration time based on the current vibration time.
S604,根据恢复振动时间和目标振动波形文件,驱动振动组件继续振动。S604. Drive the vibration component to continue to vibrate according to the recovery vibration time and the target vibration waveform file.
可选的,在需恢复振动组件振动时,若目标应用的业务场景为新的业务场景,且新的业务场景中包括一个或多个需振动的振动对象时,则终端可获取新的业务场景所关联的新振动描述文件,根据新振动描述文件中的各个振动波形文件,驱动振动组件振动。Optionally, when the vibration of the vibration component needs to be restored, if the business scenario of the target application is a new business scenario, and the new business scenario includes one or more vibration objects that need to vibrate, the terminal can obtain the new business scenario The associated new vibration description file drives the vibration component to vibrate according to each vibration waveform file in the new vibration description file.
本申请实施例在目标应用的目标业务场景中包括需振动的目标振动对象时,可由终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。当存在源自目标应用的关于振动组件的振动暂停事件时,可触发终端控制振动组件暂停振动;并在目标应用需恢复振动组件的振动时,由终端继续驱动振动组件进行振动,从而实现基于目标应用的播放或暂停,对振动组件的状态进行实时变化,无缝切换,达到灵活控制振动组件的暂停和恢复的目的,提升振动效果和目标应用之间的契合度。进一步的,当存在振动暂停事件时,还可记录目标振动波形文件以及当前振动时间,从而实现在需恢复振动组件的振动时,若目标应用仍呈现目标业务场景,则可基于记录的当前振动时间生成恢复振动时间;从而根据恢复振动时间和目标振动波形文件,驱动振动组件继续振动。通过记录当前振动时间,并基于当前振动时间来生成恢复振动时间,可在一定程度上实现振动暂停和继续播放的连续性,进一步提升用户体验。In the embodiment of the present application, when the target service scene of the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target service scene. When there is a vibration suspension event about the vibration component originating from the target application, the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application. Further, when there is a vibration suspension event, the target vibration waveform file and the current vibration time can also be recorded, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, it can be based on the recorded current vibration time Generate the recovery vibration time; thus, according to the recovery vibration time and the target vibration waveform file, the driving vibration component continues to vibrate. By recording the current vibration time and generating the recovery vibration time based on the current vibration time, the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
基于上述图2所示的振动控制方法实施例的描述,本申请实施例还公开了一种振动控制装置,所述振动控制装置可以是计算机设备上运行的用于实现目标应用的功能的计算机程序(包括程序代码)。该振动控制装置可以执行图2所示的方法,请参见图7,所述振动控制装置可以运行如下单元:Based on the description of the embodiment of the vibration control method shown in Figure 2 above, the embodiment of the present application also discloses a vibration control device, the vibration control device may be a computer program running on a computer device to realize the function of the target application (including program code). The vibration control device can execute the method shown in Figure 2, please refer to Figure 7, the vibration control device can run the following units:
控制单元701,用于在目标应用的目标业务场景中包括需振动的目标振动对象时,通知终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;The control unit 701 is configured to notify the terminal to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target service scenario when the target application includes a target vibration object that needs to vibrate ;
记录单元702,用于当存在源自目标应用的关于振动组件的振动暂停事件时,记录目标振动波形文件以及当前振动时间;目标振动波形文件包括多个振动属性值,当前振动时间是指:在存在振动暂停事件时,目标振动波形文件中被采用的振动属性值所对应的振动时间;The recording unit 702 is used to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component from the target application; the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to: When there is a vibration pause event, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
处理单元703,用于在需恢复振动组件的振动时,若目标应用的业务场景为目标业务场景,则基于当前振动时间,生成恢复振动时间;The processing unit 703 is configured to generate a restoration vibration time based on the current vibration time if the business scenario of the target application is the target business scenario when the vibration of the vibration component needs to be restored;
控制单元701,还用于根据恢复振动时间和记录的目标振动波形文件生成振动恢复通知,并将振动恢复通知下发给终端,以使终端根据振动恢复通知驱动振动组件继续振动。The control unit 701 is further configured to generate a vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, and send the vibration recovery notification to the terminal, so that the terminal drives the vibration component to continue vibrating according to the vibration recovery notification.
在一种实施方式中,处理单元703在用于根据恢复振动时间和记录的目标振动波形文 件生成振动恢复通知时,可具体用于:In one embodiment, when the processing unit 703 is used to generate the vibration recovery notification according to the recovery vibration time and the recorded target vibration waveform file, it can be specifically used for:
将当前振动时间作为基准,计算恢复振动时间和当前振动时间之间的相对时间偏移量;Using the current vibration time as a reference, calculate the relative time offset between the recovery vibration time and the current vibration time;
确定记录的目标振动波形文件的文件标识,并根据相对时间偏移量和文件标识,生成振动恢复通知。Determine the file identifier of the recorded target vibration waveform file, and generate a vibration recovery notification according to the relative time offset and the file identifier.
另一种实施方式中,处理单元703在用于根据恢复振动时间和记录的目标振动波形文件生成振动恢复通知时,可具体用于:In another implementation manner, when the processing unit 703 is used to generate the vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, it can be specifically used for:
确定记录的目标振动波形文件的文件标识;Determine the file identification of the recorded target vibration waveform file;
采用恢复振动时间和文件标识,生成振动恢复通知。Generate a vibration recovery notification using the recovery vibration time and file ID.
另一种实施方式中,处理单元703在用于基于当前振动时间,生成恢复振动时间时,可具体用于:In another implementation manner, when the processing unit 703 is used to generate the recovery vibration time based on the current vibration time, it may be specifically used for:
将当前振动时间确定为振动恢复的恢复振动时间;Determining the current vibration time as the recovery vibration time for vibration recovery;
或者,将早于当前振动时间的一个振动时间确定为恢复振动时间;Alternatively, a vibration time earlier than the current vibration time is determined as the recovery vibration time;
或者,将晚于当前振动时间的一个振动时间确定为恢复振动时间。Alternatively, a vibration time later than the current vibration time is determined as the recovery vibration time.
另一种实施方式中,处理单元703还可用于:In another implementation manner, the processing unit 703 may also be used to:
在终端按照目标振动波形文件驱动振动组件进行振动的过程中,按照目标频率生成心跳信号;When the terminal drives the vibration component to vibrate according to the target vibration waveform file, a heartbeat signal is generated according to the target frequency;
在每次生成心跳信号后,将生成的心跳信号下发至终端,以使得终端基于心跳信号维持振动组件的振动。After the heartbeat signal is generated each time, the generated heartbeat signal is sent to the terminal, so that the terminal maintains the vibration of the vibrating component based on the heartbeat signal.
另一种实施方式中,振动暂停事件包括以下至少一项:In another embodiment, the vibration pause event includes at least one of the following:
目标应用响应于针对目标对象的振动暂停操作,向终端发送振动暂停通知的事件;以及,心跳信号丢失的事件。The target application sends an event of vibration suspension notification to the terminal in response to the vibration suspension operation for the target object; and an event of heartbeat signal loss.
另一种实施方式中,控制单元701还可用于:In another implementation manner, the control unit 701 can also be used for:
在需恢复振动组件振动时,若目标应用的业务场景为新的业务场景,且新的业务场景中包括一个或多个需振动的振动对象时,获取新的业务场景所关联的新振动描述文件,新振动描述文件中包括:新的业务场景中的各个振动对象关联的振动波形文件;When the vibration of the vibration component needs to be restored, if the business scenario of the target application is a new business scenario, and the new business scenario includes one or more vibration objects that need to vibrate, obtain the new vibration description file associated with the new business scenario , the new vibration description file includes: the vibration waveform files associated with each vibration object in the new business scenario;
将新振动描述文件下发给终端,使得终端根据新振动描述文件中的各个振动波形文件,驱动振动组件振动。The new vibration description file is sent to the terminal, so that the terminal drives the vibration component to vibrate according to each vibration waveform file in the new vibration description file.
根据本申请的另一个实施例,图7所示的振动控制装置中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,基于振动控制装置也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。According to another embodiment of the present application, the various units in the vibration control device shown in Fig. 7 can be respectively or all combined into one or several other units to form, or some (some) units can be disassembled again. Divided into a plurality of functionally smaller units, this can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the vibration-based control device may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented cooperatively by multiple units.
根据本申请的另一个实施例,可以通过在包括中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的计算机设备,运行能够执行如图2中所示的相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造如图7中所示的振动控制装置设备,以及来实现本申请实施例中的图2所示的振动控制方法。 所述计算机程序可以记载于例如计算机可读记录介质上,并通过计算机可读记录介质装载于上述计算机设备中,并在其中运行。According to another embodiment of the present application, by running a computer device including a processing element such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and a storage element, it is possible to execute such The computer program (comprising program code) of each step involved in the corresponding method shown in Figure 2 is used to construct the vibration control device equipment as shown in Figure 7, and to realize the vibration control device shown in Figure 2 in the embodiment of the present application. Vibration Control Methods. The computer program can be recorded in, for example, a computer-readable recording medium, loaded into the above-mentioned computer device via the computer-readable recording medium, and executed therein.
本申请实施例在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,可由终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。当存在源自目标应用的关于振动组件的振动暂停事件时,可触发终端控制振动组件暂停振动;并在目标应用需恢复振动组件的振动时,由终端继续驱动振动组件进行振动,从而实现基于目标应用的播放或暂停,对振动组件的状态进行实时变化,无缝切换,达到灵活控制振动组件的暂停和恢复的目的,提升振动效果和目标应用之间的契合度。进一步的,当存在振动暂停事件时,还可记录目标振动波形文件以及当前振动时间,从而实现在需恢复振动组件的振动时,若目标应用仍呈现目标业务场景,则可基于记录的当前振动时间生成恢复振动时间;从而根据恢复振动时间和目标振动波形文件,驱动振动组件继续振动。通过记录当前振动时间,并基于当前振动时间来生成恢复振动时间,可在一定程度上实现振动暂停和继续播放的连续性,进一步提升用户体验。In the embodiment of the present application, when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene. When there is a vibration suspension event about the vibration component originating from the target application, the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application. Further, when there is a vibration suspension event, the target vibration waveform file and the current vibration time can also be recorded, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, it can be based on the recorded current vibration time Generate the recovery vibration time; thus, according to the recovery vibration time and the target vibration waveform file, the driving vibration component continues to vibrate. By recording the current vibration time and generating the recovery vibration time based on the current vibration time, the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
基于上述图4所示的振动控制方法实施例的描述,本申请实施例还公开了一种振动控制装置,所述振动控制装置可以是运行于终端中的一个计算机程序(包括程序代码)。该振动控制装置可以执行图8所示的方法,请参见图8,所述振动控制装置可以运行如下单元:Based on the description of the embodiment of the vibration control method shown in FIG. 4 above, the embodiment of the present application also discloses a vibration control device. The vibration control device may be a computer program (including program code) running in a terminal. The vibration control device can execute the method shown in Figure 8, please refer to Figure 8, the vibration control device can run the following units:
驱动单元801,用于在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;The driving unit 801 is configured to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scenario when the target business scene presented by the target application includes a target vibration object to be vibrated;
驱动单元801,用于当存在源自目标应用的关于振动组件的振动暂停事件时,控制振动组件暂停振动;目标振动波形文件包括多个振动属性值,在存在振动暂停事件时,目标振动波形文件中被采用的振动属性值所对应的振动时间为当前振动时间,当前振动时间和目标振动波形文件被目标应用记录;The drive unit 801 is used to control the vibration component to suspend vibration when there is a vibration suspension event about the vibration component from the target application; the target vibration waveform file includes a plurality of vibration attribute values. When there is a vibration suspension event, the target vibration waveform file The vibration time corresponding to the vibration attribute value adopted in is the current vibration time, and the current vibration time and the target vibration waveform file are recorded by the target application;
接收单元802,用于接收目标应用发送的振动恢复通知,振动恢复通知是根据恢复振动时间和记录的目标振动波形文件生成的;恢复振动时间是目标应用确定需恢复振动组件的振动时,且目标应用的业务场景为目标业务场景时,基于当前振动时间生成的;The receiving unit 802 is configured to receive the vibration recovery notification sent by the target application. The vibration recovery notification is generated according to the vibration recovery time and the recorded target vibration waveform file; the vibration recovery time is when the target application determines that the vibration of the vibration component needs to be recovered, and the target When the business scenario of the application is the target business scenario, it is generated based on the current vibration time;
驱动单元801,还用于根据振动恢复通知确定恢复振动时间和目标振动波形文件,并根据确定的恢复振动时间和目标振动波形文件,驱动振动组件继续振动。The driving unit 801 is further configured to determine the resuming vibration time and the target vibration waveform file according to the vibration resuming notification, and drive the vibrating component to continue vibrating according to the determined resuming vibration time and the target vibration waveform file.
在一种实施方式中,振动恢复通知包括:恢复振动时间和当前振动时间之间的相对时间偏移量;驱动单元801在用于根据振动恢复通知确定恢复振动时间时,可具体用于:In one embodiment, the vibration recovery notification includes: the relative time offset between the vibration recovery time and the current vibration time; when the drive unit 801 is used to determine the vibration recovery time according to the vibration recovery notification, it can be specifically used for:
从振动恢复通知中解析出相对时间偏移量;Parse the relative time offset from the vibration recovery notification;
基于相对时间偏移量和当前振动时间,计算出恢复振动时间。Based on the relative time offset and the current vibration time, the recovery vibration time is calculated.
另一种实施方式中,接收单元802还可用于:接收目标应用下发的心跳信号,心跳信号是由目标应用按照目标频率生成的;In another implementation manner, the receiving unit 802 is also configured to: receive a heartbeat signal issued by the target application, the heartbeat signal is generated by the target application according to the target frequency;
驱动单元801还可用于:每次接收到心跳信号后,基于每次接收到的心跳信号维持振动组件的振动。The driving unit 801 can also be used for: maintaining the vibration of the vibrating component based on each received heartbeat signal after each heartbeat signal is received.
另一种实施方式中,驱动单元801还可用于:In another implementation manner, the drive unit 801 can also be used for:
若检测到心跳信号丢失,则确定存在源自目标应用的关于振动组件的振动暂停事件;If it is detected that the heartbeat signal is lost, it is determined that there is a vibration suspension event about the vibration component originating from the target application;
或者,若接收到目标应用发送的振动暂停通知,则确定存在源自目标应用的关于振动组件的振动暂停事件。Alternatively, if a vibration suspension notification sent by the target application is received, it is determined that there is a vibration suspension event related to the vibration component originating from the target application.
另一种实施方式中,驱动单元801还可用于:In another implementation manner, the drive unit 801 can also be used for:
接收目标应用下发的新振动描述文件,新振动描述文件是目标应用确定需恢复振动组件的振动时,目标应用呈现的业务场景为新的业务场景,且新的业务场景中包括一个或多个需振动的振动对象时,获取的;新振动描述文件中包括:新的业务场景中的各个振动对象的振动波形文件;Receive the new vibration description file issued by the target application. The new vibration description file is when the target application determines that the vibration of the vibration component needs to be restored. The business scenario presented by the target application is a new business scenario, and the new business scenario includes one or more Obtained when the vibration object needs to vibrate; the new vibration description file includes: the vibration waveform file of each vibration object in the new business scene;
根据新振动描述文件中的各个振动波形文件,驱动振动组件振动。Drive vibration components to vibrate according to individual vibration waveform files in the new vibration profile.
根据本申请的另一个实施例,图8所示的振动控制装置中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,基于振动控制装置也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。According to another embodiment of the present application, the various units in the vibration control device shown in Fig. 8 can be respectively or all combined into one or several other units to form, or some (some) units can be disassembled again. Divided into a plurality of functionally smaller units, this can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the vibration-based control device may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented cooperatively by multiple units.
根据本申请的另一个实施例,可以通过在包括中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的计算机设备,运行能够执行如图4中所示的相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造如图8中所示的振动控制装置设备,以及来实现本申请实施例中的图4所示的振动控制方法。所述计算机程序可以记载于例如计算机可读记录介质上,并通过计算机可读记录介质装载于上述计算机设备中,并在其中运行。According to another embodiment of the present application, by running a computer device including a processing element such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and a storage element, it is possible to execute such The computer program (including the program code) of each step involved in the corresponding method shown in Figure 4 is used to construct the vibration control device equipment as shown in Figure 8, and to realize the vibration control device shown in Figure 4 in the embodiment of the present application. Vibration Control Methods. The computer program can be recorded in, for example, a computer-readable recording medium, loaded into the above-mentioned computer device via the computer-readable recording medium, and executed therein.
本申请实施例在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,可由终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。当存在源自目标应用的的关于振动组件的振动暂停事件时,可触发终端控制振动组件暂停振动;并在目标应用需恢复振动组件的振动时,由终端继续驱动振动组件进行振动,从而实现基于目标应用的播放或暂停,对振动组件的状态进行实时变化,无缝切换,达到灵活控制振动组件的暂停和恢复的目的,提升振动效果和目标应用之间的契合度。进一步的,当存在振动暂停事件时,还可记录目标振动波形文件以及当前振动时间,从而实现在需恢复振动组件的振动时,若目标应用仍呈现目标业务场景,则可基于记录的当前振动时间生成恢复振动时间;从而根据恢复振动时间和目标振动波形文件,驱动振动组件继续振动。通过记录当前振动时间,并基于当前振动时间来生成恢复振动时间,可在一定程度上实现振动暂停和继续播放的连续性,进一步提升用户体验。In the embodiment of the present application, when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene. When there is a vibration suspension event about the vibration component from the target application, the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to realize the vibration based on Play or pause the target application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application. Further, when there is a vibration suspension event, the target vibration waveform file and the current vibration time can also be recorded, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, it can be based on the recorded current vibration time Generate the recovery vibration time; thus, according to the recovery vibration time and the target vibration waveform file, the driving vibration component continues to vibrate. By recording the current vibration time and generating the recovery vibration time based on the current vibration time, the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
基于上述图6所示的振动控制方法实施例的描述,本申请实施例还公开了一种振动控制装置,所述振动控制装置可以是运行于终端中的一个计算机程序(包括程序代码)。该振动控制装置可以执行图9所示的方法,请参见图9,所述振动控制装置可以运行如下单元:Based on the description of the embodiment of the vibration control method shown in FIG. 6 above, the embodiment of the present application also discloses a vibration control device. The vibration control device may be a computer program (including program code) running in a terminal. The vibration control device can execute the method shown in Figure 9, please refer to Figure 9, the vibration control device can run the following units:
驱动单元901,用于在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;The driving unit 901 is configured to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scenario when the target business scene presented by the target application includes a target vibration object to be vibrated;
记录单元902,用于当存在源自目标应用的的关于振动组件的振动暂停事件时,记录目标振动波形文件以及当前振动时间;目标振动波形文件包括多个振动属性值,当前振动时间是指:在存在振动暂停事件时,目标振动波形文件中被采用的振动属性值所对应的振动时间;The recording unit 902 is used to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component originating from the target application; the target vibration waveform file includes multiple vibration attribute values, and the current vibration time refers to: When there is a vibration pause event, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
处理单元903,用于在需恢复振动组件的振动时,若目标应用呈现的业务场景为目标业务场景,则基于当前振动时间,生成恢复振动时间;The processing unit 903 is configured to generate a recovery vibration time based on the current vibration time if the business scenario presented by the target application is the target business scenario when the vibration of the vibration component needs to be restored;
驱动单元901,还用于根据恢复振动时间和记录的目标振动波形文件,驱动振动组件继续振动。The driving unit 901 is further configured to drive the vibration component to continue to vibrate according to the recovery time of vibration and the recorded target vibration waveform file.
根据本申请的另一个实施例,图9所示的振动控制装置中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,基于振动控制装置也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。According to another embodiment of the present application, the various units in the vibration control device shown in Fig. 9 can be respectively or all combined into one or several other units to form, or some (some) units can be disassembled again. Divided into a plurality of functionally smaller units, this can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit may also be realized by multiple units, or the functions of multiple units may be realized by one unit. In other embodiments of the present application, the vibration-based control device may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented cooperatively by multiple units.
根据本申请的另一个实施例,可以通过在包括中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的计算机设备,运行能够执行如图6中所示的相应方法所涉及的各步骤的计算机可读指令(包括程序代码),来构造如图9中所示的振动控制装置设备,以及来实现本申请实施例中的图6所示的振动控制方法。所述计算机可读指令可以记载于例如计算机可读存储介质上,并通过计算机可读存储介质装载于上述计算机设备中,并在其中运行。According to another embodiment of the present application, by running a computer device including a processing element such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and a storage element, it is possible to execute such The computer-readable instructions (including program codes) of the steps involved in the corresponding method shown in FIG. 6 are used to construct the vibration control device as shown in FIG. The vibration control method shown. The computer-readable instructions may be recorded, for example, on a computer-readable storage medium, loaded into the above-mentioned computer device through the computer-readable storage medium, and run there.
本申请实施例在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,可由终端在目标业务场景下,按照目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动。当存在源自目标应用的关于振动组件的振动暂停事件时,可触发终端控制振动组件暂停振动;并在目标应用需恢复振动组件的振动时,由终端继续驱动振动组件进行振动,从而实现基于目标应用的播放或暂停,对振动组件的状态进行实时变化,无缝切换,达到灵活控制振动组件的暂停和恢复的目的,提升振动效果和目标应用之间的契合度。进一步的,当存在振动暂停事件时,还可记录目标振动波形文件以及当前振动时间,从而实现在需恢复振动组件的振动时,若目标应用仍呈现目标业务场景,则可基于记录的当前振动时间生成恢复振动时间;从而根据恢复振动时间和目标振动波形文件,驱动振动组件继续振动。通过记录当前振动时间,并基于当前振动时间来生成恢复振动时间,可在一定程度上实现振动暂停和继续播放的连续性,进一步提升用户体验。In the embodiment of the present application, when the target business scene presented by the target application includes a target vibration object that needs to vibrate, the terminal can drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scene. When there is a vibration suspension event about the vibration component originating from the target application, the terminal can be triggered to control the vibration component to suspend the vibration; and when the target application needs to resume the vibration of the vibration component, the terminal will continue to drive the vibration component to vibrate, so as to achieve target-based Play or pause the application, change the state of the vibration component in real time, seamlessly switch, achieve the purpose of flexibly controlling the suspension and recovery of the vibration component, and improve the fit between the vibration effect and the target application. Further, when there is a vibration suspension event, the target vibration waveform file and the current vibration time can also be recorded, so that when the vibration of the vibration component needs to be resumed, if the target application still presents the target business scene, it can be based on the recorded current vibration time Generate the recovery vibration time; thus, according to the recovery vibration time and the target vibration waveform file, the driving vibration component continues to vibrate. By recording the current vibration time and generating the recovery vibration time based on the current vibration time, the continuity of vibration pause and continuous playback can be realized to a certain extent, and user experience can be further improved.
基于上述方法实施例以及装置实施例的描述,本申请实施例还提供一种计算机设备,此处所提及的计算机设备可以是前述所提及的终端;可选的,当前述所提及的目标应用为云应用时,该计算机设备也可以是运行该目标应用的云服务器。请参见图10,该计算机设备至少包括处理器1001、输入接口1002、输出接口1003以及非易失性的计算机可读存储介质1004;且该计算机设备内的处理器1001、输入接口1002、输出接口1003以及非易失性的计算机可读存储介质1004可通过总线或其他方式连接。非易失性的计算机可读存储介质1004可以存储在计算机设备的存储器中,所述非易失性的计算机可读存储介质 1004用于存储计算机可读指令,处理器1001(或称CPU(Central Processing Unit,中央处理器))是计算机设备的计算核心以及控制核心,其适于实现一条或多条计算机可读指令,具体适于加载并执行一条或多条计算机可读指令从而实现相应方法流程或相应功能。Based on the descriptions of the above-mentioned method embodiments and device embodiments, this embodiment of the present application also provides a computer device. The computer device mentioned here may be the aforementioned terminal; optionally, when the aforementioned When the target application is a cloud application, the computer device may also be a cloud server running the target application. Referring to FIG. 10 , the computer device at least includes a processor 1001, an input interface 1002, an output interface 1003, and a non-volatile computer-readable storage medium 1004; and the processor 1001, the input interface 1002, and the output interface in the computer device 1003 and the non-volatile computer-readable storage medium 1004 can be connected through a bus or other means. The non-volatile computer-readable storage medium 1004 can be stored in the memory of the computer device, and the non-volatile computer-readable storage medium 1004 is used for storing computer-readable instructions, and the processor 1001 (or called CPU (Central Processing Unit, central processing unit)) is the computing core and control core of computer equipment, which is suitable for implementing one or more computer-readable instructions, and is specifically suitable for loading and executing one or more computer-readable instructions to realize the corresponding method flow or the corresponding function.
在一个实施例中,若计算机设备为运行目标应用的云服务器,则本申请实施例所述的处理器1001可用于进行一系列的振动控制处理,具体包括:在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,通知终端在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动所述终端内的振动组件进行振动;当存在源自目标应用的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;在需恢复所述振动组件的振动时,若所述目标应用呈现的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;根据所述恢复振动时间和记录的目标振动波形文件生成振动恢复通知,并将所述振动恢复通知下发给所述终端,以使所述终端根据所述振动恢复通知驱动所述振动组件继续振动,等等。In one embodiment, if the computer device is a cloud server running the target application, the processor 1001 described in the embodiment of the present application can be used to perform a series of vibration control processes, specifically including: in the target business scene presented by the target application When the target vibration object to be vibrated is included, the terminal is notified to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target business scenario; when there is a vibration from the target application When about the vibration suspension event of the vibration component, record the target vibration waveform file and the current vibration time; the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to: when there is the vibration suspension event, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file; when the vibration of the vibration component needs to be restored, if the business scene presented by the target application is the target business scene, then Based on the current vibration time, generate a recovery vibration time; generate a vibration recovery notification according to the recovery vibration time and the recorded target vibration waveform file, and send the vibration recovery notification to the terminal, so that the terminal according to The vibration resume notification drives the vibration component to continue vibrating, and so on.
另一个实施例中,若计算机设备为终端,则本申请实施例所述的处理器1001可用于进行一系列的振动控制处理,具体包括:在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;当存在源自目标应用的关于所述振动组件的振动暂停事件时,控制所述振动组件暂停振动;所述目标振动波形文件包括多个振动属性值,在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间为当前振动时间,所述当前振动时间和所述目标振动波形文件被所述目标应用记录;接收所述目标应用发送的振动恢复通知,所述振动恢复通知是根据恢复振动时间和记录的目标振动波形文件生成的;所述恢复振动时间是所述目标应用确定需恢复所述振动组件的振动时,且所述目标应用呈现的业务场景为所述目标业务场景时,基于所述当前振动时间生成的;根据所述振动恢复通知确定恢复振动时间和目标振动波形文件,并根据确定的振动时间指示信息和目标振动波形文件,驱动所述振动组件继续振动,等等。In another embodiment, if the computer device is a terminal, the processor 1001 described in the embodiment of the present application can be used to perform a series of vibration control processing, specifically including: including the target that needs to be vibrated in the target business scene presented by the target application When vibrating the object, in the target business scenario, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object; when there is a vibration suspension event about the vibration component originating from the target application When the vibration component is controlled to suspend vibration; the target vibration waveform file includes a plurality of vibration attribute values, and when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, the current vibration time and the target vibration waveform file are recorded by the target application; receive the vibration recovery notification sent by the target application, and the vibration recovery notification is based on the recovery vibration time and the recorded target vibration The waveform file is generated; the restoration vibration time is generated based on the current vibration time when the target application determines that the vibration of the vibration component needs to be restored, and the business scene presented by the target application is the target business scene determining the recovery vibration time and the target vibration waveform file according to the vibration recovery notification, and driving the vibration component to continue vibrating according to the determined vibration time indication information and the target vibration waveform file, and so on.
另一个实施例中,若计算机设备为终端,则本申请实施例所述的处理器1001可用于进行一系列的振动控制处理,具体包括:在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;当存在源自目标应用的的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;在需恢复所述振动组件的振动时,若所述目标应用呈现的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;根据所述恢复振动时间和所述目标振动波形文件,驱动所述振动组件继续振动,等等。In another embodiment, if the computer device is a terminal, the processor 1001 described in the embodiment of the present application can be used to perform a series of vibration control processing, specifically including: including the target that needs to be vibrated in the target business scene presented by the target application When vibrating the object, in the target business scenario, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object; when there is a vibration suspension about the vibration component originating from the target application During an event, record the target vibration waveform file and the current vibration time; the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time refers to: when there is the vibration pause event, the target vibration waveform The vibration time corresponding to the vibration attribute value adopted in the file; when the vibration of the vibration component needs to be restored, if the business scenario presented by the target application is the target business scenario, based on the current vibration time, generate Restoring the vibration time; according to the restoring vibration time and the target vibration waveform file, driving the vibrating component to continue vibrating, and so on.
本申请实施例还提供了一种非易失性的计算机可读存储介质(Memory),所述存储介质是计算机设备中的记忆设备,用于存放程序和数据。可以理解的是,此处的存储介质既可以包括计算机设备中的内置存储介质,当然也可以包括计算机设备所支持的扩展存储介 质。存储介质提供存储空间,该存储空间存储了计算机设备的操作系统。并且,在该存储空间中还存放了适于被处理器1001加载并执行的一条或多条的计算机可读指令,这些指令可以是一个或一个以上的计算机可读指令(包括程序代码)。需要说明的是,此处的存储介质可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器;可选的,还可以是至少一个位于远离前述处理器的计算机可读存储介质。The embodiment of the present application also provides a non-volatile computer-readable storage medium (Memory). The storage medium is a memory device in a computer device and is used to store programs and data. It can be understood that the storage medium here may include built-in storage media in the computer equipment, and of course may also include extended storage media supported by the computer equipment. The storage medium provides storage space, which stores the operating system of the computer device. Moreover, one or more computer-readable instructions adapted to be loaded and executed by the processor 1001 are also stored in the storage space, and these instructions may be one or more computer-readable instructions (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory; computer readable storage media.
在一个实施例中,可由处理器1001加载并执行计算机可读存储介质中存放的一条或多条计算机可读指令,以实现上述振动控制方法实施例中的方法的相应步骤。In one embodiment, one or more computer-readable instructions stored in the computer-readable storage medium can be loaded and executed by the processor 1001, so as to realize corresponding steps of the method in the above vibration control method embodiment.
需要说明的是,根据本申请的一个方面,还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机可读指令,该计算机可读指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机可读指令,处理器执行该计算机可读指令,使得该计算机设备执行上述振动控制方法的各种可选方式中提供的实施例。It should be noted that, according to one aspect of the present application, a computer program product or computer program is also provided, the computer program product or computer program includes computer-readable instructions, and the computer-readable instructions are stored in a computer-readable storage medium . The processor of the computer device reads the computer-readable instructions from the computer-readable storage medium, and the processor executes the computer-readable instructions, so that the computer device executes the embodiments provided in the various optional modes of the above-mentioned vibration control method.
并且,应理解的是,以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。And, it should be understood that what is disclosed above is only a preferred embodiment of the application, and certainly cannot limit the scope of rights of the application. Therefore, the equivalent changes made according to the claims of the application are still covered by the application. range.

Claims (20)

  1. 一种振动控制方法,由计算机设备执行,所述方法包括:A vibration control method performed by a computer device, the method comprising:
    在目标应用的目标业务场景中包括需振动的目标振动对象时,通知终端在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动所述终端内的振动组件进行振动;When the target service scene of the target application includes a target vibration object that needs to be vibrated, notify the terminal to drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object in the target service scene ;
    当存在源自所述目标应用的的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;When there is a vibration suspension event about the vibration component originating from the target application, record the target vibration waveform file and the current vibration time; the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration Time refers to: when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
    在需恢复所述振动组件的振动时,若所述目标应用的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;When the vibration of the vibrating component needs to be restored, if the business scenario of the target application is the target business scenario, generating a recovery vibration time based on the current vibration time;
    根据所述恢复振动时间和记录的目标振动波形文件生成振动恢复通知,并将所述振动恢复通知下发给所述终端,以使所述终端根据所述振动恢复通知驱动所述振动组件继续振动。Generate a vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, and send the vibration recovery notification to the terminal, so that the terminal drives the vibration component to continue vibrating according to the vibration recovery notification .
  2. 如权利要求1所述的方法,其特征在于,所述根据所述恢复振动时间和记录的目标振动波形文件生成振动恢复通知,包括:The method according to claim 1, wherein said generating a vibration recovery notice according to said recovery time of vibration and the recorded target vibration waveform file comprises:
    将所述当前振动时间作为基准,计算所述恢复振动时间和所述当前振动时间之间的相对时间偏移量;Using the current vibration time as a reference, calculate the relative time offset between the recovery vibration time and the current vibration time;
    确定记录的目标振动波形文件的文件标识,并根据所述相对时间偏移量和所述文件标识,生成振动恢复通知。Determine the file identifier of the recorded target vibration waveform file, and generate a vibration recovery notification according to the relative time offset and the file identifier.
  3. 如权利要求1所述的方法,其特征在于,所述根据所述恢复振动时间和记录的目标振动波形文件生成振动恢复通知,包括:The method according to claim 1, wherein said generating a vibration recovery notice according to said recovery time of vibration and the recorded target vibration waveform file comprises:
    确定记录的目标振动波形文件的文件标识;Determine the file identification of the recorded target vibration waveform file;
    根据所述恢复振动时间和所述文件标识,生成振动恢复通知。Generate a vibration recovery notification according to the vibration recovery time and the file identifier.
  4. 如权利要求1-3任一项所述的方法,其特征在于,所述基于所述当前振动时间,生成恢复振动时间,包括:The method according to any one of claims 1-3, wherein the generating the recovery vibration time based on the current vibration time includes:
    将所述当前振动时间确定为恢复振动时间;determining the current vibration time as the recovery vibration time;
    或者,将早于所述当前振动时间的一个振动时间确定为恢复振动时间;Or, determining a vibration time earlier than the current vibration time as the recovery vibration time;
    或者,将晚于所述当前振动时间的一个振动时间确定为恢复振动时间。Alternatively, a vibration time later than the current vibration time is determined as the recovery vibration time.
  5. 如权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, wherein the method further comprises:
    在所述终端按照所述目标振动波形文件驱动所述振动组件进行振动的过程中,按照目标频率生成心跳信号;During the process in which the terminal drives the vibration component to vibrate according to the target vibration waveform file, a heartbeat signal is generated according to the target frequency;
    在每次生成心跳信号后,将生成的所述心跳信号下发至所述终端,以使得所述终端基于所述心跳信号维持所述振动组件的振动。After a heartbeat signal is generated each time, the generated heartbeat signal is sent to the terminal, so that the terminal maintains the vibration of the vibration component based on the heartbeat signal.
  6. 如权利要求5所述的方法,其特征在于,所述振动暂停事件包括以下至少一项:The method according to claim 5, wherein the vibration pause event includes at least one of the following:
    目标应用响应于针对所述目标对象的振动暂停操作,向所述终端发送振动暂停通知的事件;以及,所述心跳信号丢失的事件。The target application sends an event of vibration suspension notification to the terminal in response to the vibration suspension operation of the target object; and an event of the loss of the heartbeat signal.
  7. 如权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, wherein the method further comprises:
    在需恢复所述振动组件振动时,若所述目标应用的业务场景为新的业务场景,且所述 新的业务场景中包括一个或多个需振动的振动对象时,获取所述新的业务场景所关联的新振动描述文件,所述新振动描述文件中包括:所述新的业务场景中的各个振动对象关联的振动波形文件;When the vibration of the vibration component needs to be restored, if the business scenario of the target application is a new business scenario, and the new business scenario includes one or more vibration objects that need to vibrate, acquire the new business A new vibration description file associated with the scene, the new vibration description file includes: a vibration waveform file associated with each vibration object in the new business scene;
    将所述新振动描述文件下发给所述终端,使得所述终端根据所述新振动描述文件中的各个振动波形文件,驱动所述振动组件振动。Sending the new vibration description file to the terminal, so that the terminal drives the vibration component to vibrate according to each vibration waveform file in the new vibration description file.
  8. 一种振动控制方法,由终端执行,所述方法包括:A vibration control method, executed by a terminal, the method comprising:
    在目标应用的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;When the target service scene of the target application includes a target vibration object to be vibrated, in the target service scene, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object;
    当存在源自所述目标应用的关于所述振动组件的振动暂停事件时,控制所述振动组件暂停振动;所述目标振动波形文件包括多个振动属性值,在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间为当前振动时间,所述当前振动时间和所述目标振动波形文件被所述目标应用记录;When there is a vibration suspension event about the vibration component originating from the target application, control the vibration component to suspend vibration; the target vibration waveform file includes a plurality of vibration attribute values, and when there is the vibration suspension event, The vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, and the current vibration time and the target vibration waveform file are recorded by the target application;
    接收源自所述目标应用的振动恢复通知,所述振动恢复通知是根据恢复振动时间和记录的目标振动波形文件生成的;所述恢复振动时间是所述目标应用确定需恢复所述振动组件的振动时,且所述目标应用的业务场景为所述目标业务场景时,基于所述当前振动时间生成的;receiving a vibration recovery notification from the target application, the vibration recovery notification is generated according to the recovery vibration time and the recorded target vibration waveform file; the recovery vibration time is the time when the target application determines that the vibration component needs to be restored When vibrating, and the business scenario of the target application is the target business scenario, it is generated based on the current vibration time;
    根据所述振动恢复通知确定恢复振动时间和目标振动波形文件,并根据确定的恢复振动时间和目标振动波形文件,驱动所述振动组件继续振动。The vibration recovery time and the target vibration waveform file are determined according to the vibration recovery notification, and the vibration component is driven to continue vibrating according to the determined vibration recovery time and the target vibration waveform file.
  9. 如权利要求8所述的方法,其特征在于,所述振动恢复通知包括:所述恢复振动时间和所述当前振动时间之间的相对时间偏移量;The method according to claim 8, wherein the vibration recovery notification includes: a relative time offset between the recovery vibration time and the current vibration time;
    所述根据所述振动恢复通知确定恢复振动时间,包括:The determining the time to restore vibration according to the vibration restoration notification includes:
    从所述振动恢复通知中解析出所述相对时间偏移量;parsing the relative time offset from the vibration recovery notification;
    基于所述相对时间偏移量和所述当前振动时间,计算出恢复振动时间。Based on the relative time offset and the current vibration time, the recovery vibration time is calculated.
  10. 如权利要求8所述的方法,其特征在于,所述方法还包括:The method of claim 8, further comprising:
    接收源自所述目标应用的心跳信号,所述心跳信号是由所述目标应用按照目标频率生成的;receiving a heartbeat signal from the target application, the heartbeat signal being generated by the target application according to a target frequency;
    每次接收到心跳信号后,基于每次接收到的心跳信号维持所述振动组件的振动。After each heartbeat signal is received, the vibration of the vibrating component is maintained based on each heartbeat signal received.
  11. 如权利要求10所述的方法,其特征在于,所述方法还包括:The method of claim 10, further comprising:
    若检测到心跳信号丢失,则确定存在源自所述目标应用的关于所述振动组件的振动暂停事件;If it is detected that the heartbeat signal is lost, it is determined that there is a vibration suspension event about the vibration component originating from the target application;
    或者,若接收到源自所述目标应用的振动暂停通知,则确定存在源自所述目标应用的关于所述振动组件的振动暂停事件。Alternatively, if a vibration suspension notification from the target application is received, it is determined that there is a vibration suspension event related to the vibration component from the target application.
  12. 如权利要求8所述的方法,其特征在于,所述方法还包括:The method of claim 8, further comprising:
    接收源自所述目标应用的新振动描述文件,所述新振动描述文件是所述目标应用确定需恢复所述振动组件的振动时,所述目标应用的业务场景为新的业务场景,且所述新的业务场景中包括一个或多个需振动的振动对象时,获取的;所述新振动描述文件中包括:所述新的业务场景中的各个振动对象的振动波形文件;receiving a new vibration description file from the target application, where the new vibration description file is a new business scenario of the target application when the target application determines that the vibration of the vibration component needs to be restored, and the When the new business scene includes one or more vibration objects that need to vibrate, it is obtained; the new vibration description file includes: the vibration waveform file of each vibration object in the new business scene;
    根据所述新振动描述文件中的各个振动波形文件,驱动所述振动组件振动。Drive the vibration component to vibrate according to each vibration waveform file in the new vibration description file.
  13. 一种振动控制方法,由终端执行,所述方法包括:A vibration control method, executed by a terminal, the method comprising:
    在目标应用的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;When the target service scene of the target application includes a target vibration object to be vibrated, in the target service scene, drive the vibration component in the terminal to vibrate according to the target vibration waveform file associated with the target vibration object;
    当存在源自所述目标应用的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;When there is a vibration suspension event about the vibration component originating from the target application, record the target vibration waveform file and the current vibration time; the target vibration waveform file includes a plurality of vibration attribute values, and the current vibration time Refers to: when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
    在需恢复所述振动组件的振动时,若所述目标应用的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;When the vibration of the vibrating component needs to be restored, if the business scenario of the target application is the target business scenario, generating a recovery vibration time based on the current vibration time;
    根据所述恢复振动时间和记录的目标振动波形文件,驱动所述振动组件继续振动。According to the resumed vibration time and the recorded target vibration waveform file, the vibration component is driven to continue to vibrate.
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:The method according to claim 13, further comprising:
    在需恢复所述振动组件振动时,若所述目标应用的业务场景为新的业务场景,且所述新的业务场景中包括一个或多个需振动的振动对象时,获取所述新的业务场景所关联的新振动描述文件,所述新振动描述文件中包括:所述新的业务场景中的各个振动对象关联的振动波形文件;When the vibration of the vibration component needs to be restored, if the business scenario of the target application is a new business scenario, and the new business scenario includes one or more vibration objects that need to vibrate, acquire the new business A new vibration description file associated with the scene, the new vibration description file includes: a vibration waveform file associated with each vibration object in the new business scene;
    根据所述新振动描述文件中的各个振动波形文件,驱动所述振动组件振动。Drive the vibration component to vibrate according to each vibration waveform file in the new vibration description file.
  15. 根据权利要求13所述的方法,其特征在于,所述方法还包括:The method according to claim 13, further comprising:
    在按照所述目标振动波形文件驱动所述振动组件进行振动的过程中,通过所述目标应用按照目标频率生成心跳信号;During the process of driving the vibrating component to vibrate according to the target vibration waveform file, generate a heartbeat signal according to the target frequency through the target application;
    基于所述心跳信号维持所述振动组件的振动。Vibration of the vibration assembly is maintained based on the heartbeat signal.
  16. 一种振动控制装置,所述装置包括:A vibration control device, said device comprising:
    控制单元,用于在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,通知终端在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动所述终端内的振动组件进行振动;A control unit, configured to notify the terminal to drive the terminal according to the target vibration waveform file associated with the target vibration object in the target service scenario when the target service scene presented by the target application includes a target vibration object that needs to vibrate The vibrating components inside vibrate;
    记录单元,用于当存在源自目标应用的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;A recording unit, configured to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component originating from the target application; the target vibration waveform file includes a plurality of vibration attribute values, the The current vibration time refers to: when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
    处理单元,用于在需恢复所述振动组件的振动时,若所述目标应用呈现的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;A processing unit, configured to generate a restoration vibration time based on the current vibration time if the business scenario presented by the target application is the target business scenario when the vibration of the vibration component needs to be restored;
    所述控制单元,还用于根据所述恢复振动时间和记录的目标振动波形文件生成振动恢复通知,并将所述振动恢复通知下发给所述终端,以使所述终端根据所述振动恢复通知驱动所述振动组件继续振动。The control unit is further configured to generate a vibration recovery notification according to the vibration recovery time and the recorded target vibration waveform file, and send the vibration recovery notification to the terminal, so that the terminal can recover The notification drives the vibrating component to continue vibrating.
  17. 一种振动控制装置,所述装置包括:A vibration control device, said device comprising:
    驱动单元,用于在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;The driving unit is configured to drive the vibration component in the terminal according to the target vibration waveform file associated with the target vibration object in the target business scenario when the target service scene presented by the target application includes a target vibration object that needs to vibrate to vibrate;
    所述驱动单元,用于当存在源自所述目标应用的关于所述振动组件的振动暂停事件时,控制所述振动组件暂停振动;所述目标振动波形文件包括多个振动属性值,在存在所 述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间为当前振动时间,所述当前振动时间和所述目标振动波形文件被所述目标应用记录;The drive unit is configured to control the vibration component to suspend vibration when there is a vibration suspension event about the vibration component originating from the target application; the target vibration waveform file includes a plurality of vibration attribute values. During the vibration pause event, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file is the current vibration time, and the current vibration time and the target vibration waveform file are recorded by the target application;
    接收单元,用于接收所述目标应用发送的振动恢复通知,所述振动恢复通知是根据恢复振动时间和记录的目标振动波形文件生成的;所述恢复振动时间是所述目标应用确定需恢复所述振动组件的振动时,且所述目标应用呈现的业务场景为所述目标业务场景时,基于所述当前振动时间成的;The receiving unit is configured to receive the vibration recovery notification sent by the target application, the vibration recovery notification is generated according to the recovery vibration time and the recorded target vibration waveform file; the recovery vibration time is determined by the target application to restore the When the vibration component is vibrating, and the business scenario presented by the target application is the target business scenario, based on the current vibration time;
    所述驱动单元,还用于根据所述振动恢复通知确定恢复振动时间和目标振动波形文件,并根据确定的恢复振动时间和目标振动波形文件,驱动所述振动组件继续振动。The driving unit is further configured to determine a recovery vibration time and a target vibration waveform file according to the vibration recovery notification, and drive the vibration component to continue vibrating according to the determined recovery vibration time and target vibration waveform file.
  18. 一种振动控制装置,所述装置包括:A vibration control device, said device comprising:
    驱动单元,用于在目标应用呈现的目标业务场景中包括需振动的目标振动对象时,在所述目标业务场景下,按照所述目标振动对象关联的目标振动波形文件,驱动终端内的振动组件进行振动;The driving unit is configured to drive the vibration component in the terminal according to the target vibration waveform file associated with the target vibration object in the target business scenario when the target service scene presented by the target application includes a target vibration object that needs to vibrate to vibrate;
    记录单元,用于当存在源自所述目标应用的关于所述振动组件的振动暂停事件时,记录所述目标振动波形文件以及当前振动时间;所述目标振动波形文件包括多个振动属性值,所述当前振动时间是指:在存在所述振动暂停事件时,所述目标振动波形文件中被采用的振动属性值所对应的振动时间;A recording unit, configured to record the target vibration waveform file and the current vibration time when there is a vibration suspension event about the vibration component originating from the target application; the target vibration waveform file includes a plurality of vibration attribute values, The current vibration time refers to: when the vibration pause event exists, the vibration time corresponding to the vibration attribute value adopted in the target vibration waveform file;
    处理单元,用于在需恢复所述振动组件的振动时,若所述目标应用呈现的业务场景为所述目标业务场景,则基于所述当前振动时间,生成恢复振动时间;A processing unit, configured to generate a restoration vibration time based on the current vibration time if the business scenario presented by the target application is the target business scenario when the vibration of the vibration component needs to be restored;
    所述驱动单元,还用于根据所述恢复振动时间和记录的目标振动波形文件,驱动所述振动组件继续振动。The driving unit is further configured to drive the vibrating component to continue vibrating according to the resuming vibration time and the recorded target vibration waveform file.
  19. 一种计算机设备,包括输入接口和输出接口,还包括:A computer device, including an input interface and an output interface, also includes:
    处理器,适于实现一条或多条可读指令;以及,a processor adapted to implement one or more readable instructions; and,
    非易失性的计算机可读存储介质,所述计算机可读存储介质存储有一条或多条计算机可读指令,所述一条或多条计算机可读指令适于由所述处理器加载并执行如权利要求1至15中任一项所述的振动控制方法。A non-volatile computer-readable storage medium, the computer-readable storage medium stores one or more computer-readable instructions, and the one or more computer-readable instructions are adapted to be loaded by the processor and executed as The vibration control method according to any one of claims 1 to 15.
  20. 一种非易失性的计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一条或多条计算机可读指令,所述一条或多条计算机可读指令适于由处理器加载并执行如权利要求1至15中任一项所述的振动控制方法。A non-volatile computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more computer-readable instructions, and the one or more computer-readable instructions are adapted to be executed by a processor Loading and executing the vibration control method according to any one of claims 1 to 15.
PCT/CN2022/106179 2021-07-27 2022-07-18 Vibration control method and apparatus, device, and storage medium WO2023005703A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110854628.8 2021-07-27
CN202110854628.8A CN115671712B (en) 2021-07-27 2021-07-27 Vibration control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
WO2023005703A1 WO2023005703A1 (en) 2023-02-02
WO2023005703A9 true WO2023005703A9 (en) 2023-03-02

Family

ID=85059328

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/106179 WO2023005703A1 (en) 2021-07-27 2022-07-18 Vibration control method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115671712B (en)
WO (1) WO2023005703A1 (en)

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015028766A (en) * 2013-06-24 2015-02-12 パナソニックIpマネジメント株式会社 Tactile presentation device and tactile presentation method
CN105812567A (en) * 2016-03-29 2016-07-27 努比亚技术有限公司 Mobile terminal control method and device
CN106598438A (en) * 2016-12-22 2017-04-26 腾讯科技(深圳)有限公司 Scene switching method based on mobile terminal, and mobile terminal
CN106657814B (en) * 2017-01-17 2018-12-04 维沃移动通信有限公司 A kind of video recording method and mobile terminal
CN107580247B (en) * 2017-08-30 2021-07-09 瑞声科技(新加坡)有限公司 Vibration playing method and device and electronic equipment
WO2019220495A1 (en) * 2018-05-14 2019-11-21 株式会社ソニー・インタラクティブエンタテインメント Information processing device
CN109062535B (en) * 2018-07-23 2021-07-13 Oppo广东移动通信有限公司 Sound production control method and device, electronic device and computer readable medium
CN109887528A (en) * 2019-02-15 2019-06-14 上海艾为电子技术股份有限公司 Motor is with the method and device of audio frequency vibration, storage medium and electronic equipment
IT201900014475A1 (en) * 2019-08-09 2021-02-09 Tor Mec Ambrosi S R L Control system and method for managing sewing machines
CN110568926B (en) * 2019-08-26 2021-07-30 维沃移动通信有限公司 Sound signal processing method and terminal equipment
CN110597393B (en) * 2019-09-18 2023-05-05 Oppo(重庆)智能科技有限公司 Motor vibration control method and device and computer readable storage medium
CN111084983B (en) * 2019-11-25 2021-12-14 腾讯科技(深圳)有限公司 Cloud game service method, device, equipment and storage medium
CN111249722A (en) * 2020-01-17 2020-06-09 网易(杭州)网络有限公司 Control method and device of terminal equipment, storage medium and electronic equipment
CN111312281B (en) * 2020-05-09 2020-09-08 北京小米移动软件有限公司 Touch vibration implementation method
CN112269895A (en) * 2020-11-06 2021-01-26 Oppo广东移动通信有限公司 Vibration control method and device and computer readable storage medium
CN113018851B (en) * 2021-05-28 2021-08-06 腾讯科技(深圳)有限公司 Game processing method, device, computer equipment and storage medium
CN114618153A (en) * 2022-03-15 2022-06-14 网易(杭州)网络有限公司 Method and device for vibration feedback in game and electronic equipment

Also Published As

Publication number Publication date
WO2023005703A1 (en) 2023-02-02
CN115671712A (en) 2023-02-03
CN115671712B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
US11231841B2 (en) Continuation of playback of media content by different output devices
JP6314217B2 (en) Transition management of adaptive display rate for various video playback scenarios
US9454282B2 (en) Sending application input commands over a network
US9942556B2 (en) Altering streaming video encoding based on user attention
US11065540B2 (en) Game execution device and game program
US9031375B2 (en) Video frame still image sequences
AU2019233201A1 (en) Resource configuration method and apparatus, terminal, and storage medium
JP2017510862A (en) Drawing system, control method, and storage medium
CN101502111A (en) Synchronized media experience
US11938406B2 (en) Dynamic allocation of compute resources for highlight generation in cloud gaming systems
WO2019052395A1 (en) Multimedia data presentation method, storage medium and computer device
US20180270517A1 (en) Decoupled Playback of Media Content Streams
CN114042310A (en) Game operation data collection method and device, computer equipment and storage medium
WO2023005703A9 (en) Vibration control method and apparatus, device, and storage medium
US11366586B2 (en) Streaming application environment with recovery of lost or delayed input events
WO2023226814A1 (en) Video processing method and apparatus, electronic device, and storage medium
CN115364477A (en) Cloud game control method and device, electronic equipment and storage medium
US20220040571A1 (en) Systems and methods of transferring state data for applications
WO2018121542A1 (en) Operation method and apparatus for service object, and electronic device
JP2024514800A (en) Device control method, device, electronic device, and computer program based on cloud application
US9954718B1 (en) Remote execution of applications over a dispersed network
US20240100440A1 (en) AI Player Model Gameplay Training and Highlight Review
US20240042313A1 (en) Multi-user cross-device synchronization of metaverse instantiation
CN116366915A (en) Live special effect processing method and device, storage medium and computer equipment
CN116980692A (en) Method, device, equipment and storage medium for exporting video

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22848308

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE