CN115202767B - Vibration control method, device, equipment and computer readable storage medium - Google Patents

Vibration control method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115202767B
CN115202767B CN202211136014.7A CN202211136014A CN115202767B CN 115202767 B CN115202767 B CN 115202767B CN 202211136014 A CN202211136014 A CN 202211136014A CN 115202767 B CN115202767 B CN 115202767B
Authority
CN
China
Prior art keywords
vibration
value
block
storage space
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211136014.7A
Other languages
Chinese (zh)
Other versions
CN115202767A (en
Inventor
赵佳宁
徐士立
洪楷
刘专
孙逊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310030099.9A priority Critical patent/CN117762532A/en
Priority to CN202211136014.7A priority patent/CN115202767B/en
Publication of CN115202767A publication Critical patent/CN115202767A/en
Application granted granted Critical
Publication of CN115202767B publication Critical patent/CN115202767B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/016Input arrangements with force or tactile feedback as computer generated output to the user

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a vibration control method, a device, equipment and a computer readable storage medium. The method comprises the following steps: the method comprises the steps that a parameter generation condition responding to target vibration is triggered, a vibration calling party generates vibration calling parameters corresponding to the target vibration according to a reference coding mode, the vibration calling party is provided with a vibration middleware, the vibration calling parameters are transmitted to the vibration middleware through a vibration parameter interface, the vibration calling parameters are sent to one or more vibration output parties through the vibration middleware, each vibration output party analyzes the vibration calling parameters, and the target vibration is output based on an analysis result. Therefore, the vibration calling party (such as the client) sends the vibration calling parameters to the vibration output party through the vibration middleware, so that the vibration calling interface of the vibration calling party can be unified, and the convenience of vibration calling is further improved.

Description

Vibration control method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a vibration control method, a vibration control apparatus, a computer device, and a computer-readable storage medium.
Background
With the progress of scientific research, various terminal devices (such as mobile phones, tablet computers and the like) have been integrated into the lives of people. The vibration caller (such as a client) in the terminal equipment generally outputs vibration based on a use scene in the use process; for example, when social application software in the terminal device acquires a new message, vibration is output through the terminal device; for another example, the game software in the terminal device may output vibrations through the terminal device simultaneously when displaying the target image. Researches find that the calling modes of the vibration of the terminal equipment produced by different manufacturers are different, and the convenience is poor.
Disclosure of Invention
The embodiment of the application provides a vibration control method, a vibration control device, vibration control equipment and a computer readable storage medium, and can improve the convenience of vibration calling.
In one aspect, an embodiment of the present application provides a vibration control method, including:
the method comprises the steps that a parameter generating condition responding to target vibration is triggered, a vibration calling party generates vibration calling parameters corresponding to the target vibration according to a reference coding mode, and the vibration calling party is loaded with a vibration middleware;
transferring the vibration calling parameters to the vibration middleware through a vibration parameter interface so as to send the vibration calling parameters to one or more vibration output sides through the vibration middleware, enabling each vibration output side to analyze the vibration calling parameters and outputting target vibration based on an analysis result.
In one aspect, an embodiment of the present application provides a vibration control apparatus, including:
the processing unit is used for responding to the triggering of the parameter generation condition of the target vibration, generating a vibration calling parameter corresponding to the target vibration by a vibration calling party according to a reference coding mode, and carrying a vibration middleware by the vibration calling party;
and the sending unit is used for transmitting the vibration calling parameters to the vibration middleware through the vibration parameter interface so as to send the vibration calling parameters to one or more vibration output parties through the vibration middleware, enable each vibration output party to analyze the vibration calling parameters and output target vibration based on an analysis result.
In one embodiment, if the file format of the parameter for vibration invocation does not belong to the target format, the processing unit is further configured to:
carrying out format conversion processing on the vibration calling parameter through the vibration middleware to obtain an updated vibration calling parameter;
and the file format of the updated vibration calling parameter belongs to the target format.
In an embodiment, the processing unit is configured to perform format conversion processing on the vibration invoking parameter through the vibration middleware to obtain an updated vibration invoking parameter, and specifically configured to:
converting the vibration calling parameter according to a parameter conversion rule corresponding to the target format through the vibration middleware; and;
and constructing a parameter conversion result through the vibration middleware according to a data organization form corresponding to the target format to obtain an updated vibration calling parameter.
In one embodiment, the target format includes at least one of a first format and a second format, the second format being a compressed representation of the first format.
In one embodiment, the file format of the vibration invocation parameter belongs to a first format, the vibration invocation parameter comprises a metadata key-value pair and a mode key-value pair, and the metadata key-value pair is used for indicating metadata in the vibration invocation parameter; the mode key value pair is used to indicate a vibration mode.
In one embodiment, the value of the metadata key-value pair is used to indicate a digest object that includes at least one key-value pair of: version key value pairs, creation time key value pairs and description information key value pairs;
the version key value pair is used for indicating a version number corresponding to the vibration calling parameter; the creation time key value pair is used for indicating the creation time of the vibration calling parameter; the description information key value pair is used for describing the vibration effect of the vibration calling parameter.
In one embodiment, the value of the schema key-value pair is at least one array element, the value of each array element being an event object; the target event object includes at least one key-value pair of: vibration part key value pair, vibration time key value pair, duration key value pair, intensity mark key value pair and frequency mark key value pair; the target event object is the value of a target array element, and the target array element is any one of at least one array element;
the vibration part key value pair is used for indicating a motor called when outputting the vibration indicated by the target event object; the vibration time key value pair is used for indicating the starting time of the vibration indicated by the target event object; the duration key value pair is used for indicating the duration of the vibration indicated by the target event object; the strength mark key value pair is used for indicating the strength indication mode of the vibration indicated by the target event object; the frequency token key value pair is used to indicate the frequency indication mode of the vibration indicated by the target event object.
In one embodiment, the target event object includes an intensity flag key-value pair and a frequency flag key-value pair, and the target event object further includes a vibration type key-value pair and a vibration description parameter key-value pair; the vibration type key value pair is used for indicating the type of vibration indicated by the target event object, and the vibration description parameter key value pair is used for indicating the output mode of the vibration indicated by the target event object;
when the vibration type indicated by the vibration type key value pair is a first type, the target event object indicates target vibration through at least one reference point, the value of the vibration description parameter key value pair comprises a reference point number key value pair and N reference point array elements, and the value of each reference point array element is a reference point object; the reference point number key value pair is used for indicating the number of reference points associated with the target event object, and N is matched with the number of the reference points associated with the target event object; the target reference point object is used for indicating a vibration output parameter associated with a target reference point, the target reference object is a value of a target reference point array element, and the target reference point array element is any one of the N reference point array elements;
when the vibration type indicated by the vibration type key value pair is of a second type, the value of the vibration description parameter key value pair comprises a vibration intensity key value pair and a vibration frequency key value pair; the vibration strength key value pair is used for indicating the strength of the vibration indicated by the target event object, and the vibration frequency key value pair is used for indicating the frequency of the vibration indicated by the target event object.
In one embodiment, the target reference point object includes at least one key-value pair of: a reference point time key value pair, a reference point intensity key value pair, a reference point frequency key value pair, a reference point motor key value pair;
wherein the reference point time key value pair is used for indicating the relative time of the target reference point in the vibration indicated by the target event object; the reference point intensity key value pair is used for indicating the vibration intensity corresponding to the target reference point; the reference point frequency key value pair is used for indicating the vibration frequency corresponding to the target reference point; the reference point motor key-value pair is used for indicating a motor corresponding to the reference point, and the priority of the reference point motor key-value pair is higher than that of the vibration part key-value pair.
In one embodiment, the file format of the vibration invocation parameter belongs to the second format, and the vibration invocation parameter includes at least one of the following blocks: a head information block, a motor information block, a metadata block, a vibration timing sequence block, a vibration event block, a reference point block and a vibration parameter block;
the head information block is used for describing a vibration calling parameter; the motor information block is used for indicating the called motor; the metadata block is used for indicating the abstract of the vibration calling parameter; the vibration timing block is used for indicating the sequence of at least one vibration event; the vibration event block is used for indicating the associated parameters of the vibration event; the reference point block is used for indicating a vibration output parameter related to a reference point; the vibration parameter block is used for indicating description information corresponding to different vibration types; the storage area corresponding to each block is different, each storage area comprises one or more storage spaces, and each storage space corresponds to a preset offset address.
In one embodiment, the header information block carries a value in at least one of the following storage spaces: the value in the file identification storage space and the value in the file data length storage space;
the value in the file identification storage space is used for indicating the file identification of the vibration calling parameter; the value in the file data length storage space is used to indicate the file data length of the vibration invocation parameter.
In one embodiment, the motor information block carries a value in at least one of the following storage spaces: a value in a motor information block identification storage space, a value in a motor information block data length storage space, a value in a vibration output side identification storage space, a value in a motor version number storage space, a value in a motor number storage space;
wherein the value in the motor information block identification storage space is used to indicate the identification of the motor information block; a value in the motor information block data length storage space is used to indicate a data length of the motor information block; the value in the vibration output party identification storage space is used for indicating the identification of the vibration output party; the value in the motor version number storage space is used for indicating whether the output target vibration needs to call a plurality of motors or not; the value in the motor number storage space is used to indicate that the output target vibration is the number of motors that need to be called up.
In one embodiment, the metadata block carries a value in at least one of the following storage spaces: the method comprises the steps that a metadata block identifies a value in a storage space, a value in a storage space of the data length of the metadata block, a value in a vibration calling parameter version number storage space, a value in a vibration calling parameter creation time storage space and a value in a vibration calling parameter description information storage space;
wherein the value in the metadata block identification storage space is used for indicating the identification of the metadata block; a value in a storage space of the metadata block data length is used to indicate the data length of the metadata block; the value in the vibration calling parameter version number storage space is used for indicating the version number of the vibration calling parameter; the value in the vibration calling parameter creation time storage space is used for indicating the creation time of the vibration calling parameter; the value in the vibration invocation parameter description information storage space is used for indicating the description information of the vibration invocation parameter.
In one embodiment, the vibration sequence block carries values in at least one of the following storage spaces: the vibration time sequence block identifies values in the storage space, and the vibration time sequence block data length stores values in the storage space;
wherein the value in the vibration timing block identification storage space is used to indicate the identification of the vibration timing block; the value in the vibration time series block data length storage space is used to indicate the data length of the vibration time series block.
In one embodiment, the vibration time sequence block is associated with at least one vibration event block, and the corresponding storage area of each vibration event block is different; each vibration event block carries a value in at least one of the following storage spaces: a value in a vibration event block identification storage space, a value in a vibration event type storage space, a value in a vibration event block number storage space, a value in a motor identification storage space, a value in a vibration event start time storage space, a value in a vibration event duration storage space, a value in a vibration intensity flag storage space, a value in a vibration frequency flag storage space;
wherein the value in the vibration event block identification storage space is used to indicate the identification of the vibration event block; the value in the vibration event type storage space is used for indicating the vibration type of the vibration corresponding to the vibration event block; the value in the vibration event block number storage space is used for indicating the number of the vibration event block; the value in the motor identification storage space is used for indicating a motor which needs to be called for outputting the vibration corresponding to the vibration event block; the value in the vibration event starting time storage space is used for indicating the starting time of the vibration corresponding to the vibration event block; the value in the vibration event duration storage space is used for indicating the duration of the vibration corresponding to the vibration event block; the value in the vibration intensity mark storage space is used for indicating the vibration intensity indicating mode of the vibration corresponding to the vibration event block; the value in the vibration frequency flag storage space is used for indicating the vibration frequency indication mode of the vibration corresponding to the vibration event block.
In one embodiment, when the vibration type of the vibration corresponding to the vibration event block is a first type, the vibration event block is associated with at least one reference point block, the storage area corresponding to each reference point block is different, and each reference point block carries the following values in at least one storage space: a value in the reference point block identification storage space, a value in the reference point block serial number storage space, a value in the motor number storage space, a value in the reference point start time storage space, a value in the reference point vibration intensity storage space, and a value in the reference point vibration frequency storage space;
wherein the value in the reference point block identification storage space is used to indicate the identification of the reference point block; the value in the reference point block sequence number storage space is used for indicating the sequence number of the reference point block; the value in the motor number storage space is used for indicating a motor which needs to be called for outputting the vibration corresponding to the reference point block; the value in the reference point starting time storage space is used for indicating the starting time of the vibration corresponding to the reference point block; the value in the reference point vibration strength storage space is used for indicating the vibration strength of the vibration corresponding to the reference point block; the value in the reference point vibration frequency storage space is used to indicate the vibration frequency of the vibration corresponding to the reference point block.
In one embodiment, the vibration event block is further associated with a first vibration parameter block carrying values in at least one of the following storage spaces: the vibration parameter block identifies values in the storage space, and the number of reference points stores values in the storage space;
wherein the value in the vibration parameter block identification storage space is used to indicate the identification of the first vibration parameter block; the value in the reference point number storage space is used to indicate the number of reference point blocks with which the vibration event block is associated.
In one embodiment, when the vibration type of the vibration event corresponding to the vibration event block is a second type, the vibration event block is associated with a second vibration parameter block; the second vibration parameter block carries values in at least one of the following storage spaces: the vibration parameter block identifies values in a storage space, values in an event vibration intensity storage space, and values in an event vibration frequency storage space;
wherein the value in the vibration parameter block identification storage space is used to indicate the identification of the second vibration parameter block; the value in the event vibration strength storage space is used for indicating the vibration strength of the vibration corresponding to the vibration event block; the values in the event vibration frequency storage space are used to indicate the vibration frequency of the vibration corresponding to the vibration event block.
Accordingly, the present application provides a computer device comprising:
a memory having a computer program stored therein;
and the processor is used for loading a computer program to realize the vibration control method.
Accordingly, the present application provides a computer readable storage medium having stored thereon a computer program adapted to be loaded by a processor and to execute the above-mentioned vibration control method.
Accordingly, the present application provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the vibration control method.
In the embodiment of the application, in response to the triggering of the parameter generation condition of the target vibration, the vibration calling party generates the vibration calling parameter corresponding to the target vibration according to a reference coding mode, the vibration calling party is provided with the vibration middleware, the vibration calling parameter is transmitted to the vibration middleware through the vibration parameter interface, the vibration calling parameter is sent to one or more vibration output parties through the vibration middleware, each vibration output party analyzes the vibration calling parameter, and the target vibration is output based on the analysis result. Therefore, the vibration calling party (such as the client) sends the vibration calling parameters to the vibration output party through the vibration middleware, so that the vibration calling interface of the vibration calling party can be unified, and the convenience of vibration calling is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a structural diagram of a vibration control system according to an embodiment of the present application;
fig. 2 is a flowchart of a vibration control method according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of another vibration control method provided by an embodiment of the present application;
fig. 4 is a schematic diagram illustrating sending of a vibration invocation parameter according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a vibration control apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram of a vibration control system according to an embodiment of the present disclosure. As shown in fig. 1, the vibration control system may include: a vibration caller 101 and a vibration outputter 102. The vibration control method provided by the embodiment of the application can be executed by the vibration caller 101. In a specific implementation, the vibration caller 101 and the vibration outputter 102 may belong to one terminal device at the same time, or belong to two different terminal devices respectively; for example, the vibration caller 101 may be a client in a terminal device, and the vibration outputter 102 may be a motor in the terminal device; for another example, the vibration caller 101 may be a client in the terminal device 1 (e.g., a computer), and the vibration output may be a motor in the terminal device 2 (e.g., a game pad, a wearable device, etc.). Terminal devices may include, but are not limited to: smart phones (such as Android phones, IOS phones, and the like), tablet computers, portable personal computers, smart appliances, vehicle terminals, wearable, and other smart devices, which are not limited in the embodiments of the present application.
It should be noted that the number of the vibration output parties may be one or more, and when the number of the vibration output parties is multiple, the vibration calling interfaces of each vibration output party may be different from each other; for example, one computer (vibration calling side) may be connected to a plurality of handles (vibration output side). The vibration caller 101 and the vibration outputter 102 may be directly or indirectly connected through wired communication or wireless communication, and the present application is not limited thereto.
The general principle of the vibration control scheme is as follows:
(1) In response to the triggering of the parameter generation condition of the target vibration, the vibration invoker 101 generates a vibration invocation parameter corresponding to the target vibration according to the reference coding mode. The vibration invoker 101 is loaded with a vibration middleware, and the vibration middleware is configured to send the vibration invocation parameters transmitted by the vibration invoker 101 to one or more vibration exporters.
The reference encoding mode may specifically refer to an encoding mode of a vibration HE format, an encoding mode of a vibration HEC format, or another encoding mode for indicating a vibration effect. The HE format is a file format, the file carries a vibration calling parameter, the suffix of the file is 'HE', and a vibration output party can output a corresponding vibration effect according to the indication of the vibration calling parameter in the file in the HE format; the vibrate HEC format is a compressed representation of the vibrate HE format; that is, the file in the vibration HEC format is obtained by compressing the file in the vibration HE format, the file in the vibration HEC format also carries the vibration invoking parameter, the suffix of the file is ". HEC", and the vibration output party can output the corresponding vibration effect according to the indication of the vibration invoking parameter in the file in the vibration HEC format.
In one embodiment, the vibration effect is indicated by the form of key-value pairs in the vibration HE format file, and the data organization form of the vibration HE format file may be json format. The file in the vibration HEC format indicates the vibration effect by presetting the meaning of a value in a storage space indicated by each specific offset address in one piece of storage area. That is, the vibration middleware and the terminal device know the meaning of the value in the storage space indicated by each specific offset address in a certain storage area in common, and in this case, only the value (value) of each key value pair in the file of the ". He" format is stored in the file of the ". He" format, and the corresponding key (key) thereof does not have to be stored.
It can be understood that the vibration effect is indicated by the file in the format of the 'he', the file does not depend on a specific storage area, the transmitted information is more complete and clear, and the readability is higher; compared with the method of indicating the vibration effect through the files in the format of the symbol he, the method of indicating the vibration effect through the files in the format of the symbol he saves transmission bandwidth, improves transmission speed and saves storage space.
(2) The vibration calling party 101 transmits the vibration calling parameters to the vibration middleware through a vibration parameter interface; it should be noted that, for different vibration invoking parties, the vibration parameter interface for transferring the vibration invoking parameter to the vibration middleware is the same.
In one embodiment, if the file format of the vibration invoking parameter passed by the vibration invoking party 101 does not belong to the target format, the vibration middleware performs format conversion processing on the vibration invoking parameter to obtain an updated vibration invoking parameter, and sends the updated vibration invoking parameter to one or more vibration outputting parties. The updated vibration invoking parameter belongs to a target format, and the target format may specifically be at least one of a ". He" format and a ". Hec" format.
In another embodiment, if the file format of the vibration invoking parameter passed by the vibration invoking party 101 belongs to the target format, the vibration middleware may directly send the vibration invoking parameter to one or more vibration outputting parties. Specifically, the vibration middleware sends vibration calling parameters belonging to the target format to an interface which is provided by each vibration output party and used for supporting a target format file.
(3) After receiving the vibration calling parameter belonging to the target format, the vibration output party 102 may parse the vibration calling parameter and output the target vibration based on the parsing result. It is understood that each vibration output side needs to support (be able to parse) "he" format and ". Hec" format.
In the embodiment of the application, in response to the triggering of the parameter generation condition of the target vibration, the vibration calling party generates the vibration calling parameter corresponding to the target vibration according to a reference coding mode, the vibration calling party is provided with the vibration middleware, the vibration calling parameter is transmitted to the vibration middleware through the vibration parameter interface, the vibration calling parameter is sent to one or more vibration output parties through the vibration middleware, each vibration output party analyzes the vibration calling parameter, and the target vibration is output based on the analysis result. Therefore, the vibration calling party (such as the client) sends the vibration calling parameters to the vibration output party through the vibration middleware, so that the vibration calling interface of the vibration calling party can be unified, and the convenience of vibration calling is further improved. In addition, format conversion can be carried out on the vibration calling parameters through the vibration middleware, and the compatibility of the vibration calling parameters and the convenience of vibration calling are further improved.
Based on the above vibration control scheme, the embodiment of the present application proposes a more detailed vibration control method, and the following describes the vibration control method proposed in the embodiment of the present application in detail with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart of a vibration control method according to an embodiment of the present application, where the vibration control method may be executed by a computer device, and the computer device may be the terminal device shown in fig. 1. As shown in fig. 2, the vibration control method may include the following steps S201 to S202.
S201, responding to the triggering of the parameter generating condition of the target vibration, and generating a vibration calling parameter corresponding to the target vibration by a vibration calling party according to a reference coding mode.
The parameter generating condition of the target vibration may be set according to actual requirements, which is not limited in this application. For example, the parameter generating condition of the target vibration may be that social application software in the computer device acquires a new message, the parameter generating condition of the target vibration may also be that a target event in game software in the computer device is triggered, and the parameter generating condition of the target vibration may also be that the computer device detects that the current time matches a preset time.
The vibration calling party can be computer equipment or a client loaded in the computer equipment; for example, in a scenario where the computer device is connected to the wearable device, the computer device may be a vibration caller, and the wearable device may be a vibration output; for another example, in a scenario where the computer device is loaded with a motor, the client in the computer device may be a vibration caller, and the motor in the computer device may be a vibration outputter.
The reference encoding mode may specifically refer to an encoding mode of a vibration HE format, an encoding mode of a vibration HEC format, or another encoding mode for indicating a vibration effect. The vibration HE format is a file format, the file carries vibration calling parameters, the suffix of the file is 'HE', and a vibration output party can output a corresponding vibration effect according to the indication of the vibration calling parameters in the file in the vibration HE format; the vibrate HEC format is a compressed representation of the vibrate HE format; that is, the file in the vibration HEC format is obtained by compressing the file in the vibration HE format, the file in the vibration HEC format also carries the vibration invoking parameter, the suffix of the file is ". HEC", and the vibration output party can output the corresponding vibration effect according to the indication of the vibration invoking parameter in the file in the vibration HEC format.
In one embodiment, the vibration effect is indicated by the form of key-value pairs in the vibration HE format file, and the data organization form of the vibration HE format file may be a lightweight data exchange format (e.g., json format). The file in the vibration HEC format indicates the effect of vibration by presetting the meaning of a value in the storage space indicated by each specific offset address in one piece of storage area. That is, the vibration middleware and the terminal device know the meaning of the value in the storage space indicated by each specific offset address in a certain storage area in common, and in this case, only the value (value) of each key value pair in the file of the ". He" format is stored in the file of the ". He" format, and the corresponding key (key) thereof does not have to be stored.
It can be understood that the vibration effect is indicated by the file in the format of the 'he', the file does not depend on a specific storage area, the transmitted information is more complete and clear, and the readability is higher; and compared with the vibration effect indicated by the file in the format of the 'he', the vibration effect indicated by the file in the format of the 'he' saves the transmission bandwidth, improves the transmission speed and saves the storage space.
And the vibration calling parameter is used for indicating the vibration output party to output target vibration according to the indicated vibration effect. And the vibration calling party is provided with a vibration middleware, and the vibration middleware is used for sending the vibration calling parameters transmitted by the vibration calling party to one or more vibration output parties.
Optionally, the vibration calling party and the vibration middleware can be independent of each other; for example, the vibration caller may be any client in the computer device, and the vibration middleware is a Software Development Kit (SDK) integrated in the computer device. That is, different clients in the computer device may each send a vibration invocation parameter to one or more vibration output parties through vibration middleware in the computer device.
S202, transmitting the vibration calling parameters to the vibration middleware through the vibration parameter interface so as to send the vibration calling parameters to one or more vibration output sides through the vibration middleware.
For different vibration calling parties, vibration parameter interfaces for transmitting vibration calling parameters to the vibration middleware are the same (namely, the vibration parameter interfaces are unified).
In one embodiment, if the file format of the vibration calling parameter transmitted by the vibration calling party does not belong to the target format, the vibration middleware performs format conversion processing on the vibration calling parameter to obtain an updated vibration calling parameter, and sends the updated vibration calling parameter to one or more vibration output parties. The updated vibration invoking parameter belongs to a target format, and the target format may be at least one of a ". He" format and a ". Hec" format.
In another embodiment, if the file format of the vibration invoking parameter transferred by the vibration invoking party belongs to the target format, the vibration middleware may directly send the vibration invoking parameter to one or more vibration outputting parties. Specifically, the vibration middleware sends the vibration calling parameter belonging to the target format to the interface provided by each vibration output party and used for supporting the target format file, and the interfaces provided by each vibration output party and used for supporting the target format file may be the same or different.
Further, after receiving the vibration calling parameter belonging to the target format, the vibration output party may analyze the vibration calling parameter, and output the target vibration based on the analysis result. It is understood that each vibration output side needs to support (be able to parse) "he" format and ". Hec" format.
In the embodiment of the application, a parameter generation condition responding to target vibration is triggered, a vibration calling party generates vibration calling parameters corresponding to the target vibration according to a reference coding mode, the vibration calling party is provided with a vibration middleware, the vibration calling parameters are transmitted to the vibration middleware through a vibration parameter interface, so that the vibration calling parameters are sent to one or more vibration output parties through the vibration middleware, each vibration output party analyzes the vibration calling parameters, and the target vibration is output based on an analysis result. Therefore, the vibration calling party (such as the client) sends the vibration calling parameters to the vibration output party through the vibration middleware, so that the vibration calling interface of the vibration calling party can be unified, and the convenience of vibration calling is further improved. In addition, format conversion can be carried out on the vibration calling parameters through the vibration middleware, and the compatibility of the vibration calling parameters and the convenience of vibration calling are further improved.
Referring to fig. 3, fig. 3 is a flowchart of another vibration control method according to an embodiment of the present application, where the vibration control method may be executed by a computer device, and the computer device may be the terminal device shown in fig. 1. As shown in fig. 3, the vibration control method may include the following steps S301 to S304.
And S301, responding to the triggering of the parameter generation condition of the target vibration, and generating a vibration calling parameter corresponding to the target vibration by a vibration calling party according to a reference coding mode.
The specific implementation of step S301 may refer to the implementation of step S201 in fig. 2, and is not described herein again.
And S302, transmitting the vibration calling parameter to the vibration middleware through a vibration parameter interface.
For different vibration calling parties, vibration parameter interfaces for transmitting vibration calling parameters to the vibration middleware are the same (namely, the vibration parameter interfaces are uniform).
And S303, carrying out format conversion processing on the vibration calling parameter through the vibration middleware to obtain an updated vibration calling parameter.
In one embodiment, the file format of the vibration invocation parameter passed by the vibration caller does not belong to the target format, e.g., the file format of the vibration invocation parameter passed by the vibration caller does not belong to the ". He" format or the ". Hec" format. On one hand, the computer equipment converts the vibration calling parameters according to the parameter conversion rule corresponding to the target format through the vibration middleware; for example, assume that the vibration intensity in the vibration invoking parameter before conversion is indicated by a level, the vibration intensity is seven levels, and the parameter conversion rule corresponding to the target format is: and the vibration intensity under the target format is indicated by the percentage of the maximum vibration power of the vibration output party, the percentage of the conversion vibration intensity corresponding to the seven-level vibration intensity is 70%, and the vibration intensity in the converted vibration calling parameter is 70%. On the other hand, the computer equipment constructs a parameter conversion result according to a data organization form corresponding to the target format through the vibration middleware; for example, assuming that the pre-conversion vibration invocation parameter indicates invocation of two different motor output vibrations through two different sets of parameters, the post-conversion vibration invocation parameter may indicate invocation of two different motor output vibrations through priority.
The data organization of the ". He" format and the ". Hec" format is described in detail below:
(1) He "format: he "format data is organized in a lightweight data exchange format, such as" json format "; an example of a code in the ". He" format provided by the embodiment of the present application is as follows:
Figure 323066DEST_PATH_IMAGE001
Figure 102804DEST_PATH_IMAGE002
the values of the key-value pairs are only used as examples and do not constitute practical limitations of the present application, and the following describes each key-value pair in the above-mentioned codes in detail:
the shake call parameter in the "he" format is one object, and the internal first layer includes two pairs of key-value pairs of Metadata key-value pair (Metadata key is "Metadata") and mode key-value pair (mode key is "Pattern"). Specifically, a Metadata key-value pair (Metadata key is "Metadata") is used to indicate Metadata in a vibration call parameter, the Metadata can be understood as basic information of the vibration call parameter, a value of the Metadata key-value pair is a summary object, and the summary object includes at least one key-value pair of: a Version key value pair (Version key is "Version"), a creation time key value pair (creation time key is "Created"), and a Description information key value pair (Description information key is "Description"). The version key value pair is used for indicating a version number corresponding to the vibration calling parameter, and the data type of the value (value) of the version key value pair is integer (int); creating a time-key value pair for indicating a creation time of the vibration calling parameter, a data type of a value (value) of the creating time-key value pair being a String type; the descriptor key-value pair is used to describe the vibration effect of the vibration invocation parameter (i.e., the descriptor of the target vibration), and the data type of the value (value) of the descriptor key-value pair is a String type.
The mode key value pair (mode key is "Pattern") is used for indicating a vibration mode, the value of the mode key value pair is at least one array element, the value of each array element is an event object, and each event object is used for indicating a section of continuous vibration. Table 1 is a description of each key-value pair in an event object provided in an embodiment of the present application:
TABLE 1
Key Value data class Type/value Means of
Position int Reference point motor key for indicating invoked motor with priority lower than in reference point object And (4) value pairs.
Type continuous Or transient Vibration type continuos->Continuous vibration, transient->Briefly vibrate.
RelativeT ime int Relative start time, in ms.
Duration int Continuous vibration type parameter: duration, in ms.
AbsIntens ityFlag boolean Whether the intensity in the Parameters module is absolute intensity, false->The relative intensity (by default, the value of intensity is [0,100]]), true->Absolute intensity (intensity value)>=0)
AbsFreque ncyFlag boolean Whether the frequency in the Parameters module is absolute, false->The relative frequency (by default, the frequency value is [0,100]]), true->Absolute frequency (frequency value)>=0)
Parameter s Object Curves for describing a continuous complete oscillation of continuous type, or for describing a continuous complete oscillation of continuous type The frequency and intensity of each transient type of vibration.
As shown in Table 1, an event object includes at least one key-value pair of: a vibration site key value pair (vibration site key is "Position"), a vibration Type key value pair (vibration Type key is "Type"), a vibration time key value pair (vibration time key is "relatedtime"), a duration key value pair (duration key is "relatedtime"), an intensity flag key value pair (intensity flag key is "AbsIntensityFlag"), a frequency flag key value pair (frequency flag key is "AbsFrequencyFlag"), and a vibration description parameter key value pair (vibration description parameter key is "Parameters"); wherein, the vibration part key value pair is used for indicating a motor called when outputting the vibration indicated by the event object, and the data type of the value (value) of the vibration part key value pair is integer (int); the vibration type key-value pair is used to indicate the type of vibration indicated by the event object, and the value of the vibration type key-value pair may be: continuos (for indicating the vibration type as continuous vibration), transient (for indicating the vibration type as brief vibration (vibration time length is less than time length threshold)); the vibration time-key-value pair is used to indicate a start time of a vibration indicated by the event object, which in one implementation may be indicated by indicating a relative start time (e.g., relative to the current time), the data type of the value (value) of the vibration time-key-value pair being integer (int) in ms; the duration key value pair is used for indicating the duration of the vibration indicated by the event object, the duration key value pair belongs to a continuous vibration type (that is, when the value of the vibration type key value pair is continuous, the duration key value pair is included in the event object), and the data type of the value (value) of the duration key value pair is integer (int) with the unit of ms; the intensity-flag key-value pair is used for indicating the intensity indication mode of the vibration indicated by the event object, the data type of the value (value) of the intensity-flag key-value pair is boolean (boolean) type, the intensity indication mode may include a relative intensity indicating the intensity of the vibration by the relative intensity when the value of the intensity-flag key-value pair is a first set value (e.g., false) and an absolute intensity indicating the intensity of the vibration by the absolute intensity when the value of the intensity-flag key-value pair is a second set value (e.g., true); similarly, the frequency-flagging key-value pair is used to indicate a frequency indication manner of the vibration indicated by the event object, the data type of the value (value) of the frequency-flagging key-value pair is boolean (boolean), the frequency indication manner may include a relative frequency indicating that the vibration frequency is indicated by the relative frequency when the value of the frequency-flagging key-value pair is a first set value (e.g., false) and an absolute frequency indicating that the vibration frequency is indicated by the absolute frequency when the value of the frequency-flagging key-value pair is a second set value (e.g., true); the vibration description parameter key value pair is used for indicating an output mode of the vibration indicated by the event object.
In one embodiment, the vibration description parameter key-value pair is used in conjunction with a vibration type key-value pair, and when the vibration type indicated by the vibration type key-value pair is a first type (continuous vibration type), the event object indicates vibration through at least one reference point, and specifically, the computer device may indicate a vibration curve based on the at least one reference point, such that the vibration output side outputs vibration based on the vibration curve. It should be noted that the first reference point of the vibration curve is not necessarily a point with a vibration intensity of 0 (but the first reference point may be a point with a vibration intensity of 0), but is an initial vibration effect that the vibration output side needs to output; similarly, the last reference point of the vibration curve is not necessarily a point at which the vibration intensity is 0 (but the last reference point may be a point at which the vibration intensity is 0). When the number of the reference points is 1, it is indicated that the vibration output side outputs the vibration as instructed by the reference point, and stops the vibration within the time threshold. When the vibration type indicated by the vibration type key-value pair is a first type (continuous vibration type), the value of the vibration description parameter key-value pair (vibration description parameter key is "Parameters") contains a reference point number key-value pair (reference point number key is "CurvePoints") and N reference point array elements, the value of each reference point array element being one reference point object; the reference point number key-value pair is used for indicating the number of the reference points associated with the event object, N is matched with the number of the reference points associated with the event object, and the data type of the value (value) of the reference point number key-value pair is integer (int); the reference point object is used to indicate the vibration output parameter associated with the reference point, as detailed in table 2:
TABLE 2
key Value data type Means of
Time int Relative start time, shaping, in ms.
Intensity int Vibration intensity (whether the value is absolute or relative, depending on the outer switch "AbsIntensityFlag")
Frequency int Vibration frequency (whether the value is absolute or relative, depending on the outer switch "AbsFrequencyFlag")
Position int Which motor is used to vibrate, if any, will cover the value of the upper layer "Position
As shown in Table 2, the reference point object includes at least one key-value pair of: a reference point Time key value pair (reference point Time key is "Time"), a reference point Intensity key value pair (reference point Intensity key is "Intensity"), a reference point Frequency key value pair (reference point Frequency key is "Frequency"), a reference point motor key value pair (reference point motor key is "Position"); the reference point Time-key value pair is used to indicate the relative Time of the reference point in the vibration indicated by the event object, and the data type of the value (value) of the reference point Time-key value pair is integer (int), and the unit is ms, for example, assuming that the duration of the vibration indicated by the event object is 1000ms, when Time =100ms, it indicates that the reference point is the reference point corresponding to the 100 th ms in the vibration indicated by the event object; the reference point intensity key-value pair is used to indicate the vibration intensity corresponding to the reference point, the data type of the value (value) of the reference point intensity key-value pair is integer (int), specifically, the reference point intensity key-value pair is used in conjunction with the intensity flag key-value pair in the event object, when the intensity flag key-value pair indicates that the vibration intensity is indicated by the relative intensity, the value of the reference point intensity key-value pair is a percentage (range [0,100 ]) of the maximum vibration intensity with respect to the vibration output side, and when the intensity flag key-value pair indicates that the vibration intensity is indicated by the absolute intensity, the value of the reference point intensity key-value pair is a value of the vibration intensity (greater than or equal to 0); a reference point frequency key-value pair for indicating a vibration frequency corresponding to the reference point, a data type of a value (value) of the reference point frequency key-value pair being integer (int), specifically, the reference point frequency key-value pair being used in combination with the frequency index key-value pair in the event object, a value of the reference point frequency key-value pair being a percentage (range [0,100 ]) of a maximum vibration frequency with respect to a vibration output side when the frequency index key-value pair indicates that the vibration frequency is indicated by a relative frequency, and a value of the reference point frequency key-value pair being a value of the vibration frequency (greater than or equal to 0) when the frequency index key-value pair indicates that the vibration frequency is indicated by an absolute frequency; the reference point motor key-value pair is used for indicating a motor corresponding to the reference point, namely, a motor required to be called when the vibration output side outputs the vibration indicated by the reference point, the data type of the value (value) of the reference point motor key-value pair is integer (int), the priority of the reference point motor key-value pair is higher than that of the vibration part key-value pair in the event object, for example, when the value of the reference point motor key-value pair is 1 and the value of the vibration part key-value pair is 2, the vibration output side calls the motor with the identifier of 1 when outputting the vibration indicated by the reference point.
When the vibration type indicated by the vibration type key-value pair is of the second type (brief vibration type), the values of the vibration description parameter key-value pair include a vibration Intensity key-value pair (vibration Intensity key is "Intensity") and a vibration Frequency key-value pair (vibration Frequency key is "Frequency"); a vibration intensity key-value pair for indicating the intensity of vibration indicated by the target event object, the data type of the value (value) of the vibration intensity key-value pair being integer (int), and specifically, a vibration intensity key-value pair used in conjunction with the intensity flag key-value pair in the event object, the value of the vibration intensity key-value pair being a percentage (range [0,100 ]) of the maximum vibration intensity with respect to the vibration output side when the intensity flag key-value pair indicates that the vibration intensity is indicated by the relative intensity, and the value of the vibration intensity key-value pair being a value of the vibration intensity (0 or more) when the intensity flag key-value pair indicates that the vibration intensity is indicated by the absolute intensity; the vibration frequency key-value pair is used to indicate the frequency of vibration indicated by the target event object, the data type of the value (value) of the vibration frequency key-value pair is integer (int), and specifically, the vibration frequency key-value pair is used in conjunction with the frequency flag key-value pair in the event object, the value of the vibration frequency key-value pair is a percentage (range [0,100 ]) with respect to the maximum vibration frequency of the vibration output side when the frequency flag key-value pair indicates that the vibration frequency is indicated by a relative frequency, and the value of the vibration frequency key-value pair is a value (0 or more) of the vibration frequency when the frequency flag key-value pair indicates that the vibration frequency is indicated by an absolute frequency.
(2) Hec "format: the data organization form of the "hec" format can be a sequence of consecutive characters, the vibration invocation parameter of the "hec" format includes at least one of the following blocks: a Header information block (Header block), a motor information block ("Format block"), a Metadata block ("Metadata block"), a vibration timing block ("Pattern" block), a vibration Event block ("Event" block), a reference point block ("current" block), a vibration parameter block ("Parameters block"); the head information block is used for describing a vibration calling parameter; the motor information block is used for indicating the called motor; the metadata block is used for indicating the abstract of the vibration calling parameter; a vibration timing block for indicating a sequence of at least one vibration event; the vibration event block is used for indicating the associated parameters of the vibration event; the reference point block is used for indicating a vibration output parameter related to the reference point; the vibration parameter block is used for indicating description information corresponding to different vibration types; the storage area corresponding to each block is different, each storage area comprises one or more storage spaces, and each storage space corresponds to a preset offset address. The following is a detailed description of each block:
a) The meaning of the storage area corresponding to the Header information block (Header block) is shown in table 3:
TABLE 3
Offset of Address Byte(s) Number of Data of Type (B) Name of field Description of field
00H 4 char Document identification Capital string "THEC" indicating that the file is an HE effect encoded in a preset encoding format Fruit file
04H 4 int File data Length of The total number of bytes from the next field start address to the end of the file. Number of the field The value plus 8 is the actual length of the current file.
As shown in table 3, the header information block carries a value in at least one of the following storage spaces: a value in a file identification storage space (offset address 00H), a value in a file data length storage space (offset address 04H); the value in the file identification storage space is used for indicating a file identification (such as 'THEC') of the vibration calling parameter, so that the vibration output party determines the encoding format of the vibration calling parameter according to the value in the file identification storage space, the number of bytes in the file identification storage space is 4, and the data type is a character type (char); and the value in the file data length storage space is used for indicating the file data length of the vibration calling parameter, the byte number of the file data length storage space is 4, and the data type is integer (int).
B) The meaning of the storage area corresponding to the motor information block ("Format block") is shown in table 4:
TABLE 4
Offset ground Address Byte(s) Number of Data class Model (III) Name of field Description of field
00H 4 char Format Block Name Lowercase string with content fixed to 'fmt'
04H 4 int Format Block length The length is not fixed, starting from the first address of the next field to the Format block Total number of bytes ended
08H 2 short Supported platform 0 is mobile phone equipment, 1 is handle equipment, and defaults to 0
10H 2 short HE format version number V1 version has no multi-motor support, V2 version supports multi-motor, and default is 1
12H 2 short Number of support motors When the HE is designed, the number of the used motors is 1 by default
As shown in table 4, the motor information block carries the following values in at least one of the storage spaces: a value in a motor information block identification storage space (offset address 00H), a value in a motor information block data length storage space (offset address 04H), a value in a vibration output side identification storage space (offset address 08H), a value in a motor version number storage space (offset address 10H), a value in a motor number storage space (offset address 12H); wherein, the value in the motor information block identification storage space is used for indicating the identification of the motor information block, the number of bytes in the motor information block identification storage space is 4, and the data type is character type (char); the value in the motor information block data length storage space is used for indicating the data length of the motor information block, the number of bytes in the motor information block data length storage space is 4, and the data type is integer (int); the value in the vibration output party identification storage space is used for indicating the identification of the vibration output party, that is, the value in the vibration output party identification storage space is used for indicating the vibration output party capable of analyzing (supporting) the vibration calling parameter, the byte number of the vibration output party identification storage space is 2, and the data type is short integer (short), in one embodiment, when the value in the vibration output party identification storage space is a first set value (such as 0), the vibration output party is represented as a mobile phone device, and when the value in the vibration output party identification storage space is a second set value (such as 1), the vibration output party is represented as a handle device; the value in the motor version number storage space is used for indicating whether the output target vibration needs to call a plurality of motors, the number of bytes in the motor version number storage space is 2, the data type is short, in one embodiment, when the value in the motor version number storage space is a first set value (such as V1), it indicates that the output target vibration does not need to call a plurality of (at least two) motors, and when the value in the motor version number storage space is a second set value (such as V2), it indicates that the output target vibration needs to call a plurality of (at least two) motors; the value in the motor number storage space is used to indicate that the output target vibration is the number of motors that need to be called, the number of bytes in the motor number storage space is 2, and the data type is short, it being understood that the value in the motor number storage space is 1 when the value in the motor version number storage space is a first set value (e.g., V1), and the value in the motor number storage space is an integer greater than 1 when the value in the motor version number storage space is a second set value (e.g., V2).
C) The meaning of the storage area corresponding to a Metadata block ("Metadata block") is shown in table 5:
TABLE 5
Offset of Address Byte(s) Number of Data of Type (B) Name of field Description of the field
00H 4 char Metadata Block Name Lowercase string with content fixed to 'meta'
04H 4 int Metadata block Length of Total number of bytes from the start of the next field header address to the end of the Metadata block
06H 2 short HE content format Version number Value corresponding to Version field in HE
08H 8 long HE content initialization Creation time Converting the value of the Created field in the HE into the value of the Unix timestamp
16H Indefinite (x) char HE content description Corresponding to the value of the Description field in the HE, the content is encoded by UTF-8; long and long Degree is (Metadata Length-2-8)
As shown in table 5, a metadata block carries a value in at least one of the following storage spaces: a value in a metadata block identification storage space (offset address 00H), a value in a storage space of a metadata block data length (offset address 04H), a value in a shake call parameter version number storage space (offset address 06H), a value in a shake call parameter creation time storage space (offset address 08H), a value in a shake call parameter description information storage space (offset address 16H); wherein, the value in the metadata block identification storage space is used for indicating the identification of the metadata block, the byte number of the metadata block identification storage space is 4, and the data type is character type (char); the value in the storage space of the data length of the metadata block is used for indicating the data length of the metadata block, the number of bytes in the storage space of the data length of the metadata block is 4, and the data type is integer (int); the value in the vibration calling parameter Version number storage space is used for indicating the Version number of the vibration calling parameter, the value in the vibration calling parameter Version number storage space corresponds to the value (value) of a Version key value pair (the key is Version) in the vibration calling parameter in the format of 'he', the number of bytes in the vibration calling parameter Version number storage space is 2, and the data type is short integer (short); the value in the vibration calling parameter creation time storage space is used for indicating the creation time of the vibration calling parameter, the value in the vibration calling parameter creation time storage space corresponds to the value (value) of a creation time key value pair (key is Created) in the vibration calling parameter in the 'he' format, the number of bytes in the vibration calling parameter creation time storage space is 8, and the data type is long integer (long); the value in the vibration calling parameter Description information storage space is used for indicating Description information of the vibration calling parameter, the value in the vibration calling parameter Description information storage space corresponds to the value (value) of a Description information key value pair (key is Description) in the vibration calling parameter of the 'he' format, the number of bytes in the vibration calling parameter Description information storage space is not fixed, and the data type is character type (char).
D) The meaning of the storage area corresponding to the vibration sequence block ("Pattern" block) is shown in table 6:
TABLE 6
Offset ground Address Byte(s) Number of Data class Model (III) Name of field Description of field
00H 4 char Pattern Block Name Lowercase character string with content fixed to 'pat'
04H 4 int Pattern block length The total number of bytes from the beginning of the next field header address to the end of the Pattern block
As shown in table 6, the vibration sequence block carries the following values in at least one of the memory spaces: the vibration sequence block identifies a value in a storage space (offset address 00H), and the vibration sequence block data length storage space (offset address 04H); wherein, the value in the vibration time sequence block identification storage space is used for indicating the identification of the vibration time sequence block, the byte number of the vibration time sequence block identification storage space is 4, and the data type is character type (char); the value in the vibration time series block data length storage space is used to indicate the data length of the vibration time series block, the number of bytes in the vibration time series block data length storage space is 4, and the data type is integer (int).
In one implementation, the computer device specifies the timing of each vibration event block by a number of the vibration event block.
E) The meaning of the storage area corresponding to the vibration Event block ("Event" block) is shown in table 7:
TABLE 7
Offset address Number of bytes Data type Name of field Description of field
00H 3 char Event block identification Lowercase string with content fixed to 'evt'
03H 1 short Event type 0 represents brief vibration transition, and 1 represents continuous vibration continuous
04H 2 short EventID Event number, starting from 1
06H 2 short Vibration motor numbering The vibration motor number designated by this Event starts from 1
08H 4 int Event relative time Workshop Relative time of onset of vibration event
12H 4 int Duration of vibration Duration of vibration
16H 2 short Vibration intensity flag Whether absolute intensity
18H 2 short Vibration frequency flag Whether absolute frequency
As shown in table 7, the vibration event block carries a value in at least one of the following storage spaces: a value in a vibration event block identification storage space (offset address 00H), a value in a vibration event type storage space (offset address 03H), a value in a vibration event block number storage space (offset address 04H), a value in a motor identification storage space (offset address 06H), a value in a vibration event start time storage space (offset address 08H), a value in a vibration event duration storage space (offset address 12H), a value in a vibration intensity flag storage space (offset address 16H), a value in a vibration frequency flag storage space (offset address 18H); wherein, the value in the vibration event block identification storage space is used for indicating the identification of the vibration event block, the number of bytes in the vibration event block identification storage space is 3, and the data type is character type (char); in one implementation, when the value in the vibration event type storage space is a first set value (e.g., 0), the vibration type of the vibration corresponding to the vibration event block is a short vibration type, and when the value in the vibration event type storage space is a second set value (e.g., 1), the vibration type of the vibration corresponding to the vibration event block is a continuous vibration type, the number of bytes in the vibration event type storage space is 1, and the data type is a short integer (short); the value in the vibration event block number storage space is used to indicate the number of the vibration event block, in one implementation, the start number of the vibration event block is 1, the number of bytes in the vibration event block number storage space is 2, and the data type is short integer (short); in one implementation, the starting number of the motor is 1, the number of bytes in the motor identification storage space is 2, and the data type is short integer (short); the value in the vibration event starting time storage space is used for indicating the starting time of vibration corresponding to the vibration event block, the byte number of the vibration event starting time storage space is 4, and the data type is integer (int); the value in the vibration event duration storage space is used for indicating the duration of vibration corresponding to the vibration event block, the number of bytes in the vibration event duration storage space is 4, and the data type is integer (int); the value in the storage space of the vibration strength mark is used for indicating the vibration strength indication mode of the vibration corresponding to the vibration event block, the byte number of the storage space of the vibration strength mark is 2, and the data type is short integer (short); the value in the vibration frequency flag storage space is used for indicating the vibration frequency indication mode of the vibration corresponding to the vibration event block, the number of bytes in the vibration frequency flag storage space is 2, and the data type is short integer (short).
When the vibration type of the vibration corresponding to the vibration event block is a first type (continuous vibration type), the vibration event block is associated with at least one reference point block, and the storage area corresponding to each reference point block is different. In one embodiment, the computer device specifies the position sequence of the reference points corresponding to each reference point block in the vibration curve by the serial numbers of the reference point blocks.
F) The meaning of the storage area corresponding to the reference point block ("Curve" block) is shown in table 8:
TABLE 8
Offset ground Address Number of bytes Data class Model (III) Name of field Word of sayingMing dynasty
00H 5 char Curve Block Mark Sign board Lower case character string, content fixed as 'curve'
05H 1 short PointID First point, value 1
06H 2 short Motor numbering The motor number is 1, and if 0, the motor number specified in Event is used Number (C)
08H 4 int Of Point points Relative time Relative time of Point
12H 2 short Intensity of vibration The vibration intensity, if relative, is the percentage reduction of Event intensity Ratios such as 70, corresponding to 0.7 in the HE json description; if absolute, this is Directly represents the vibration intensity value
14H 2 short Frequency of vibration If the vibration frequency is relative, the value is increased or decreased to the Event frequency; if it is absolutely In contrast, the vibration frequency value is directly expressed here
As shown in table 8, the reference point block carries a value in at least one of the following storage spaces: a value in a reference point block identification storage space (offset address 00H), a value in a reference point block number storage space (offset address 05H), a value in a motor number storage space (offset address 06H), a value in a reference point start time storage space (offset address 08H), a value in a reference point vibration intensity storage space (offset address 12H), a value in a reference point vibration frequency storage space (offset address 14H); wherein, the value in the reference point block mark storage space is used for indicating the mark of the reference point block, the byte number of the reference point block mark storage space is 5, and the data type is character type (char); the value in the reference point block sequence number storage space is used for indicating the sequence number of the reference point block, the sequence number of the reference point block is used for indicating the position sequence of the reference point corresponding to each reference point block in the vibration curve, the number of bytes in the reference point block sequence number storage space is 1, and the data type is short integer (short); in one implementation, the computer device indicates the motor required to be called for outputting the vibration corresponding to the reference point block by indicating the number of the motor, the starting number of the motor is 1, when the value in the motor number storage space is 0, the motor required to be called for indicating the vibration corresponding to the reference point block is the same as the motor indicated in the vibration event block associated with the reference point block, the number of bytes in the motor number storage space is 2, and the data type is short integer (short); the value in the reference point initial time storage space is used for indicating the initial time of the vibration corresponding to the reference point block, the number of bytes in the reference point initial time storage space is 4, and the data type is integer (int); in one implementation, if a value in a vibration intensity flag storage space in a vibration event block associated with the reference point block is a first set value (e.g., false), the value in the reference point vibration intensity storage space is a reduction percentage of vibration intensity of vibration corresponding to the vibration event block, and if the value in the vibration intensity flag storage space in the vibration event block associated with the reference point block is a second set value (e.g., true), the value in the reference point vibration intensity storage space is a vibration intensity numerical value, the number of bytes in the reference point vibration intensity storage space is 2, and the data type is a short integer (short); in one implementation, if the value in the vibration frequency flag storage space of the vibration event block associated with the reference point block is a first set value (e.g., false), the value in the vibration frequency flag storage space of the reference point block is an increase or decrease of the vibration frequency of the vibration corresponding to the vibration event block, and if the value in the vibration frequency flag storage space of the vibration event block associated with the reference point block is a second set value (e.g., tune), the value in the vibration frequency storage space of the reference point block is a vibration frequency value, the number of bytes in the vibration frequency storage space of the reference point block is 2, and the data type is a short integer (short).
In an embodiment, when the vibration event block is associated with a plurality of (at least two) reference point blocks, a starting offset address (an offset address corresponding to the reference point block number storage space) of a second reference point block is located after an offset address corresponding to the first reference point block reference point vibration frequency storage space, for example, the offset address corresponding to the reference point vibration frequency storage space in the first reference point block is 14H, the offset address corresponding to the reference point block number storage space in the second reference point block is 16H, and it should be noted that reference point block identification storage spaces may not be included in other reference point blocks except the first reference point block.
G) When the vibration type of the vibration corresponding to the vibration event block is a first type (continuous vibration type), the vibration event block is further associated with a first vibration parameter block ("Parameters block"), and the meaning of the storage area corresponding to the first vibration parameter block is shown in table 9:
TABLE 9
Offset address Number of bytes Data type Name of field Description of field
00H 5 char Parameters block identification Lowercase string with content fixed to 'param'
05H 4 int Number of Curve midpoints Number of Curve midpoints, curvepoints>=1
As shown in table 9, the first vibration parameter block carries values in at least one of the following storage spaces: the vibration parameter block identifies the value in the storage space (offset address 00H), the value in the reference point number storage space (offset address 05H); wherein, the value in the vibration parameter block identification storage space is used for indicating the identification of the first vibration parameter block, the byte number of the vibration parameter block identification storage space is 5, and the data type is character type (char); the value in the reference point number storage space is used for indicating the number of the reference point blocks associated with the vibration event block, the value in the reference point number storage space is a positive integer, the number of bytes in the reference point number storage space is 4, and the data type is integer (int).
When the vibration type of the vibration corresponding to the vibration event block is the second type (brief vibration type), the vibration event block is associated with a second vibration parameter block ("Parameters block"), and the meaning of the storage area corresponding to the second vibration parameter block is shown in table 10:
watch 10
Offset of Address Byte(s) Number of Data class Model (II) Name of field Description of the field
00H 5 char Paramete rs block identification Lowercase string with content fixed to 'param'
05H 2 short Intensity of vibration The vibration intensity, if relative, is a percentage reduction of the Event intensity, such as 70, corresponding to 0.7 in the description of HE json; if absolute, it is here directly indicative of vibration Intensity value
07H 2 short Frequency of vibration If the vibration frequency is relative, the value is increased or decreased to the Event frequency; if absolute, this is true Directly representing the value of vibration frequency
As shown in table 10, the second vibration parameter block carries values in at least one of the following storage spaces: the vibration parameter block identifies a value in a storage space (offset address 00H), a value in an event vibration intensity storage space (offset address 05H), and a value in an event vibration frequency storage space (offset address 07H); wherein, the value in the vibration parameter block identification storage space is used for indicating the identification of the second vibration parameter block, the byte number of the vibration parameter block identification storage space is 5, and the data type is character type (char); in one implementation, if the value in the vibration intensity flag storage space of the vibration event block associated with the second vibration parameter block is a first set value (e.g., false), the value in the event vibration intensity storage space is a percentage reduction of the vibration intensity of the vibration corresponding to the vibration event block, and if the value in the vibration intensity flag storage space of the vibration event block associated with the second vibration parameter block is a second set value (e.g., true), the value in the event vibration intensity storage space is a vibration intensity value, the number of bytes in the event vibration intensity storage space is 2, and the data type is a short integer (short); in one implementation, if the value in the vibration frequency flag storage space of the vibration event block associated with the second vibration parameter block is a first set value (e.g., false), the value in the event vibration frequency storage space is an increase or decrease of the vibration frequency of the vibration corresponding to the vibration event block, and if the value in the vibration frequency flag storage space of the vibration event block associated with the second vibration parameter block is a second set value (e.g., tune), the value in the event vibration frequency storage space is a vibration frequency value, the number of bytes in the event vibration frequency storage space is 2, and the data type is a short integer (short).
And S304, transmitting the vibration calling parameters to one or more vibration output parties through the vibration middleware.
The interfaces of the vibration output parties for receiving the vibration calling parameters can be the same or different, and when the interfaces of the vibration output parties for receiving the vibration calling parameters are different, the vibration middleware sends the vibration calling parameters to the interfaces of the vibration output parties for receiving the vibration calling parameters respectively. Fig. 4 is a schematic diagram illustrating sending of a vibration calling parameter provided in an embodiment of the present application, where as shown in fig. 4, a vibration calling party transmits the vibration calling parameter to a vibration middleware through a unified interface, and the vibration middleware sends the vibration calling parameter to interfaces of vibration output parties for receiving the vibration calling parameter after obtaining the vibration calling parameter belonging to a target format.
In the embodiment of the application, in response to the triggering of the parameter generation condition of the target vibration, the vibration calling party generates the vibration calling parameter corresponding to the target vibration according to a reference coding mode, the vibration calling party is provided with the vibration middleware, the vibration calling parameter is transmitted to the vibration middleware through the vibration parameter interface, the vibration calling parameter is sent to one or more vibration output parties through the vibration middleware, each vibration output party analyzes the vibration calling parameter, and the target vibration is output based on the analysis result. Therefore, the vibration calling party (such as the client) sends the vibration calling parameters to the vibration output party through the vibration middleware, so that the vibration calling interface of the vibration calling party can be unified, and the convenience of vibration calling is further improved. In addition, format conversion can be carried out on the vibration calling parameters through the vibration middleware, and the compatibility of the vibration calling parameters and the convenience of vibration calling are further improved; the vibration calling parameters in the he and hec formats can accurately indicate the transformed vibration by indicating a reference point in a vibration curve, the meanings of all fields (key value pairs) in the vibration calling parameters are uniformly defined, the format of information transmission when the vibration middleware interacts with the interfaces of different vibration output parties is unified, and a commonly-known solution is provided for the definition of the vibration effect.
While the method of the embodiments of the present application has been described in detail above, to facilitate better implementation of the above-described aspects of the embodiments of the present application, the apparatus of the embodiments of the present application is provided below accordingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a vibration control apparatus according to an embodiment of the present disclosure, and the vibration control apparatus shown in fig. 5 may be used to perform part or all of the functions in the method embodiments described in fig. 2 and fig. 3. Referring to fig. 5, the vibration control apparatus includes:
the processing unit 501 is configured to generate a vibration calling parameter corresponding to target vibration according to a reference coding mode in response to a parameter generation condition of the target vibration being triggered, where the vibration calling party is loaded with a vibration middleware;
a sending unit 502, configured to transmit the vibration calling parameter to the vibration middleware through the vibration parameter interface, so as to send the vibration calling parameter to one or more vibration output parties through the vibration middleware, and enable each vibration output party to analyze the vibration calling parameter, and output the target vibration based on the analysis result.
In an embodiment, if the file format of the vibration invocation parameter does not belong to the target format, the processing unit 501 is further configured to:
carrying out format conversion processing on the vibration calling parameter through the vibration middleware to obtain an updated vibration calling parameter;
and the file format of the updated vibration calling parameter belongs to the target format.
In an embodiment, the processing unit 501 is configured to perform format conversion processing on the vibration invoking parameter through the vibration middleware to obtain an updated vibration invoking parameter, and specifically configured to:
converting the vibration calling parameter according to a parameter conversion rule corresponding to the target format through the vibration middleware; and;
and constructing a parameter conversion result through the vibration middleware according to a data organization form corresponding to the target format to obtain an updated vibration calling parameter.
In one embodiment, the target format includes at least one of a first format and a second format, the second format being a compressed representation of the first format.
In one embodiment, the file format of the vibration invoking parameter belongs to a first format, the vibration invoking parameter comprises a metadata key-value pair and a mode key-value pair, and the metadata key-value pair is used for indicating metadata in the vibration invoking parameter; the mode key value pair is used to indicate a vibration mode.
In one embodiment, the value of the metadata key-value pair is used to indicate a summary object that includes at least one key-value pair of: the method comprises the steps of version key value pairs, creation time key value pairs and description information key value pairs;
the version key value pair is used for indicating a version number corresponding to the vibration calling parameter; the creation time key value pair is used for indicating the creation time of the vibration calling parameter; the description information key value pair is used for describing the vibration effect of the vibration calling parameter.
In one embodiment, the value of the schema key-value pair is at least one array element, the value of each array element being an event object; the target event object includes at least one key-value pair of: vibration part key value pair, vibration time key value pair, duration key value pair, intensity mark key value pair and frequency mark key value pair; the target event object is the value of a target array element, and the target array element is any one of at least one array element;
the vibration part key value pair is used for indicating a motor called when outputting the vibration indicated by the target event object; the vibration time key value pair is used for indicating the starting time of the vibration indicated by the target event object; the duration key value pair is used for indicating the duration of the vibration indicated by the target event object; the intensity mark key value pair is used for indicating the intensity indicating mode of the vibration indicated by the target event object; the frequency token key value pair is used to indicate the frequency indication mode of the vibration indicated by the target event object.
In one embodiment, the target event object includes an intensity flag key-value pair and a frequency flag key-value pair, and the target event object further includes a vibration type key-value pair and a vibration description parameter key-value pair; the vibration type key value pair is used for indicating the type of vibration indicated by the target event object, and the vibration description parameter key value pair is used for indicating the output mode of the vibration indicated by the target event object;
when the vibration type indicated by the vibration type key value pair is a first type, the target event object indicates target vibration through at least one reference point, the value of the vibration description parameter key value pair comprises a reference point number key value pair and N reference point array elements, and the value of each reference point array element is a reference point object; the reference point number key value pair is used for indicating the number of reference points associated with the target event object, and N is matched with the number of the reference points associated with the target event object; the target reference point object is used for indicating a vibration output parameter associated with a target reference point, the target reference object is a value of a target reference point array element, and the target reference point array element is any one of the N reference point array elements;
when the vibration type indicated by the vibration type key value pair is of a second type, the value of the vibration description parameter key value pair comprises a vibration intensity key value pair and a vibration frequency key value pair; the vibration strength key value pair is used for indicating the strength of the vibration indicated by the target event object, and the vibration frequency key value pair is used for indicating the frequency of the vibration indicated by the target event object.
In one embodiment, the target reference point object includes at least one key-value pair of: a reference point time key-value pair, a reference point intensity key-value pair, a reference point frequency key-value pair, a reference point motor key-value pair;
wherein the reference point time key value pair is used for indicating the relative time of the target reference point in the vibration indicated by the target event object; the reference point intensity key value pair is used for indicating the vibration intensity corresponding to the target reference point; the reference point frequency key value pair is used for indicating the vibration frequency corresponding to the target reference point; the reference point motor key-value pair is used for indicating a motor corresponding to the reference point, and the priority of the reference point motor key-value pair is higher than that of the vibration part key-value pair.
In one embodiment, the file format of the vibration invocation parameter belongs to the second format, and the vibration invocation parameter includes at least one of the following blocks: a head information block, a motor information block, a metadata block, a vibration timing sequence block, a vibration event block, a reference point block and a vibration parameter block;
the head information block is used for describing a vibration calling parameter; the motor information block is used for indicating the called motor; the metadata block is used for indicating the abstract of the vibration calling parameter; the vibration timing block is used for indicating the sequence of at least one vibration event; the vibration event block is used for indicating the associated parameters of the vibration event; the reference point block is used for indicating a vibration output parameter related to a reference point; the vibration parameter block is used for indicating description information corresponding to different vibration types; the storage area corresponding to each block is different, each storage area comprises one or more storage spaces, and each storage space corresponds to a preset offset address.
In one embodiment, the header information block carries a value in at least one of the following storage spaces: the value in the file identification storage space and the value in the file data length storage space;
the value in the file identification storage space is used for indicating the file identification of the vibration calling parameter; the value in the file data length storage space is used to indicate the file data length of the vibration invocation parameter.
In one embodiment, the motor information block carries a value in at least one of the following storage spaces: a value in a motor information block identification storage space, a value in a motor information block data length storage space, a value in a vibration output side identification storage space, a value in a motor version number storage space, a value in a motor number storage space;
wherein the value in the motor information block identification storage space is used to indicate the identification of the motor information block; a value in the motor information block data length storage space is used to indicate a data length of the motor information block; the value in the vibration output party identification storage space is used for indicating the identification of the vibration output party; the value in the motor version number storage space is used for indicating whether the output target vibration needs to call a plurality of motors or not; the value in the motor number storage space is used to indicate that the output target vibration is the number of motors that need to be called up.
In one embodiment, the metadata block carries a value in at least one of the following storage spaces: the method comprises the steps that a metadata block identifies a value in a storage space, a value in a storage space of the data length of the metadata block, a value in a vibration calling parameter version number storage space, a value in a vibration calling parameter creation time storage space and a value in a vibration calling parameter description information storage space;
wherein the value in the metadata block identification storage space is used for indicating the identification of the metadata block; a value in a storage space of the metadata block data length is used to indicate the data length of the metadata block; the value in the vibration calling parameter version number storage space is used for indicating the version number of the vibration calling parameter; the value in the vibration calling parameter creation time storage space is used for indicating the creation time of the vibration calling parameter; the value in the vibration invocation parameter description information storage space is used for indicating the description information of the vibration invocation parameter.
In one embodiment, the vibration sequence block carries values in at least one of the following memory spaces: the vibration time sequence block identifies values in the storage space, and the vibration time sequence block data length stores values in the storage space;
wherein the value in the vibration timing block identification storage space is used to indicate the identification of the vibration timing block; the value in the vibration timing block data length storage space is used to indicate the data length of the vibration timing block.
In one embodiment, the vibration time sequence block is associated with at least one vibration event block, and the corresponding storage area of each vibration event block is different; each vibration event block carries a value in at least one of the following storage spaces: a value in a vibration event block identification storage space, a value in a vibration event type storage space, a value in a vibration event block number storage space, a value in a motor identification storage space, a value in a vibration event start time storage space, a value in a vibration event duration storage space, a value in a vibration intensity flag storage space, a value in a vibration frequency flag storage space;
wherein the value in the vibration event block identification storage space is used to indicate the identification of the vibration event block; the value in the vibration event type storage space is used for indicating the vibration type of the vibration corresponding to the vibration event block; the value in the vibration event block number storage space is used for indicating the number of the vibration event block; the value in the motor identification storage space is used for indicating a motor which needs to be called for outputting the vibration corresponding to the vibration event block; the value in the vibration event starting time storage space is used for indicating the starting time of the vibration corresponding to the vibration event block; the value in the vibration event duration storage space is used for indicating the duration of the vibration corresponding to the vibration event block; the value in the vibration intensity mark storage space is used for indicating the vibration intensity indicating mode of the vibration corresponding to the vibration event block; the value in the vibration frequency flag storage space is used for indicating the vibration frequency indication mode of the vibration corresponding to the vibration event block.
In one embodiment, when the vibration type of the vibration corresponding to the vibration event block is a first type, the vibration event block is associated with at least one reference point block, the storage area corresponding to each reference point block is different, and each reference point block carries the following values in at least one storage space: a value in the reference point block identification storage space, a value in the reference point block serial number storage space, a value in the motor number storage space, a value in the reference point start time storage space, a value in the reference point vibration intensity storage space, and a value in the reference point vibration frequency storage space;
wherein the value in the reference point block identification storage space is used to indicate the identification of the reference point block; the value in the reference point block sequence number storage space is used for indicating the sequence number of the reference point block; the value in the motor number storage space is used for indicating a motor which needs to be called for outputting the vibration corresponding to the reference point block; the value in the reference point starting time storage space is used for indicating the starting time of the vibration corresponding to the reference point block; the value in the reference point vibration intensity storage space is used for indicating the vibration intensity of the vibration corresponding to the reference point block; the value in the reference point vibration frequency storage space is used to indicate the vibration frequency of the vibration corresponding to the reference point block.
In one embodiment, the vibration event block is further associated with a first vibration parameter block carrying values in at least one of the following storage spaces: the vibration parameter block identifies values in the storage space, reference point quantity storage space;
wherein the value in the vibration parameter block identification storage space is used to indicate the identification of the first vibration parameter block; the value in the reference point number storage space is used to indicate the number of reference point blocks with which the vibration event block is associated.
In one embodiment, when the vibration type of the vibration event corresponding to the vibration event block is a second type, the vibration event block is associated with a second vibration parameter block; the second vibration parameter block carries values in at least one of the following storage spaces: the vibration parameter block identifies values in a storage space, values in an event vibration intensity storage space, and values in an event vibration frequency storage space;
wherein the value in the vibration parameter block identification storage space is used to indicate the identification of the second vibration parameter block; the value in the event vibration intensity storage space is used for indicating the vibration intensity of the vibration corresponding to the vibration event block; the value in the event vibration frequency storage space is used to indicate the vibration frequency of the vibration to which the vibration event block corresponds.
According to an embodiment of the present application, some steps involved in the vibration control methods shown in fig. 2 and 3 may be performed by respective units in the vibration control apparatus shown in fig. 5. For example, step S201 shown in fig. 2 may be performed by the processing unit 501 shown in fig. 5, and step S202 may be performed by the transmitting unit 502 shown in fig. 5; steps S301 and S303 shown in fig. 3 may be executed by the processing unit 501 shown in fig. 5, and steps S302 and S304 may be executed by the transmitting unit 502 shown in fig. 5. The respective units in the vibration control device shown in fig. 5 may be combined into one or several other units, respectively or all of them, or some unit(s) of them may be further split into multiple functionally smaller units, which may achieve the same operation without affecting the achievement of the technical effect of the embodiments of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the vibration control device may also include other units, and in practical applications, these functions may also be implemented by the assistance of other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present application, the vibration control apparatus as shown in fig. 5 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the respective methods as shown in fig. 2 and 3 on a general-purpose computing apparatus such as 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, and the vibration control method of the embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded and executed in the above-described computing apparatus via the computer-readable recording medium.
Based on the same inventive concept, the principle and the beneficial effect of the problem solving of the vibration control device provided in the embodiment of the present application are similar to the principle and the beneficial effect of the problem solving of the vibration control method in the embodiment of the present application, and for the sake of brevity, the principle and the beneficial effect of the implementation of the method can be referred to, and are not described herein again.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure, where the computer device may be a terminal device or a server. As shown in fig. 6, the computer device includes at least a processor 601, a communication interface 602, and a memory 603. The processor 601, the communication interface 602, and the memory 603 may be connected by a bus or other means. The processor 601 (or Central Processing Unit (CPU)) is a computing core and a control core of the computer device, and can analyze various instructions in the computer device and process various data of the computer device, for example: the CPU can be used for analyzing the on-off instruction sent by the object to the computer equipment and controlling the computer equipment to carry out on-off operation; the following steps are repeated: the CPU may transmit various types of interactive data between the internal structures of the computer device, and so on. The communication interface 602 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI, mobile communication interface, etc.), and may be controlled by the processor 601 to transmit and receive data; the communication interface 602 may also be used for the transmission and interaction of data within the computer device. The Memory 603 (Memory) is a Memory device in the computer device for storing programs and data. It is understood that the memory 603 herein may comprise a built-in memory of the computer device, and may of course comprise an expansion memory supported by the computer device. The memory 603 provides storage space that stores the operating system of the computer device, which may include, but is not limited to: an Android System, an Internet Operating System (IOS), and the like, which are not limited in this application.
Embodiments of the present application also provide a computer-readable storage medium (Memory), which is a Memory device in a computer device and is used for storing programs and data. It is understood that the computer readable storage medium herein can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer readable storage medium provides a memory space that stores a processing system of the computer device. Also stored in this memory space is a computer program adapted to be loaded and executed by the processor 601. It should be noted that the computer-readable storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; optionally, at least one computer readable storage medium located remotely from the aforementioned processor is also possible.
In one embodiment, the processor 601, by executing the computer program in the memory 603, performs the following operations:
responding to the triggering of a parameter generation condition of the target vibration, generating a vibration calling parameter corresponding to the target vibration by a vibration calling party according to a reference coding mode, wherein the vibration calling party is provided with a vibration middleware;
the vibration parameter calling parameters are transmitted to the vibration middleware through the vibration parameter interface, so that the vibration parameter calling parameters are sent to one or more vibration output sides through the vibration middleware, each vibration output side analyzes the vibration parameter calling parameters, and target vibration is output based on the analysis result.
As an alternative embodiment, if the file format of the parameter for vibration invocation does not belong to the target format, the processor 601, by running the computer program in the memory 603, further performs the following operations:
carrying out format conversion processing on the vibration calling parameter through the vibration middleware to obtain an updated vibration calling parameter;
and the file format of the updated vibration calling parameter belongs to the target format.
As an optional embodiment, the processor 601 performs format conversion processing on the vibration invoking parameter through the vibration middleware, and a specific embodiment of obtaining the updated vibration invoking parameter is as follows:
converting the vibration calling parameters according to parameter conversion rules corresponding to the target format through the vibration middleware; and;
and constructing a parameter conversion result through the vibration middleware according to a data organization form corresponding to the target format to obtain an updated vibration calling parameter.
As an alternative embodiment, the target format comprises at least one of a first format and a second format, the second format being a compressed representation of the first format.
As an optional embodiment, the file format of the vibration invocation parameter belongs to a first format, and the vibration invocation parameter includes a metadata key-value pair and a mode key-value pair, and the metadata key-value pair is used for indicating metadata in the vibration invocation parameter; the mode key value pair is used to indicate a vibration mode.
As an alternative embodiment, the value of the metadata key-value pair is used to indicate a digest object, which includes at least one key-value pair of: version key value pairs, creation time key value pairs and description information key value pairs;
the version key value pair is used for indicating a version number corresponding to the vibration calling parameter; the creation time key value pair is used for indicating the creation time of the vibration calling parameter; the description information key value pair is used for describing the vibration effect of the vibration calling parameter.
As an alternative embodiment, the value of the mode key-value pair is at least one array element, and the value of each array element is an event object; the target event object includes at least one key-value pair of: vibration part key value pair, vibration time key value pair, duration key value pair, intensity mark key value pair and frequency mark key value pair; the target event object is the value of a target array element, and the target array element is any one of at least one array element;
the vibration part key value pair is used for indicating a motor called when outputting the vibration indicated by the target event object; the vibration time key value pair is used for indicating the starting time of the vibration indicated by the target event object; the duration key value pair is used for indicating the duration of the vibration indicated by the target event object; the intensity mark key value pair is used for indicating the intensity indicating mode of the vibration indicated by the target event object; the frequency token key value pair is used to indicate the frequency indication mode of the vibration indicated by the target event object.
As an alternative embodiment, the target event object includes an intensity flag key-value pair and a frequency flag key-value pair, and the target event object further includes a vibration type key-value pair and a vibration description parameter key-value pair; the vibration type key value pair is used for indicating the type of vibration indicated by the target event object, and the vibration description parameter key value pair is used for indicating the output mode of the vibration indicated by the target event object;
when the vibration type indicated by the vibration type key value pair is a first type, the target event object indicates target vibration through at least one reference point, the value of the vibration description parameter key value pair comprises a reference point number key value pair and N reference point array elements, and the value of each reference point array element is a reference point object; the reference point number key value pair is used for indicating the number of reference points associated with the target event object, and N is matched with the number of the reference points associated with the target event object; the target reference point object is used for indicating a vibration output parameter associated with a target reference point, the target reference object is a value of a target reference point array element, and the target reference point array element is any one of the N reference point array elements;
when the vibration type indicated by the vibration type key value pair is of a second type, the value of the vibration description parameter key value pair comprises a vibration intensity key value pair and a vibration frequency key value pair; the vibration strength key value pair is used for indicating the strength of the vibration indicated by the target event object, and the vibration frequency key value pair is used for indicating the frequency of the vibration indicated by the target event object.
As an alternative embodiment, the target reference point object includes at least one key-value pair of: a reference point time key-value pair, a reference point intensity key-value pair, a reference point frequency key-value pair, a reference point motor key-value pair;
wherein the reference point time key value pair is used for indicating the relative time of the target reference point in the vibration indicated by the target event object; the reference point intensity key value pair is used for indicating the vibration intensity corresponding to the target reference point; the reference point frequency key value pair is used for indicating the vibration frequency corresponding to the target reference point; the reference point motor key-value pair is used for indicating a motor corresponding to the reference point, and the priority of the reference point motor key-value pair is higher than that of the vibration part key-value pair.
As an alternative embodiment, the file format of the vibration invocation parameter belongs to the second format, and the vibration invocation parameter includes at least one of the following blocks: a head information block, a motor information block, a metadata block, a vibration timing block, a vibration event block, a reference point block, and a vibration parameter block;
the head information block is used for describing vibration calling parameters; the motor information block is used for indicating the called motor; the metadata block is used for indicating the abstract of the vibration calling parameter; a vibration timing block for indicating a sequence of at least one vibration event; the vibration event block is used for indicating the associated parameters of the vibration event; the reference point block is used for indicating a vibration output parameter related to the reference point; the vibration parameter block is used for indicating description information corresponding to different vibration types; the storage area corresponding to each block is different, each storage area comprises one or more storage spaces, and each storage space corresponds to a preset offset address.
As an alternative embodiment, the header information block carries a value in at least one of the following storage spaces: the value in the file identification storage space and the value in the file data length storage space;
the value in the file identification storage space is used for indicating the file identification of the vibration calling parameter; the value in the file data length storage space is used to indicate the file data length of the vibration invocation parameter.
As an alternative embodiment, the motor information block carries a value in at least one of the following storage spaces: a value in a motor information block identification storage space, a value in a motor information block data length storage space, a value in a vibration output side identification storage space, a value in a motor version number storage space, a value in a motor number storage space;
wherein the value in the motor information block identification storage space is used to indicate the identification of the motor information block; a value in the motor information block data length storage space is used to indicate a data length of the motor information block; the value in the vibration output party identification storage space is used for indicating the identification of the vibration output party; the value in the motor version number storage space is used for indicating whether the output target vibration needs to call a plurality of motors or not; the value in the motor number storage space is used to indicate that the output target vibration is the number of motors that need to be called up.
As an alternative embodiment, the metadata block carries a value in at least one of the following storage spaces: the value in the metadata block identification storage space, the value in the storage space of the metadata block data length, the value in the vibration calling parameter version number storage space, the value in the vibration calling parameter creation time storage space and the value in the vibration calling parameter description information storage space;
wherein the value in the metadata block identification storage space is used for indicating the identification of the metadata block; a value in a storage space of a metadata block data length is used to indicate a data length of a metadata block; the value in the vibration calling parameter version number storage space is used for indicating the version number of the vibration calling parameter; the value in the vibration calling parameter creation time storage space is used for indicating the creation time of the vibration calling parameter; the value in the vibration invocation parameter description information storage space is used for indicating the description information of the vibration invocation parameter.
As an alternative embodiment, the vibration sequence block carries the following values in at least one of the memory spaces: the vibration time sequence block identifies values in the storage space, and the vibration time sequence block data length stores values in the storage space;
wherein the value in the vibration timing block identification storage space is used to indicate the identification of the vibration timing block; the value in the vibration timing block data length storage space is used to indicate the data length of the vibration timing block.
As an alternative embodiment, the vibration time sequence block is associated with at least one vibration event block, and the corresponding storage area of each vibration event block is different; each vibration event block carries a value in at least one of the following storage spaces: a value in a vibration event block identification storage space, a value in a vibration event type storage space, a value in a vibration event block number storage space, a value in a motor identification storage space, a value in a vibration event start time storage space, a value in a vibration event duration storage space, a value in a vibration intensity flag storage space, a value in a vibration frequency flag storage space;
wherein the value in the vibration event block identification storage space is used to indicate the identification of the vibration event block; the value in the vibration event type storage space is used for indicating the vibration type of the vibration corresponding to the vibration event block; the value in the vibration event block number storage space is used for indicating the number of the vibration event block; the value in the motor identification storage space is used for indicating a motor which needs to be called for outputting the vibration corresponding to the vibration event block; the value in the vibration event starting time storage space is used for indicating the starting time of the vibration corresponding to the vibration event block; the value in the vibration event duration storage space is used for indicating the duration of the vibration corresponding to the vibration event block; the value in the vibration intensity mark storage space is used for indicating the vibration intensity indicating mode of the vibration corresponding to the vibration event block; the value in the vibration frequency flag storage space is used for indicating the vibration frequency indication mode of the vibration corresponding to the vibration event block.
As an alternative embodiment, when the vibration type of the vibration corresponding to the vibration event block is the first type, the vibration event block is associated with at least one reference point block, the storage area corresponding to each reference point block is different, and each reference point block carries the following values in at least one storage space: a value in the reference point block identification storage space, a value in the reference point block serial number storage space, a value in the motor number storage space, a value in the reference point start time storage space, a value in the reference point vibration intensity storage space, and a value in the reference point vibration frequency storage space;
wherein the value in the reference point block identification storage space is used to indicate the identification of the reference point block; the value in the reference point block sequence number storage space is used for indicating the sequence number of the reference point block; the value in the motor number storage space is used for indicating a motor which needs to be called for outputting the vibration corresponding to the reference point block; the value in the reference point starting time storage space is used for indicating the starting time of the vibration corresponding to the reference point block; the value in the reference point vibration intensity storage space is used for indicating the vibration intensity of the vibration corresponding to the reference point block; the value in the reference point vibration frequency storage space is used to indicate the vibration frequency of the vibration corresponding to the reference point block.
As an alternative embodiment, the vibration event block is further associated with a first vibration parameter block, and the first vibration parameter block carries a value in at least one of the following storage spaces: the vibration parameter block identifies values in the storage space, reference point quantity storage space;
wherein the value in the vibration parameter block identification storage space is used to indicate the identification of the first vibration parameter block; the value in the reference point number storage space is used to indicate the number of reference point blocks with which the vibration event block is associated.
As an alternative embodiment, when the vibration type of the vibration event corresponding to the vibration event block is the second type, the vibration event block is associated with the second vibration parameter block; the second vibration parameter block carries values in at least one of the following storage spaces: the vibration parameter block identifies values in a storage space, values in an event vibration intensity storage space, and values in an event vibration frequency storage space;
wherein the value in the vibration parameter block identification storage space is used to indicate the identification of the second vibration parameter block; the value in the event vibration intensity storage space is used for indicating the vibration intensity of the vibration corresponding to the vibration event block; the value in the event vibration frequency storage space is used to indicate the vibration frequency of the vibration to which the vibration event block corresponds.
Based on the same inventive concept, the principle and the advantageous effect of the problem solving of the computer device provided in the embodiment of the present application are similar to the principle and the advantageous effect of the problem solving of the video processing method in the embodiment of the present application, and for brevity, the principle and the advantageous effect of the implementation of the method can be referred to, and are not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is suitable for being loaded by a processor and executing the video processing method of the foregoing method embodiment.
Embodiments of the present application further provide a computer program product, which includes a computer program, and the computer program is adapted to be loaded by a processor and to execute the video processing method of the foregoing method embodiments.
Embodiments of the present application also provide a computer program product or a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the video processing method described above.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The modules in the device can be combined, divided and deleted according to actual needs.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, which may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.

Claims (19)

1. A vibration control method, characterized in that the method comprises:
responding to a parameter generation condition of target vibration to be triggered, and generating a vibration calling parameter corresponding to the target vibration by a vibration calling party according to a reference coding mode, wherein the vibration calling party is provided with a vibration middleware;
transmitting the vibration calling parameters to the vibration middleware through a vibration parameter interface so as to send the vibration calling parameters to one or more vibration output parties through the vibration middleware, enabling each vibration output party to analyze the vibration calling parameters, and outputting the target vibration based on an analysis result;
the file format of the vibration invocation parameter includes at least one of an HE format and an HEC format, the HEC format being a compressed representation of the HE format;
the HEC-formatted vibration invocation parameter comprises at least one of the following blocks: a head information block, a motor information block, a metadata block, a vibration timing block, a vibration event block, a reference point block, and a vibration parameter block;
wherein the header information block is used for describing the vibration calling parameter; the motor information block is used for indicating an invoked motor; the metadata block is used for indicating the abstract of the vibration calling parameter; the vibration timing block is used for indicating the sequence of at least one vibration event; the vibration event block is used for indicating the associated parameters of the vibration event; the reference point block is used for indicating a vibration output parameter related to a reference point; the vibration parameter block is used for indicating description information corresponding to different vibration types; the storage area corresponding to each block is different, each storage area comprises one or more storage spaces, and each storage space corresponds to a preset offset address.
2. The method of claim 1, wherein if a file format of the vibration invocation parameter does not belong to the HE format or the HEC format, the method further comprises:
carrying out format conversion processing on the vibration calling parameter through the vibration middleware to obtain an updated vibration calling parameter;
and the updated file format of the vibration calling parameter belongs to the HE format or the HEC format.
3. The method of claim 2, wherein the performing, by the vibration middleware, a format conversion process on the vibration invocation parameter to obtain an updated vibration invocation parameter comprises:
converting the vibration calling parameters according to parameter conversion rules corresponding to the HE format or the HEC format through the vibration middleware; and;
and constructing a parameter conversion result through the vibration middleware according to the HE format or a data organization form corresponding to the HEC format to obtain an updated vibration calling parameter.
4. The method of any of claims 1-3, wherein a file format of the vibration invocation parameter belongs to the HE format, the vibration invocation parameter including a metadata key-value pair and a mode key-value pair, the metadata key-value pair indicating metadata in the vibration invocation parameter; the mode key-value pair is used to indicate a vibration mode.
5. The method of claim 4, wherein values of the metadata key-value pairs are used to indicate a digest object that includes at least one key-value pair of: the method comprises the steps of version key value pairs, creation time key value pairs and description information key value pairs;
the version key value pair is used for indicating a version number corresponding to the vibration calling parameter; the creation time key value pair is used for indicating the creation time of the vibration calling parameter; the description information key value pair is used for describing the vibration effect of the vibration calling parameter.
6. The method of claim 4, wherein the value of the schema key-value pair is at least one array element, the value of each array element being an event object; the target event object includes at least one key-value pair of: vibration part key value pair, vibration time key value pair, duration key value pair, intensity mark key value pair and frequency mark key value pair; the target event object is a value of a target array element, and the target array element is any one of the at least one array element;
wherein the vibration part key value pair is used for indicating a motor called when outputting the vibration indicated by the target event object; the vibration time key value pair is used for indicating the starting time of the vibration indicated by the target event object; the duration key value pair is used for indicating the duration of the vibration indicated by the target event object; the intensity flag key value pair is used for indicating the intensity indication mode of the vibration indicated by the target event object; the frequency flag key value pair is used for indicating the frequency indication mode of the vibration indicated by the target event object.
7. The method of claim 6, wherein the target event object comprises the intensity flag key-value pair and the frequency flag key-value pair, and the target event object further comprises a vibration type key-value pair and a vibration description parameter key-value pair; the vibration type key value pair is used for indicating the type of vibration indicated by the target event object, and the vibration description parameter key value pair is used for indicating the output mode of the vibration indicated by the target event object;
when the vibration type indicated by the vibration type key value pair is a first type, the target event object indicates the target vibration through at least one reference point, the value of the vibration description parameter key value pair comprises a reference point number key value pair and N reference point array elements, and the value of each reference point array element is a reference point object; the reference point number key value pair is used for indicating the number of reference points associated with the target event object, and N is matched with the number of reference points associated with the target event object; the target reference point object is used for indicating a vibration output parameter associated with a target reference point, the target reference object is a value of a target reference point array element, and the target reference point array element is any one of the N reference point array elements;
when the vibration type indicated by the vibration type key value pair is of a second type, the value of the vibration description parameter key value pair comprises a vibration intensity key value pair and a vibration frequency key value pair; the vibration intensity key value pair is used for indicating the intensity of the vibration indicated by the target event object, and the vibration frequency key value pair is used for indicating the frequency of the vibration indicated by the target event object.
8. The method of claim 7, wherein the target reference point object comprises at least one key-value pair of: a reference point time key value pair, a reference point intensity key value pair, a reference point frequency key value pair, a reference point motor key value pair;
wherein the reference point time-key value pair is used to indicate a relative time of the target reference point in the vibration indicated by the target event object; the reference point intensity key value pair is used for indicating the vibration intensity corresponding to the target reference point; the reference point frequency key value pair is used for indicating the vibration frequency corresponding to the target reference point; the reference point motor key-value pair is used for indicating a motor corresponding to the reference point, and the priority of the reference point motor key-value pair is higher than that of the vibration part key-value pair.
9. The method of claim 1, wherein the header information block carries a value in at least one of the following storage spaces: the value in the file identification storage space and the value in the file data length storage space;
wherein the value in the file identifier storage space is used to indicate the file identifier of the vibration invocation parameter; and the value in the file data length storage space is used for indicating the file data length of the vibration calling parameter.
10. The method of claim 1, wherein the motor information block carries a value in at least one of the following storage spaces: a value in a motor information block identification storage space, a value in a motor information block data length storage space, a value in a vibration output side identification storage space, a value in a motor version number storage space, a value in a motor number storage space;
wherein a value in the motor information block identification storage space is used to indicate an identification of the motor information block; a value in the motor information block data length storage space is used to indicate a data length of the motor information block; the value in the vibration output party identification storage space is used for indicating the identification of the vibration output party; the value in the motor version number storage space is used for indicating whether a plurality of motors need to be called or not for outputting the target vibration; the value in the motor number storage space is used to indicate that the output target vibration is the number of motors that need to be called.
11. The method of claim 1, wherein the metadata block carries a value in at least one of the following storage spaces: the value in the metadata block identification storage space, the value in the storage space of the metadata block data length, the value in the vibration calling parameter version number storage space, the value in the vibration calling parameter creation time storage space and the value in the vibration calling parameter description information storage space;
wherein a value in the metadata block identification storage space is used to indicate an identification of the metadata block; a value in a storage space of the metadata block data length is used to indicate the data length of the metadata block; the value in the vibration calling parameter version number storage space is used for indicating the version number of the vibration calling parameter; the value in the vibration calling parameter creation time storage space is used for indicating the creation time of the vibration calling parameter; and the value in the vibration calling parameter description information storage space is used for indicating the description information of the vibration calling parameter.
12. The method of claim 1, wherein the vibration timing block carries values in at least one of the following storage spaces: the vibration timing sequence block identifies values in the storage space, and the vibration timing sequence block data length stores values in the storage space;
wherein a value in the vibration timing block identification storage space is used to indicate an identification of the vibration timing block; a value in the vibration timing block data length storage space is used to indicate a data length of the vibration timing block.
13. The method of claim 12, wherein the vibration timing block is associated with at least one vibration event block, each vibration event block having a different corresponding storage area; each vibration event block carries a value in at least one of the following storage spaces: a value in a vibration event block identification storage space, a value in a vibration event type storage space, a value in a vibration event block number storage space, a value in a motor identification storage space, a value in a vibration event start time storage space, a value in a vibration event duration storage space, a value in a vibration intensity flag storage space, a value in a vibration frequency flag storage space;
wherein a value in the vibration event block identification storage space is used to indicate an identification of the vibration event block; the value in the vibration event type storage space is used for indicating the vibration type of the vibration corresponding to the vibration event block; the value in the vibration event block number storage space is used for indicating the number of the vibration event block; the value in the motor identification storage space is used for indicating a motor which needs to be called for outputting the vibration corresponding to the vibration event block; the value in the vibration event starting time storage space is used for indicating the starting time of the vibration corresponding to the vibration event block; the value in the vibration event duration storage space is used for indicating the duration of the vibration corresponding to the vibration event block; the value in the vibration intensity mark storage space is used for indicating a vibration intensity indicating mode of vibration corresponding to the vibration event block; and the value in the vibration frequency flag storage space is used for indicating the vibration frequency indication mode of the vibration corresponding to the vibration event block.
14. The method of claim 13, wherein when the vibration type of the vibration corresponding to the vibration event block is a first type, the vibration event block is associated with at least one reference point block, each reference point block having a different corresponding storage area, each reference point block carrying values in at least one of the following storage spaces: a value in the reference point block identification storage space, a value in the reference point block serial number storage space, a value in the motor number storage space, a value in the reference point start time storage space, a value in the reference point vibration intensity storage space, and a value in the reference point vibration frequency storage space;
wherein the value in the reference point block identity storage space is used to indicate the identity of the reference point block; the value in the reference point block sequence number storage space is used for indicating the sequence number of the reference point block; the value in the motor number storage space is used for indicating a motor which needs to be called for outputting the vibration corresponding to the reference point block; the value in the reference point starting time storage space is used for indicating the starting time of the vibration corresponding to the reference point block; the value in the reference point vibration intensity storage space is used for indicating the vibration intensity of the vibration corresponding to the reference point block; and the value in the reference point vibration frequency storage space is used for indicating the vibration frequency of the vibration corresponding to the reference point block.
15. The method of claim 14 wherein the vibration event block is further associated with a first vibration parameter block carrying values in at least one of the following storage spaces: the vibration parameter block identifies values in the storage space, and the number of reference points stores values in the storage space;
wherein a value in the vibration parameter block identification storage space is used to indicate an identification of the first vibration parameter block; the value in the reference point number storage space is used to indicate the number of reference point blocks with which the vibration event block is associated.
16. The method of claim 13, wherein the vibration event block is associated with a second vibration parameter block when the vibration type of the vibration event to which the vibration event block corresponds is of a second type; the second vibration parameter block carries values in at least one of the following storage spaces: the vibration parameter block identifies values in the storage space, values in the event vibration intensity storage space, and values in the event vibration frequency storage space;
wherein a value in the vibration parameter block identification storage space is used to indicate an identification of the second vibration parameter block; the value in the event vibration intensity storage space is used for indicating the vibration intensity of the vibration corresponding to the vibration event block; the value in the event vibration frequency storage space is used to indicate the vibration frequency of the vibration corresponding to the vibration event block.
17. A vibration control apparatus, characterized by comprising:
the processing unit is used for responding to the triggering of a parameter generation condition of target vibration, and a vibration calling party generates a vibration calling parameter corresponding to the target vibration according to a reference coding mode, and the vibration calling party is provided with a vibration middleware;
the sending unit is used for transmitting the vibration calling parameters to the vibration middleware through a vibration parameter interface, sending the vibration calling parameters to one or more vibration output parties through the vibration middleware, enabling each vibration output party to analyze the vibration calling parameters, and outputting the target vibration based on an analysis result;
the file format of the vibration calling parameter comprises at least one of an HE format and an HEC format, and the HEC format is a compressed representation of the HE format;
the HEC-formatted vibration invocation parameter comprises at least one of the following blocks: a head information block, a motor information block, a metadata block, a vibration timing sequence block, a vibration event block, a reference point block and a vibration parameter block;
wherein the header information block is used for describing the vibration calling parameter; the motor information block is used for indicating an invoked motor; the metadata block is used for indicating the abstract of the vibration calling parameter; the vibration timing block is used for indicating the sequence of at least one vibration event; the vibration event block is used for indicating the associated parameters of the vibration event; the reference point block is used for indicating a vibration output parameter related to a reference point; the vibration parameter block is used for indicating description information corresponding to different vibration types; the storage area corresponding to each block is different, each storage area comprises one or more storage spaces, and each storage space corresponds to a preset offset address.
18. A computer device, comprising: a memory and a processor;
a memory having a computer program stored therein;
a processor for loading the computer program to implement the vibration control method of any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program adapted to be loaded by a processor and to execute the vibration control method according to any one of claims 1-16.
CN202211136014.7A 2022-09-19 2022-09-19 Vibration control method, device, equipment and computer readable storage medium Active CN115202767B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310030099.9A CN117762532A (en) 2022-09-19 2022-09-19 Vibration control method, device, equipment and computer readable storage medium
CN202211136014.7A CN115202767B (en) 2022-09-19 2022-09-19 Vibration control method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211136014.7A CN115202767B (en) 2022-09-19 2022-09-19 Vibration control method, device, equipment and computer readable storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310030099.9A Division CN117762532A (en) 2022-09-19 2022-09-19 Vibration control method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115202767A CN115202767A (en) 2022-10-18
CN115202767B true CN115202767B (en) 2022-11-25

Family

ID=83573707

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202211136014.7A Active CN115202767B (en) 2022-09-19 2022-09-19 Vibration control method, device, equipment and computer readable storage medium
CN202310030099.9A Pending CN117762532A (en) 2022-09-19 2022-09-19 Vibration control method, device, equipment and computer readable storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202310030099.9A Pending CN117762532A (en) 2022-09-19 2022-09-19 Vibration control method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (2) CN115202767B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003300015A (en) * 2002-04-05 2003-10-21 Nec Tokin Corp Method for driving vibration actuator, and portable device
CN108668153A (en) * 2017-03-28 2018-10-16 Lg 电子株式会社 Intelligent control device and its control method
CN109240617A (en) * 2018-09-03 2019-01-18 郑州云海信息技术有限公司 Distributed memory system write request processing method, device, equipment and storage medium
CN110022495A (en) * 2019-03-28 2019-07-16 青岛海信电器股份有限公司 A kind of mobile terminal pushes the method and display equipment of media file to display equipment
CN110597393A (en) * 2019-09-18 2019-12-20 Oppo(重庆)智能科技有限公司 Motor vibration control method and device and computer readable storage medium
CN113822017A (en) * 2021-06-03 2021-12-21 腾讯科技(深圳)有限公司 Audio generation method, device, equipment and storage medium based on artificial intelligence
WO2022057677A1 (en) * 2020-09-18 2022-03-24 腾讯科技(深圳)有限公司 Vibration control method and apparatus, and electronic device and computer-readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200064444A1 (en) * 2015-07-17 2020-02-27 Origin Wireless, Inc. Method, apparatus, and system for human identification based on human radio biometric information
CN103870492B (en) * 2012-12-14 2017-08-04 腾讯科技(深圳)有限公司 A kind of date storage method and device based on key row sequence
CN111568584A (en) * 2020-05-14 2020-08-25 无锡青禾小贝科技有限公司 Control method and device based on vibration strength of toothbrush motor
CN114740981B (en) * 2022-04-25 2023-06-30 腾讯科技(深圳)有限公司 Information processing method, information processing apparatus, readable medium, electronic device, and program product
CN115047972A (en) * 2022-06-16 2022-09-13 腾讯科技(深圳)有限公司 Vibration control method, device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003300015A (en) * 2002-04-05 2003-10-21 Nec Tokin Corp Method for driving vibration actuator, and portable device
CN108668153A (en) * 2017-03-28 2018-10-16 Lg 电子株式会社 Intelligent control device and its control method
CN109240617A (en) * 2018-09-03 2019-01-18 郑州云海信息技术有限公司 Distributed memory system write request processing method, device, equipment and storage medium
CN110022495A (en) * 2019-03-28 2019-07-16 青岛海信电器股份有限公司 A kind of mobile terminal pushes the method and display equipment of media file to display equipment
CN110597393A (en) * 2019-09-18 2019-12-20 Oppo(重庆)智能科技有限公司 Motor vibration control method and device and computer readable storage medium
WO2022057677A1 (en) * 2020-09-18 2022-03-24 腾讯科技(深圳)有限公司 Vibration control method and apparatus, and electronic device and computer-readable storage medium
CN113822017A (en) * 2021-06-03 2021-12-21 腾讯科技(深圳)有限公司 Audio generation method, device, equipment and storage medium based on artificial intelligence

Also Published As

Publication number Publication date
CN115202767A (en) 2022-10-18
CN117762532A (en) 2024-03-26

Similar Documents

Publication Publication Date Title
CN106776677B (en) File conversion method, device and file transmission system
CN109167750B (en) Data packet transmission method and device, electronic equipment and storage medium
CN111899322B (en) Video processing method, animation rendering SDK, equipment and computer storage medium
CN110841278A (en) Cloud game implementation method and device
CN111259037A (en) Data query method and device based on rule configuration, storage medium and terminal
CN112231104A (en) Game data processing method and device
CN115202767B (en) Vibration control method, device, equipment and computer readable storage medium
CN113162977B (en) Information processing method and device, equipment and storage medium
CN114356335A (en) Data processing method, device, equipment and medium
CN111346377A (en) Recording and playback method and device for online game, server and terminal
CN102902525B (en) A kind of method of swf files in batch amendment frame frequency
CN109145619A (en) A kind of Android application resource reinforcement means and system
CN114419203A (en) File processing method and device
CN115132213A (en) Audio data transmission method, device, chip, electronic equipment and storage medium
CN105005678A (en) Role information acquisition method and apparatus for resource exchange platform
CN109005219A (en) A kind of the mobile intelligent terminal system and its implementation of shared system
CN105592319A (en) Server screenshot method and server
CN111782989B (en) Fast application association method and related device
CN114339325A (en) Multi-engine dynamic wallpaper playing method and device based on android system
CN103605594B (en) Terminal-based funcall method and device
CN104572316A (en) Game program and running platform interaction method and system
CN111080750A (en) Robot animation configuration method, device and system
WO2008065249A1 (en) Image processing method
CN112287127A (en) Multimedia file storage and reading method
KR20020069857A (en) Encoded image data service method for virtual machine

Legal Events

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