Method for encoding tactile data, method for decoding tactile data, and related devices

By encoding tactile data using the difference between consecutive keyframe positions, the method addresses the issue of redundancy and inefficiency in conventional encoding, achieving improved compression and decoding efficiency.

JP2026512839APending Publication Date: 2026-04-21VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2024-03-21
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Conventional methods for encoding tactile data result in high data redundancy and low encoding efficiency due to encoding keyframe positions relative to effect positions.

Method used

Encoding tactile data by determining the encoded position information of a keyframe based on the difference between the positions of consecutive keyframes, reducing redundancy and improving efficiency.

Benefits of technology

This approach reduces data redundancy and enhances encoding efficiency by adaptively allocating bits for keyframe position information, facilitating more efficient data compression and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026512839000001_ABST
    Figure 2026512839000001_ABST
Patent Text Reader

Abstract

This application discloses a method for encoding tactile data, a method for decoding tactile data, and related devices, and belongs to the field of computer technology. The method for encoding tactile data according to an embodiment of this application includes the steps of obtaining the position of each of a plurality of keyframes of an effect in tactile data, wherein the plurality of keyframes include a first target keyframe and a second target keyframe located before the first target keyframe; determining encoded position information of the first target keyframe based on the difference between the position of the first target keyframe and the position of the second target keyframe; and encoding the encoded position information of the first target keyframe to obtain a first encoding result, wherein the encoding result of the tactile data includes the first encoding result.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] (Cross-reference of related applications) This application claims priority to Chinese Patent Application No. 202310312430.6, filed in China on 28 March 2023, and all its contents are incorporated herein by reference.

[0002] This application belongs to the field of computer technology and specifically relates to a method for encoding tactile data, a method for decoding tactile data, and related devices. [Background technology]

[0003] As the importance of haptics in consumer peripherals increases, the importance of haptic encoding is also growing. Haptic encoding is defined by the Moving Pictures Experts Group (MPEG) as having four types of haptic bands: transient bands, curve bands, vector wave bands, and wavelet wave bands. Each band consists of a set of "effects" of the same type as the band, and each effect is defined by a list of "keyframes". When encoding haptics, the position information of each keyframe of an effect needs to be encoded.

[0004] Conventional techniques encode the position information of Effect keyframes by encoding the difference between the keyframe position and the Effect position, but this results in high data redundancy and low encoding efficiency. [Overview of the Initiative]

[0005] The embodiments of this application provide a method for encoding tactile data, a method for decoding tactile data, and related devices that can solve the problem of low encoding efficiency.

[0006] In a first embodiment, a step of obtaining the position of each of a plurality of keyframes of an effect in haptic data, wherein the plurality of keyframes includes a first target keyframe and a second target keyframe located before the first target keyframe, The steps include determining the encoded position information of the first target keyframe based on the difference between the position of the first target keyframe and the position of the second target keyframe, The process includes the step of encoding the encoded position information of the first target keyframe and obtaining a first encoding result, The encoding result of the tactile data includes the first encoding result, This provides a method for encoding tactile data.

[0007] In a second embodiment, the steps include decoding a first encoding result from the encoding results of haptic data to obtain encoded position information of a first target keyframe, wherein the encoded position information corresponding to the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe, the first target keyframe and the second target keyframe are keyframes among a plurality of keyframes of an effect in the haptic data, and the second target keyframe is a keyframe located before the first target keyframe, The steps include: determining the position of the first target keyframe based on the encoded position information of the first target keyframe; This provides a method for decoding tactile data.

[0008] In a third embodiment, an acquisition module for obtaining the position of each of a plurality of keyframes of an effect in haptic data, wherein the plurality of keyframes includes a first target keyframe and a second target keyframe located before the first target keyframe, A first determination module for determining encoded position information of a first target key frame based on a difference value between the position of the first target key frame and the position of the second target key frame; A first encoding module for encoding the encoded position information of the first target key frame to obtain a first encoding result, and comprising: The encoding result of the haptic data includes the first encoding result. Provided is an encoding device for haptic data.

[0009] In a fourth aspect, a decoding module for decoding a first encoding result among encoding results of haptic data to obtain encoded position information of a first target key frame, wherein the encoded position information corresponding to the first target key frame is determined based on a difference value between the position of the first target key frame and the position of a second target key frame, the first target key frame and the second target key frame are key frames among a plurality of key frames of an effect in haptic data, and the second target key frame is a key frame located before the first target key frame; A first determination module for determining the position of the first target key frame based on the encoded position information of the first target key frame, and comprising: Provided is a decoding device for haptic data.

[0010] In a fifth aspect, provided is a terminal including a processor and a memory, wherein a program or command executable by the processor is stored in the memory, and when the program or command is executed by the processor, the steps of the method according to the first aspect are realized, or the steps of the method according to the second aspect are realized.

[0011] In a sixth aspect, there is provided a terminal including a processor and a communication interface, wherein the processor acquires positions of respective ones of a plurality of key frames of an effect in haptic data, the plurality of key frames include a first target key frame and a second target key frame positioned before the first target key frame, determines encoded position information of the first target key frame based on a difference value between the position of the first target key frame and the position of the second target key frame, encodes the encoded position information of the first target key frame to obtain a first encoded result, and provides a terminal in which an encoded result of the haptic data includes the first encoded result.

[0012] In a seventh aspect, there is provided a terminal including a processor and a communication interface, wherein the processor decodes a first encoded result among encoded results of haptic data to obtain encoded position information of a first target key frame, the encoded position information corresponding to the first target key frame is determined based on a difference value between the position of the first target key frame and the position of a second target key frame, the first target key frame and the second target key frame are key frames among a plurality of key frames of an effect in haptic data, the second target key frame is a key frame positioned before the first target key frame, and determines the position of the first target key frame based on the encoded position information of the first target key frame.

[0013] In an eighth aspect, there is provided a readable storage medium storing a program or a command, wherein when the program or the command is executed by a processor, steps of the method according to the first aspect are realized, or steps of the method according to the second aspect are realized.

[0014] In a ninth aspect, there is provided an encoding / decoding system including an encoding-side device and a decoding-side device, wherein the encoding-side device is capable of executing steps of the method according to the first aspect, and the decoding-side device is capable of executing steps of the method according to the second aspect.

[0015] In a tenth embodiment, the present invention provides a chip including a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor implements the method according to the first embodiment or the method according to the second embodiment by executing a program or command.

[0016] In an eleventh embodiment, a computer program / program product is provided that is stored in a storage medium and executed by at least one processor to realize the steps of the method described in the first embodiment or the steps of the method described in the second embodiment.

[0017] In the embodiment of this application, the positions of each of a plurality of keyframes of an effect in haptic data are obtained, the plurality of keyframes include a first target keyframe and a second target keyframe located before the first target keyframe, the encoded position information of the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe, the encoded position information of the first target keyframe is encoded to obtain a first encoding result, and the encoding result of the haptic data includes the first encoding result. By encoding the encoded position information of the first target keyframe determined based on the difference between the position of the first target keyframe and the position of the second target keyframe in this way, data redundancy can be reduced and the encoding efficiency can be improved compared to encoding the difference information between the keyframe position and the effect position. [Brief explanation of the drawing]

[0018] [Figure 1] This is a schematic diagram of the encoder framework in conventional technology. [Figure 2] This is a schematic diagram of tactile signals in conventional technology. [Figure 3] This is a flowchart of the method for encoding tactile data provided by the embodiment of this application. [Figure 4]This is a schematic diagram of the packetization of tactile data provided by the embodiment of this application. [Figure 5] This is a flowchart of the method for decoding tactile data provided by the embodiments of this application. [Figure 6] This is a schematic diagram of the structure of a tactile data encoding device provided by an embodiment of this application. [Figure 7] This is a schematic diagram of the structure of a tactile data decoding device provided by an embodiment of this application. [Figure 8] This is a schematic diagram of the structure of a communication device provided by the embodiments of this application. [Figure 9] This is a schematic diagram of the structure of the terminal provided by the embodiment of this application. [Modes for carrying out the invention]

[0019] In the following, with reference to the drawings of the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described, and naturally, the embodiments described are only a part of the embodiments of this application, not all of them. All other embodiments that a person skilled in the art could obtain based on the embodiments of this application without requiring any creative effort are all within the scope of protection of this application.

[0020] The terms "first," "second," etc., used in this application do not describe a specific order of subjects, but are used to distinguish different subjects. The terms used in this manner may, in some cases, be interchangeable so that the embodiments of this application can be implemented in an order other than those illustrated or described herein. The subjects distinguished by "first" and "second" are usually similar, and the number of subjects is not limited; for example, the first subject may be one or more. Furthermore, "or" in this application indicates at least one of the subjects connected by it. For example, "A or B" includes three cases: including A but not B, including B but not A, and including both A and B. The symbol " / " usually indicates that the preceding and succeeding subjects are in an "or" relationship.

[0021] In this application, the term "instruction" may refer to either a direct instruction (i.e., an explicit instruction) or an indirect instruction (i.e., an implicit instruction). A direct instruction is understood as the sender clearly communicating to the receiver, in the transmitted instruction, specific information, the operations to be performed, or the desired results. An indirect instruction is understood as the receiver determining or judging the corresponding information based on the instruction transmitted by the sender, and then determining the operations to be performed or the desired results based on the judgment.

[0022] The encoding / decoding side corresponding to the haptic data encoding / decoding method in the embodiments of this application may be a terminal. This terminal may also be called a terminal device or user equipment (UE). The terminal may be a terminal-side device such as a mobile phone, tablet computer, laptop computer (also called a notebook computer), personal digital assistant (PDA), personal information terminal, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR) / virtual reality (VR), robot, wearable device, vehicle user equipment (VUE), or pedestrian user equipment (PUE). Wearable devices include smart watches, bracelets, earphones, glasses, etc. In the embodiments of this application, the specific type of terminal is not limited.

[0023] To facilitate understanding, some of the relevant details of the embodiments of this application are explained below.

[0024] Haptics brings new forms of entertainment and sensory immersion to users. Therefore, skillfully integrating haptic interaction into content such as audio, video, and games can significantly enhance the user experience of media content. In recent years, the importance of haptic encoding has increased as the market importance of haptics in consumer peripherals (e.g., devices with Taptic Engines or DualSense controllers) has grown. Digital encoding of haptics involves storing haptic data in a digital format. Similar to audio and video, digital encoding is crucial for the operation of digital haptic devices. Previous generations of haptic peripherals were based on less expressive haptic actuators, which typically relied on state machine control processes. Furthermore, the current market and technological environment is highly fragmented, with various technology manufacturers developing and using numerous different haptic encoding formats, leading to platform compatibility and interoperability issues. These issues hinder the widespread application of haptic technology in the market. To address the above issues, the Moving Picture Experts Group (MPEG) is working on haptic standardization, which emphasizes the need for standardization of haptic encoding. A standardized haptic encoding format (and associated standard decoders) would contribute to the incorporation of haptic technology into ISOBMFF, MPEG-DASH, and MPEG-I standards, thereby facilitating the adoption of haptic technology in a standardized manner by content creators and media / streaming providers, and improving the overall user experience.

[0025] In the field of tactile sensation, two different representation methods are typically used for encoding signals. The first is the quantization method, which is usually based on measurement data. The signal is represented by storing samples of the original tactile phenomenon in a file at a specific sampling frequency. One example of quantization of tactile signals is realized by the WAV file, originally developed for audio. The WAV file format can capture real-world data and represent complex, wideband tactile feedback. The drawback of this type of tactile encoding is that it is difficult to modify once encoded because the primitives used to create the signal are not accessible. The second is the descriptive method, which encodes the tactile signal as a combination of synthesizable primitives. Conventional vectorization formats are AHAP and IVS, respectively. The advantage of these formats is that they are created by combinations of primitives. They are very easy to modify by applications or dedicated programs during operation. Currently, these solutions only support vibratory tactile sensing and do not support other forms of tactile sensation such as kinesthetic sensation, temperature, or texture. As signal complexity increases, their memory efficiency also decreases, making it impossible to encode non-periodic phenomena.

[0026] The MPEG haptic coding standardization describes in detail coded representations of haptic media covering the two most common haptic sensings used in current devices: vibratory and kinesthetic. Such coded representations can encode descriptive and quantized data in a human-readable JSON format (.hjif) used as an exchange format. This format can be compressed for delivery in a binary file format (.hmpg) or compressed for streaming in a packetized bitstream (MIHS). Such coded representations can meet market expectations for compatibility between descriptive and quantized formats, as well as interoperability between devices, enabling 3D immersive experiences and haptic data delivery.

[0027] As shown in Figure 1, the MPEG haptic encoder can process pulse code modulation (PCM) signals and descriptive haptic files (e.g., AHAP, IVS, or HJIF in MPEG format). Metadata information is provided to the codec device via the OHM input file. The encoder processes the two types of input files in different ways. For descriptive content, semantic analysis is performed on the input to transcode the data into a preferred encoded representation (if necessary). For PCM content, the signal analysis process is divided into two subprocesses. After performing frequency band decomposition on the signal, the low-frequency signals are encoded by a keyframe extraction process. The low-frequency band is then reconstructed, and the residual between the signal and the original low-frequency signal is calculated. Finally, the residual signal is added to the original high-frequency band and encoded by wavelet transform.

[0028] MPEG defines four types of haptic bands: transient bands, curve bands, vector wave bands, and wavelet wave bands. Each band consists of the same type of "effects" as the band, and each effect is defined by a list of "keyframes".

[0029] For example, as shown in Figure 2, the tactile signal (Channel 1) can be divided into a high-frequency band (e.g., a wave band) and a low-frequency band (e.g., a curve band). Exemplarily, keyframes are extracted from the low-frequency signal (e.g., the curve band) in Figure 2, and their content is analyzed in the time domain. Keyframes may also be extracted using a local extremum extraction algorithm, which extracts the time and amplitude of the extremum points, and then a keyframe list is constructed to describe the effect, with each encoded point among the extremum points being used as a keyframe.

[0030] Tables 1 through 5 show the definitions of syntax and semantics included in the effects and keyframes for different types of haptic bands.

[0031] [Table 1]

[0032] Here, the syntax of readEffect() shows the syntax rules for readEffect(). Id represents the effect's ID. The `effectType` parameter indicates the type of effect. `effectPosition` represents the effect position of the packet timestamp relative to the time data.

[0033] [Table 2]

[0034] Here, the syntax of readEffectBasis() shows the syntax rules for readEffectBasis(). `keyframesCount` represents the number of keyframes in the packet that currently belong to the effect.

[0035] [Table 3]

[0036] [Table 4]

[0037] Here, the syntax of readKeyframe() shows the syntax rules for readKeyframe(). The syntax of readTransientKeyframe() shows the syntax rules for readTransientKeyframe(). The amplitude represents the amplitude of the keyframe. `position` represents the keyframe position relative to the effect position. The frequency represents the keyframe frequency.

[0038] [Table 5]

[0039] Here, the syntax of readCurveKeyframe() shows the syntax rules for readCurveKeyframe(). The amplitude represents the amplitude of the keyframe. `position` represents the keyframe position relative to the effect position.

[0040] In conventional technology, when encoding the position information of effect keyframes, the keyframe position is encoded relative to the effect position, resulting in significant data redundancy and low encoding efficiency. The embodiments of this application provide a method for encoding tactile data, a method for decoding tactile data, and related devices that can solve the problem of low encoding efficiency.

[0041] Next, with reference to the drawings, the tactile data encoding method, tactile data decoding method, and related devices provided by the embodiments of this application will be described in detail by referring to several embodiments and their application scenarios.

[0042] Referring to Figure 3, which is a flowchart of a method for encoding tactile data applicable to the encoding side, provided by an embodiment of the present application, the method for encoding tactile data includes the following steps, as shown in Figure 3.

[0043] In step 101, the position of each of the multiple keyframes of the effect in the haptic data is obtained, and the multiple keyframes include a first target keyframe and a second target keyframe located before the first target keyframe.

[0044] Tactile data is also called tactile signals. Tactile data includes multiple effects. Exemplarily, these multiple keyframes may be represented as a keyframe list containing multiple keyframes.

[0045] Furthermore, the position of a keyframe may also refer to the time information within the keyframe effect.

[0046] In step 102, the encoded position information of the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe.

[0047] The first target keyframe may be any keyframe other than the third target keyframe among the plurality of keyframes, and the third target keyframe is the first keyframe of the effect. For example, the first target keyframe may be any one of the plurality of keyframes other than the third target keyframe.

[0048] Furthermore, the second target keyframe may be the keyframe immediately preceding the first target keyframe among the plurality of keyframes. Alternatively, the second target keyframe may be any one of the keyframes preceding the first target keyframe among the plurality of keyframes. For example, if the current plurality of keyframes in the effect contain N keyframes and the first target keyframe is the m-th keyframe, the second target keyframe may be any one of the keyframes from the 1st keyframe to the (m-1)th keyframe, where m is an integer greater than 1 and less than N, and N is a positive integer.

[0049] In one embodiment, the number of keyframes included in a plurality of keyframes of an effect is N, the first target keyframe is the mth keyframe, the second target keyframe is the mnth keyframe, and n is an integer between 1 and m-1. The method may further include the step of encoding the position information of the first n keyframes of the effect to obtain a third encoding result, and the encoding result of the haptic data further includes the third encoding result.

[0050] Furthermore, the encoded position information of the first target keyframe may be the difference between the position of the first target keyframe and the position of the second target keyframe, or the difference between the position of the second target keyframe and the position of the first target keyframe, or a value calculated by a preset algorithm from the difference between the position of the first target keyframe and the position of the second target keyframe, or a value calculated by a preset algorithm from the difference between the position of the second target keyframe and the position of the first target keyframe, but this embodiment is not particularly limited. The encoded position information of the first target keyframe may be considered as relative position information of the position of the first target keyframe with respect to the position of the second target keyframe. For time-series effects, position information is time information, and the encoded position information of the first target keyframe may be the difference between the time position of the first target keyframe and the time position of the second target keyframe. For example, the encoded position information of the first target keyframe may be the difference between the time position of the first target keyframe and the time position of the second target keyframe, or the difference between the time position of the second target keyframe and the time position of the first target keyframe, but this embodiment is not particularly limited to this.

[0051] Furthermore, the encoded position information of the first target keyframe may be used as the position information of the first target keyframe.

[0052] In step 103, the encoded position information of the first target keyframe is encoded to obtain the first encoded result. The encoding result of the tactile data includes the first encoding result.

[0053] The encoded result of the tactile data may further be called the code stream of the tactile data.

[0054] Alternatively, the first number of bits may be determined based on the encoded position information corresponding to the plurality of keyframes, and the encoded position information of the first target keyframe may be encoded using the first number of bits as the encoded number of bits to obtain a first encoding result. Or, the encoded position information of the first target keyframe may be encoded using a preset number of bits to obtain a first encoding result. For example, the preset number of bits may be 16, or it may be any other value, but this embodiment is not particularly limited thereto.

[0055] Currently, the position information of each keyframe in an effect is a value relative to the current effect position. This method of encoding position information results in significant data redundancy. In this embodiment of the present application, a method for encoding keyframe position information is provided. Compared to the prior art of MPEG encoding of the relative position between each keyframe and the effect position, this embodiment reduces the number of bits required to encode position information by encoding the relative value between each keyframe position and the position of the previous keyframe, thereby improving the compression efficiency of tactile signals. For example, if the effect position is 0s, then the position of the first keyframe of the effect and the effect position are also 0s, the position of the second keyframe is 5s, the position of the third keyframe is 15s, and the position of the fourth keyframe is 30s. When encoding the relative position between each keyframe and the effect position, the encoded position information corresponding to the second to fourth keyframes will be 5, 15, and 30, respectively. Using the technical means described in this embodiment, and taking the case where the relative value between each keyframe position and the immediately preceding keyframe position is encoded, the encoded position information corresponding to the second to fourth keyframes becomes 5, 10, and 15, respectively. The encoded position information is significantly smaller, reducing the number of bits required to encode the position information, thereby reducing data redundancy and improving the compression efficiency of haptic data.

[0056] In the embodiment of this application, the positions of each of a plurality of keyframes of an effect in haptic data are obtained, the plurality of keyframes include a first target keyframe and a second target keyframe located before the first target keyframe, the encoded position information of the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe, the encoded position information of the first target keyframe is encoded to obtain a first encoding result, and the encoding result of the haptic data includes the first encoding result. By encoding the encoded position information of the first target keyframe determined based on the difference between the position of the first target keyframe and the position of the second target keyframe in this way, data redundancy can be reduced and the encoding efficiency can be improved compared to encoding the encoded position information between the keyframe position and the effect position.

[0057] Selectively, the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe.

[0058] The second target keyframe may be the keyframe preceding the first target keyframe. For example, if the first target keyframe is the m-th keyframe, the second target keyframe may be the (m-1)th keyframe.

[0059] In this embodiment, the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe. By encoding the relative value between the keyframe position and the position of the previous keyframe, data redundancy can be further reduced and encoding efficiency can be improved.

[0060] After the step of selectively determining the encoded position information of the first target keyframe, the method, The process further includes determining the number of first bits based on the encoded position information corresponding to each of the plurality of keyframes, The step of encoding the encoded position information of the first target keyframe and obtaining the first encoding result is: The process includes the step of encoding the encoded position information of the first target keyframe using the first number of bit digits as the number of encoded bit digits, and obtaining a first encoding result.

[0061] The maximum value among the encoded position information corresponding to the plurality of keyframes may be determined, and the number of encoded bit digits required for the maximum value may be determined as the first bit digit, or the maximum value among the encoded position information corresponding to the plurality of keyframes may be determined, and the sum of the number of encoded bit digits required for the maximum value and the preset number of digits may be determined as the first bit digit. The preset number of digits may be 1, 2, 3, etc., but in this embodiment, the number of preset digits is not particularly limited.

[0062] Taking the case where the number of first bits is 15 as an example, the number of bits in the first encoded result obtained by encoding the encoded position information of the first target keyframe using the number of first bits is 15.

[0063] In conventional MPEG technology, keyframe position information is encoded using a fixed 16 bits. However, in this embodiment, instead of using a fixed 16 bits for each effect, the number of bits required to encode the corresponding keyframe position information is obtained, allowing for the adaptive allocation of a more appropriate number of encoding bits.

[0064] In this embodiment, the first number of bits is determined based on the encoded position information corresponding to each of the plurality of keyframes, and the encoded position information of the first target keyframe is encoded using the first number of bits as the encoding bit number to obtain a first encoding result. In this way, the number of bits required to encode the keyframe position information corresponding to each effect is obtained, so an appropriate number of encoding bits can be adaptively allocated compared to encoding with a fixed number of bits for all effects, further reducing data redundancy and improving encoding efficiency.

[0065] The step of selectively determining the number of first bits is: The steps include determining the maximum value of encoded position information corresponding to the plurality of keyframes, The step includes determining the number of encoded bit digits required for the maximum value as the first bit digit.

[0066] The encoded position information corresponding to all of the multiple keyframes may be calculated, and the number of encoded bits required for the maximum value of the encoded position information may be determined as the first number of bits. Alternatively, the encoded position information corresponding to the remaining keyframes of the multiple keyframes, excluding the first keyframe, may be calculated, and the number of encoded bits required for the maximum value of the encoded position information may be determined as the first number of bits. For example, if the multiple keyframes include the first to fourth keyframes, and the encoded position information corresponding to the second to fourth keyframes is 5, 10, and 15, respectively, then the maximum value of the encoded position information is 15, the first number of bits is the number of encoded bits required for the maximum value, and the first number of bits is 4.

[0067] In one embodiment, the number of bits B required to encode the maximum value among the encoded position information K It is calculated using the following formula.

[0068]

number

[0069] In this embodiment, the maximum value of the encoded position information corresponding to the plurality of keyframes is determined, and the number of encoded bits required for the maximum value is determined as the first number of bits. This makes the determined first number of bits the minimum value that satisfies the encoding of the encoded position information, and allows the number of encoded bits to be adaptively allocated to each effect.

[0070] Selectively, the encoding result of the tactile data further includes the number of first bits.

[0071] The first bit digit may be written to the code stream as metadata. For example, the first bit digit may be written to the Haptic Effect data structure, for example, to readEffect() or readEffectBasis(), or to another location, but this embodiment is not particularly limited.

[0072] In this embodiment, the encoding result of the tactile data further includes the first bit digit number, the first bit digit number being the encoding bit digit number for encoding the encoding position information of the first target keyframe, and thereby the decoding side can decode the first encoding result from the encoding result of the tactile data using the first bit digit number included in the encoding result of the tactile data and obtain the encoding position information of the first target keyframe.

[0073] Selectively, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, and the third target keyframe is the first keyframe of the effect. The aforementioned method, The process further includes the step of encoding the encoded position information of the third target keyframe and obtaining a second encoding result, The encoding result of the tactile data further includes the second encoding result.

[0074] In this embodiment, the third target keyframe is the first keyframe of the effect, the encoded position information of the third target keyframe is encoded to obtain a second encoding result, and the encoding result of the tactile data further includes the second encoding result. As a result, the decoding side can obtain the encoded position information of the first keyframe of the effect by decoding the second encoding result, and calculate the position of each keyframe using the encoded position information of the first keyframe and the encoded position information corresponding to each keyframe.

[0075] The step of selectively encoding the encoded position information of the third target keyframe and obtaining a second encoding result is: If the position of the third target keyframe and the effect position of the effect are the same, the second encoding result is determined to be a preset value, or If the position of the third target keyframe and the effect position of the effect are different, the method includes the step of encoding the encoded position information of the third target keyframe based on the preset encoding bit digits to obtain the second encoding result.

[0076] If the position of the third target keyframe and the effect position of the effect are the same, a preset value (e.g., 0 or 1) may be determined as the encoded position information of the third target keyframe. The encoded position information of the third target keyframe is encoded with 1 bit to obtain the second encoding result, and the second encoding result is the preset value.

[0077] Furthermore, the number of preset encoding bits may be 16, or it may be other values ​​such as 20 or 25, but this embodiment is not particularly limited to this.

[0078] Furthermore, the encoded position information of the third target keyframe may be determined based on the difference between the position of the third target keyframe and the effect position of the effect. For example, the encoded position information of the third target keyframe may be the difference between the position of the third target keyframe and the effect position of the effect, or the difference between the effect position of the effect and the position of the third target keyframe, or the value calculated by a preset algorithm from the difference between the position of the third target keyframe and the effect position of the effect, or the value calculated by a preset algorithm from the difference between the effect position of the effect and the position of the third target keyframe, but this embodiment is not particularly limited to these.

[0079] In this embodiment, if the position of the third target keyframe and the effect position of the effect are the same, the second encoding result is determined to be a preset value. Alternatively, if the position of the third target keyframe and the effect position of the effect are different, the encoding position information of the third target keyframe is encoded based on the preset encoding bit digits to obtain a second encoding result. This makes it possible to encode the position of the first keyframe of the effect.

[0080] Selectively, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, the third target keyframe is the first keyframe of the effect, and the first bit digit is determined based on the encoded position information corresponding to the keyframe among the plurality of keyframes other than the third target keyframe. The step of encoding the encoded position information of the first target keyframe using the first number of bit digits as the number of encoded bit digits and obtaining the first encoding result is: If the position of the third target keyframe and the effect position of the effect are different, the steps include determining the number of second bits representing the number of encoded bits required to encode the encoded position information of the third target keyframe, If the number of second bits is greater than the number of first bits, the step of updating the number of first bits to the number of second bits, The process includes the step of encoding the encoded position information of the first target keyframe using the updated first bit digit as the encoded bit digit, and obtaining a first encoding result.

[0081] If the second bit number is greater than the first bit number, the first bit number is updated to the value of the second bit number. If the second bit number is less than or equal to the first bit number, the first bit number is maintained, and the maximum value of either the first bit number or the second bit number may be used as the updated first bit number.

[0082] For example, the number of 2 bits can be calculated using the following formula.

[0083]

number

[0084] Alternatively, the maximum value of the encoded position information corresponding to a keyframe other than the third target keyframe among the plurality of keyframes may be determined, and the number of encoded bits required for that maximum value may be determined as the first number of bits.

[0085] In this embodiment, a second number of bits is determined, representing the number of encoding bits required to encode the encoded position information of the third target keyframe. If the second number of bits is greater than the first number of bits, the first number of bits is updated to the value of the second number of bits. With regard to encoding the encoded position information of the first target keyframe, by using the updated first number of bits as the encoding bit count, the decoding side can decode the positions of all keyframes of the same effect using the same decoding bit count, thus making decoding more efficient.

[0086] Selectively, the above method, The process further includes the step of encoding the encoded position information of the third target keyframe using the updated first bit digit as the encoded bit digit, and obtaining a second encoding result. The encoding result of the tactile data further includes the second encoding result.

[0087] In this embodiment, by setting the updated first bit digit as the encoding bit digit for both the encoding of the encoded position information of the first target keyframe and the encoded position information of the third target keyframe, the decoding side can decode the positions of all keyframes of the same effect using the same decoding bit digit, thus making decoding more efficient.

[0088] If, selectively, different keyframes of the effect are located in the first and second packets, respectively, and the keyframe preceding the fourth target keyframe is located in the first packet, then the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the start time position of the second packet, or the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the effect position of the effect. The fourth target keyframe is the first keyframe of the second packet, and the first target keyframe is a keyframe among the plurality of keyframes other than the fourth target keyframe.

[0089] In one embodiment, the method may further include the step of encoding the encoded position information of the fourth target keyframe to obtain a fourth encoding result. The encoding result of the tactile data further includes the fourth encoding result.

[0090] For example, when haptic data is packetized, Effect 3 is packetized into two packets (Packet 2 and Packet 3), as shown in Figure 4. In this case, for the first keyframe after time T3 of Effect 3 located in Packet 3 (i.e., the fourth target keyframe), the position information p' of the fourth target keyframe is obtained by one of the following methods. i You may calculate this.

[0091] Method 1, similar to the methods in steps 101 to 103, calculate the encoded position information of the fourth target keyframe, and p' i =pi -p i-1 is. In this case, p i-1 is the last frame of Effect 3 located in Packet 2.

[0092] Method 2, p' i = p i - t T3 is. T3 is the timestamp of Packet 3.

[0093] Method 3, p' i = p i - t e3 is. t e3 is the position (E Pk ) of Effect 3.

[0094] In this embodiment, when different key frames of the effect are respectively located in the first packet and the second packet, and the key frame before the fourth target key frame is located in the first packet, the encoded position information of the fourth target key frame is determined based on the difference value between the position of the fourth target key frame and the start time position of the second packet. Thereby, the decoding side can determine the position of the fourth target key frame based on the start time position of the second packet and the encoded position information of the fourth target key frame.

[0095] In this embodiment, when different key frames of the effect are respectively located in the first packet and the second packet, and the key frame before the fourth target key frame is located in the first packet, the encoded position information of the fourth target key frame is determined based on the difference value between the position of the fourth target key frame and the effect position of the effect. Thereby, the decoding side can determine the position of the fourth target key frame based on the start time position of the effect and the encoded position information of the fourth target key frame.

[0096] Optionally, the step of obtaining the position of each of the plurality of key frames of the effect in the tactile data is A step of obtaining a keyframe list of effects in haptic data, the step of the keyframe list including the positions of a plurality of keyframes arranged in chronological order.

[0097] Selectively, the keyframe list further includes keyframe labels corresponding to the keyframe positions.

[0098] The embodiments of this application are The present invention provides a method for encoding tactile data, further comprising the steps of encoding the encoded position information of a fourth target keyframe and obtaining a fourth encoding result, wherein the encoding result of the tactile data includes the fourth encoding result.

[0099] The aforementioned fourth target keyframe is one of several keyframes for the effect in the haptic data.

[0100] If different keyframes of the effect are located in the first and second packets, respectively, and the keyframe preceding the fourth target keyframe is located in the first packet, the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the start time position of the second packet, or the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the effect position of the effect.

[0101] The fourth target keyframe is the first keyframe of the second packet.

[0102] Referring to Figure 5, which is a flowchart of a method for decoding tactile data applicable to the decoding side, provided by an embodiment of the present application, the method for decoding tactile data includes the following steps, as shown in Figure 5.

[0103] In step 201, the first encoding result from the encoding results of the haptic data is decoded to obtain the encoded position information of the first target keyframe. The encoded position information corresponding to the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe, wherein the first target keyframe and the second target keyframe are keyframes among a plurality of keyframes of the effect in the haptic data, and the second target keyframe is a keyframe located before the first target keyframe.

[0104] In step 202, the position of the first target keyframe is determined based on the encoded position information of the first target keyframe.

[0105] Selectively, the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe.

[0106] The step of selectively decoding a first encoded result from the encoded results of tactile data and obtaining encoded position information of a first target keyframe is as follows: The process includes the step of decoding a first encoded result from the encoded results of tactile data based on the first bit digit, and obtaining encoded position information of a first target keyframe. The first bit digit is the number of encoding bits for encoding the encoded position information of the first target keyframe.

[0107] Selectively, the encoding result of the tactile data further includes the first bit digit, the first bit digit being determined based on the encoded position information corresponding to each of the plurality of keyframes.

[0108] Selectively, the first bit digit is the number of encoding bits required for the maximum value of the encoding position information corresponding to the plurality of keyframes.

[0109] Selectively, the encoding result of the tactile data further includes a second encoding result, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, the third target keyframe is the first keyframe of the effect, and the method is The process further includes determining the position of the third target keyframe based on the second encoding result.

[0110] The step of selectively determining the position of the third target keyframe based on the second encoding result is: If the second encoding result is a preset value, the step of determining that the position of the third target keyframe is the same as the effect position of the effect, or If the second encoding result is not the preset value, the process includes the steps of decoding the second encoding result based on the preset encoding bit digits to obtain encoded position information of the third target keyframe, and determining the position of the third target keyframe based on the encoded position information of the third target keyframe.

[0111] This embodiment is a decoding side embodiment corresponding to the embodiment shown in Figure 3. For specific details of this embodiment, please refer to the related explanation in the embodiment shown in Figure 3. To avoid repetition in the explanation, this embodiment will not repeat the same details, and similar advantageous effects can be obtained.

[0112] The methods for encoding and decoding tactile data according to the embodiments of this application will be described below with reference to two specific examples.

[0113] Example 1 On the encoding side, the method for encoding tactile data may include the following steps.

[0114] In step 11, obtain the current keyframe list for the effect.

[0115] In step 12, the difference between the position of each keyframe other than the first keyframe in the keyframe list and the position of the previous keyframe (the difference being greater than zero) is calculated sequentially to obtain the maximum difference, and the number of bits B required to encode the maximum difference is determined. K This is calculated using the following formula.

[0116]

number

[0117] In step 13, the number of bits B required to encode the keyframe position information corresponding to the current effect K Write this as metadata to the code stream. Note that B K You may write it to the Haptic Effect data structure, for example, to readEffect() or readEffectBasis(), or to another location, but there are no particular limitations here.

[0118] In step 14, the position information p'0 of the first keyframe is encoded and written to the code stream. The position information p'0 of the first keyframe is the first keyframe position p0 and the current effect position information E pk It is the relative value (i.e., the difference) of .

[0119] Depending on the actual packetization method of the haptic data code stream, the position of the first keyframe in the current effect may or may not be the same as the current effect position. Therefore, the position information of the first keyframe may be encoded in several ways, but is not particularly limited here.

[0120] Method 1: If the first keyframe position and the current effect position are the same, p'0 is 0, and p'0 is encoded by 1 bit.

[0121] Method 2: If the first keyframe position and the current effect position are different, encode p'0 using 16 bits as defined by conventional MPEG technology.

[0122] Method 3: If the first keyframe position and the current effect position are different, first determine the number of bits B0 required for encoding p'0. k This is calculated using the following formula.

[0123]

number

[0124] And, B0 k B calculated in step 12 k Compared with B0 k B k If it is greater than B k to B0 k Updated to p'0 and p' i Number of bits after update: B k Encoded by B0. k B k If it is smaller than B k Maintain p'0 and p' i to B k Encoded by:

[0125] In step 15, the number of bits B determined in step 12 k The position information p' of each keyframe other than the first keyframe is obtained by this process. i Encode the encoded position information (i.e., the encoded position information corresponding to each keyframe) and write it to the code stream. The said keyframe position information is the difference between the current keyframe position and the previous keyframe position, i.e., p' i =p i -p i-1 And i > 0.

[0126] Example 2 On the decoding side, the method for decoding tactile data may include the following steps.

[0127] In step 21, the number of bits B required for encoding the keyframe position information of the effect is currently k Obtain it.

[0128] In step 22, the current effect position information Ep k The position information p'0 of the first keyframe of the current effect is obtained, and the position p0 of the first keyframe is calculated using the following formula.

[0129]

number

[0130] In step 23, the number of bits B obtained in step 21 is used. k This calculates the difference p' between the position of each keyframe other than the first keyframe and the position of the previous keyframe. i The data is decoded, and the position p0 of each keyframe is calculated using the following formula.

[0131]

number

[0132] This embodiment reduces the number of bits required to encode positional information by encoding the relative value between each keyframe position and the previous keyframe position. Furthermore, it obtains the number of bits required to encode the corresponding key position information for each effect and adaptively allocates an appropriate number of encoding bits, thereby reducing data redundancy and improving encoding efficiency.

[0133] Furthermore, the tactile data encoding method provided by the embodiments of this application may be implemented by a tactile data encoding device or a control module for executing the tactile data encoding method in the tactile data encoding device. In the embodiments of this application, the tactile data encoding device provided by the embodiments of this application will be described as an example of a case in which the tactile data encoding method is executed by the tactile data encoding device.

[0134] Referring to Figure 6, which is a structural diagram of a tactile data encoding device provided by an embodiment of the present application, as shown in Figure 6, the tactile data encoding device 300 is An acquisition module 301 for obtaining the position of each of multiple keyframes of an effect in haptic data, wherein the multiple keyframes include a first target keyframe and a second target keyframe located before the first target keyframe, A first determination module 302 for determining the encoded position information of the first target keyframe based on the difference between the position of the first target keyframe and the position of the second target keyframe, The system includes a first encoding module 303 for encoding the encoded position information of the first target keyframe and obtaining a first encoding result, The encoding result of the tactile data includes the first encoding result.

[0135] Selectively, the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe.

[0136] Selectively, the apparatus, The system further includes a second determination module for determining the number of first-bit digits based on the encoded position information corresponding to each of the aforementioned multiple keyframes.

[0137] The first encoding module specifically, The encoded position information of the first target keyframe is encoded using the first bit digit as the encoded bit digit, and a first encoded result is obtained.

[0138] Selectively, the second decision module specifically, Determine the maximum value of the encoded position information corresponding to the plurality of keyframes, The number of encoded bits required for the maximum value is determined as the first bit digit.

[0139] Selectively, the encoding result of the tactile data further includes the number of first bits.

[0140] Selectively, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, and the third target keyframe is the first keyframe of the effect. The aforementioned device is The system further comprises a second encoding module for encoding the encoded position information of the third target keyframe and obtaining a second encoding result, The encoding result of the tactile data further includes the second encoding result.

[0141] Selectively, the second coding module specifically, If the position of the third target keyframe and the effect position of the effect are the same, the second encoding result is determined to be a preset value, or If the position of the third target keyframe and the effect position of the effect are different, the encoded position information of the third target keyframe is encoded based on the preset encoding bit digits to obtain the second encoding result.

[0142] Selectively, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, the third target keyframe is the first keyframe of the effect, and the first bit digit is determined based on the encoded position information corresponding to the keyframe among the plurality of keyframes other than the third target keyframe. The first encoding module specifically, If the position of the third target keyframe and the effect position of the effect are different, the second bit digit representing the number of encoding bits required to encode the encoded position information of the third target keyframe is determined. If the number of the second bit digits is greater than the number of the first bit digits, the number of the first bit digits is updated to the number of the second bit digits. The updated number of first bits is used as the number of encoded bits to encode the encoded position information of the first target keyframe, and the first encoded result is obtained.

[0143] Selectively, the apparatus, The system further comprises a third encoding module for encoding the encoded position information of the third target keyframe using the updated first bit digit as the encoded bit digit, and obtaining a second encoding result. The encoding result of the tactile data further includes the second encoding result.

[0144] If, selectively, different keyframes of the effect are located in the first and second packets, respectively, and the keyframe preceding the fourth target keyframe is located in the first packet, then the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the start time position of the second packet, or the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the effect position of the effect. The fourth target keyframe is the first keyframe of the second packet, and the first target keyframe is a keyframe among the plurality of keyframes other than the fourth target keyframe.

[0145] Selectively, the acquisition module specifically, The system obtains a keyframe list for the effect in the haptic data, and the keyframe list includes the positions of multiple keyframes arranged in chronological order.

[0146] The tactile data encoding device in the embodiments of this application may be a device or electronic device having an operating system, or it may be a component, integrated circuit, or chip in a terminal. The device or electronic device may be a mobile terminal or a non-mobile terminal. Exemplary examples include, but are not limited to, the types of terminals listed above. Non-mobile terminals may be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, automated machines, etc., but are not specifically limited in the embodiments of this application.

[0147] The tactile data encoding device provided by the embodiment of this application can implement each step realized by the embodiment of the method shown in Figure 3 and achieve similar technical effects; therefore, to avoid duplication, it will not be repeated here.

[0148] The tactile data decoding method provided by the embodiments of this application may be implemented by a tactile data decoding device or a control module for executing the tactile data decoding method in the tactile data decoding device. In the embodiments of this application, the tactile data decoding device provided by the embodiments of this application will be described as an example of a case in which the tactile data decoding method is executed by the tactile data decoding device.

[0149] Referring to Figure 7, which is a structural diagram of a tactile data decoding device provided by an embodiment of the present application, as shown in Figure 7, the tactile data decoding device 400 is A decoding module 401 for decoding a first encoding result from the encoding results of haptic data and obtaining encoded position information of a first target keyframe, wherein the encoded position information corresponding to the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe, the first target keyframe and the second target keyframe are keyframes among a plurality of keyframes of an effect in the haptic data, and the second target keyframe is a keyframe located before the first target keyframe, The system includes a first determination module 402 for determining the position of the first target keyframe based on the encoded position information of the first target keyframe.

[0150] Selectively, the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe.

[0151] Selectively, the decoding module specifically, Based on the number of bits in the first bit, the first encoded result of the tactile data is decoded to obtain the encoded position information of the first target keyframe. The first bit digit is the number of encoding bits for encoding the encoded position information of the first target keyframe.

[0152] Selectively, the encoding result of the tactile data further includes the first bit digit, the first bit digit being determined based on the encoded position information corresponding to each of the plurality of keyframes.

[0153] Selectively, the first bit digit is the number of encoding bits required for the maximum value of the encoding position information corresponding to the plurality of keyframes.

[0154] Selectively, the encoding result of the tactile data further includes a second encoding result, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, the third target keyframe is the first keyframe of the effect, and the device, The system further comprises a second determination module for determining the position of the third target keyframe based on the second encoding result.

[0155] Selectively, the second decision module specifically, If the second encoding result is a preset value, it is determined that the position of the third target keyframe is the same as the effect position of the effect, or If the second encoding result is not the preset value, the second encoding result is decoded based on the preset encoding bit digits to obtain the encoded position information of the third target keyframe, and the position of the third target keyframe is determined based on the encoded position information of the third target keyframe.

[0156] The tactile data decoding device in the embodiments of this application may be a device or electronic device having an operating system, or it may be a component, integrated circuit, or chip in a terminal. The device or electronic device may be a mobile terminal or a non-mobile terminal. Exemplary examples include, but are not limited to, the types of terminals listed above. Non-mobile terminals may be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, automated machines, etc., but are not specifically limited in the embodiments of this application.

[0157] The tactile data decoding device provided by the embodiment of this application can implement each step realized by the embodiment of the method shown in Figure 5 and achieve similar technical effects; therefore, to avoid duplication, it will not be repeated here.

[0158] Selectively, as shown in Figure 8, embodiments of this application further provide a communication device 500. The communication device 500 comprises a processor 501 and a memory 502, the memory 502 storing a program or command executable by the processor 501, for example, if the communication device 500 is an encoding device, the program or command executed by the processor 501 can realize each step of the embodiment of the tactile data encoding method and achieve similar technical effects. If the communication device 500 is a decoding device, the program or command executed by the processor 501 can realize each step of the embodiment of the tactile data decoding method and achieve similar technical effects. To avoid duplication, this will not be repeated here.

[0159] Embodiments of this application further provide a terminal, the terminal comprising a processor and a communication interface, the processor obtaining the position of each of a plurality of keyframes of an effect in haptic data, the plurality of keyframes comprising a first target keyframe and a second target keyframe located before the first target keyframe, determining encoded position information of the first target keyframe based on the difference between the position of the first target keyframe and the position of the second target keyframe, encoding the encoded position information of the first target keyframe to obtain a first encoding result, the encoding result of the haptic data comprising the first encoding result. Alternatively, the processor decodes a first encoding result from the encoding results of the haptic data to obtain encoded position information of a first target keyframe. The encoded position information corresponding to the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe. The first target keyframe and the second target keyframe are keyframes among a plurality of keyframes of an effect in the haptic data, the second target keyframe is a keyframe located before the first target keyframe, and the position of the first target keyframe is determined based on the encoded position information of the first target keyframe. The terminal embodiment corresponds to the embodiment of the haptic data encoding method or haptic data decoding method described above, and each implementation procedure and implementation method of the embodiment of the haptic data encoding method or haptic data decoding method is applicable to the terminal embodiment and can achieve similar technical effects. Specifically, Figure 9 is a schematic diagram of the hardware structure for realizing the terminal of the embodiment of this application.

[0160] The terminal 600 includes, but is not limited to, at least some of the following components: a high-frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610.

[0161] As engineers in this field will know, terminal 600 may also be equipped with a power supply (e.g., a battery) to power each component. The power supply is logically connected to processor 610 by a power management system, which enables functions such as charge / discharge management and power consumption management. The terminal structure shown in Figure 9 is not intended to limit the terminal, and the terminal may include more or fewer components than shown, or combinations of some components, or different component configurations, which will not be repeated here.

[0162] In the embodiments of this application, the input unit 604 may include a graphics processing unit (GPU) 6041 that processes static image or video image data acquired by an image capture device (e.g., a camera) in video capture mode or image capture mode, and a microphone 6042. The display unit 606 may include a display panel 6061, which may be set as a liquid crystal display, an organic light-emitting diode, etc. The user input unit 607 includes a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touchscreen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. The other input devices 6072 may include, but are not limited to, a physical keyboard, function buttons (e.g., volume control buttons, switch buttons, etc.), a trackball, a mouse, or an operating lever, and will not be repeated here.

[0163] In the embodiments of this application, the high-frequency unit 601 receives downlink data from network-side equipment and transmits it to the processor 610 for processing, and also transmits uplink data to network-side equipment. Typically, the high-frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transmitter / receiver, a coupler, a low-noise amplifier, a duplexer, and the like.

[0164] Memory 609 may be used to store software programs or commands and various data. Memory 609 may mainly include a first memory area for storing programs or commands and a second memory area for storing data. The first memory area may store an operating system, applications or commands necessary for at least one function (e.g., audio playback function, image playback function, etc.). Memory 609 may also include volatile memory or non-volatile memory, or it may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory. The volatile memory may be Random Access Memory (RAM), Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate synchronous DRAM (DDRSDRAM), Enhanced synchronous DRAM (ESDRAM), Synch-link DRAM (SLDRAM), or Direct Rambus RAM (DRRAM). The memory x09 in the embodiments of this application includes, but is not limited to, these and any other suitable memory.

[0165] The processor 610 may include one or more processing units. Selectively, the processor 610 may integrate an application processor that primarily processes the operating system, user interface, and applications or commands, and a modem processor such as a baseband processor that primarily processes wireless communication. Of course, the modem processor does not have to be integrated into the processor 610.

[0166] If the aforementioned terminal is the encoding terminal, The aforementioned processor 610 is The position of each of the multiple keyframes of the effect in the haptic data is obtained, and the multiple keyframes include a first target keyframe and a second target keyframe located before the first target keyframe. Based on the difference between the position of the first target keyframe and the position of the second target keyframe, the encoded position information of the first target keyframe is determined. The encoded position information of the first target keyframe is encoded to obtain the first encoded result. The encoding result of the tactile data includes the first encoding result.

[0167] Selectively, the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe.

[0168] Selectively, the processor 610 further, Based on the encoded position information corresponding to each of the aforementioned multiple keyframes, the number of first bits is determined. The encoded position information of the first target keyframe is encoded using the first bit digit as the encoded bit digit, and a first encoded result is obtained.

[0169] Selectively, the processor 610 specifically, Determine the maximum value of the encoded position information corresponding to the plurality of keyframes, The number of encoded bits required for the maximum value is determined as the first bit digit.

[0170] Selectively, the encoding result of the tactile data further includes the number of first bits.

[0171] Selectively, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, and the third target keyframe is the first keyframe of the effect. The processor 610 further, The encoded position information of the third target keyframe is encoded to obtain the second encoded result. The encoding result of the tactile data further includes the second encoding result.

[0172] Selectively, the processor 610 specifically, If the position of the third target keyframe and the effect position of the effect are the same, the second encoding result is determined to be a preset value, or If the position of the third target keyframe and the effect position of the effect are different, the encoded position information of the third target keyframe is encoded based on the preset encoding bit digits to obtain the second encoding result.

[0173] Selectively, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, the third target keyframe is the first keyframe of the effect, and the first bit digit is determined based on the encoded position information corresponding to the keyframe among the plurality of keyframes other than the third target keyframe. The processor 610, specifically, If the position of the third target keyframe and the effect position of the effect are different, the second bit digit representing the number of encoding bits required to encode the encoded position information of the third target keyframe is determined. If the number of the second bit digits is greater than the number of the first bit digits, the number of the first bit digits is updated to the number of the second bit digits. The updated number of first bits is used as the number of encoded bits to encode the encoded position information of the first target keyframe, and the first encoded result is obtained.

[0174] Selectively, the processor 610 further, The updated number of first bits is used as the number of encoded bits to encode the encoded position information of the third target keyframe, and a second encoding result is obtained. The encoding result of the tactile data further includes the second encoding result.

[0175] If, selectively, different keyframes of the effect are located in the first and second packets, respectively, and the keyframe preceding the fourth target keyframe is located in the first packet, then the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the start time position of the second packet, or the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the effect position of the effect. The fourth target keyframe is the first keyframe of the second packet, and the first target keyframe is a keyframe among the plurality of keyframes other than the fourth target keyframe.

[0176] Selectively, the processor 610 specifically, The system obtains a keyframe list for the effect in the haptic data, and the keyframe list includes the positions of multiple keyframes arranged in chronological order.

[0177] If the aforementioned terminal is the decryption terminal, The aforementioned processor 610 is The first encoded result from the encoded haptic data is decoded to obtain encoded position information of the first target keyframe, the encoded position information corresponding to the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe, the first target keyframe and the second target keyframe are keyframes among a plurality of keyframes of the effect in the haptic data, and the second target keyframe is a keyframe located before the first target keyframe. Based on the encoded position information of the first target keyframe, the position of the first target keyframe is determined.

[0178] Selectively, the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe.

[0179] Selectively, the processor 610 further, Based on the number of bits in the first bit, the first encoded result of the tactile data is decoded to obtain the encoded position information of the first target keyframe. The first bit digit is the number of encoding bits for encoding the encoded position information of the first target keyframe.

[0180] Selectively, the encoding result of the tactile data further includes the first bit digit, the first bit digit being determined based on the encoded position information corresponding to each of the plurality of keyframes.

[0181] Selectively, the first bit digit is the number of encoding bits required for the maximum value of the encoding position information corresponding to the plurality of keyframes.

[0182] Selectively, the encoding result of the tactile data further includes a second encoding result, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, the third target keyframe is the first keyframe of the effect, and the processor 610 further, Based on the second encoding result, the position of the third target keyframe is determined.

[0183] Selectively, the processor 610 specifically, If the second encoding result is a preset value, it is determined that the position of the third target keyframe is the same as the effect position of the effect, or If the second encoding result is not the preset value, the second encoding result is decoded based on the preset encoding bit digits to obtain the encoded position information of the third target keyframe, and the position of the third target keyframe is determined based on the encoded position information of the third target keyframe.

[0184] Specifically, the terminal of the embodiment of this application further includes commands or programs stored in memory 609 and executable by processor 610, and the processor 610 can call the commands or programs in memory 609 and perform the same actions as those performed in each module shown in Figure 6 or Figure 7, thereby achieving similar technical effects; therefore, to avoid duplication, they will not be repeated here.

[0185] Embodiments of this application further provide a readable storage medium. When a program or command is stored in the readable storage medium and the program or command is executed by a processor, each step of the embodiment of the tactile data encoding method is realized, or when the program or command is executed by a processor, each step of the embodiment of the tactile data decoding method is realized, and similar technical effects can be achieved. Therefore, to avoid duplication, these will not be repeated here.

[0186] The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks, optical disks, etc. In some examples, the readable storage medium may be a non-temporary readable storage medium.

[0187] Embodiments of this application further provide a chip. The chip includes a processor and a communication interface, and the communication interface and the processor are coupled, and the processor can implement each step of the embodiment of the haptic data encoding method or each step of the embodiment of the haptic data decoding method by executing a program or command, thereby achieving similar technical effects. Therefore, to avoid duplication, it will not be repeated here.

[0188] The chip described in the embodiments of this application is also called a system-on-a-chip, system chip, chip system, or SoC, etc.

[0189] Embodiments of this application further provide computer programs / program products. These computer programs / program products are stored in a storage medium, and when the computer programs / program products are executed by at least one processor, each step of the embodiment of the tactile data encoding method or tactile data decoding method described above can be realized, and similar technical effects can be achieved. Therefore, to avoid duplication, they will not be repeated here.

[0190] Embodiments of this application further provide an encoding / decoding system including an encoding device and a decoding device. The encoding device is capable of performing the steps of the above-described method for encoding tactile data, and the decoding device is capable of performing the steps of the above-described method for decoding tactile data.

[0191] In this specification, the terms “including,” “consisting of,” or any other variation thereof are intended to include non-exclusive inclusion, so that a process, method, article, or apparatus containing a set of elements includes not only those elements but also other elements not explicitly stated, or elements specific to such process, method, article, or apparatus. Unless otherwise specified, an element limited by the phrase “including one…” does not preclude the existence of other identical elements in a process, method, article, or apparatus containing that element. Furthermore, the scope of the methods and apparatus in embodiments of this application is not limited to performing functions in the order shown or discussed herein, but may further include performing functions almost simultaneously or in the opposite order, depending on the relevant function. For example, the above methods may be performed in an order different from the order described, and further, each step may be added, omitted, or combined. Also, features described with reference to some examples may be combined with other examples.

[0192] As will be clearly understood by those skilled in the art from the above description of the embodiments, the methods of the above embodiments can be implemented by a combination of a computer software product and a necessary common hardware platform. Of course, they may also be implemented by hardware. The computer software product is stored in a storage medium (e.g., ROM, RAM, magnetic disk, optical disk, etc.) and includes a plurality of commands that cause a terminal or network-side device to execute the methods of each embodiment of this application.

[0193] Although embodiments of this application have been described above with reference to the drawings, this application is not limited to the above-described specific embodiments. The above-described specific embodiments are merely illustrative and not limiting. Many embodiments that a person skilled in the art could obtain based on the suggestions of this application without departing from the spirit of this application and the scope of protection of the claims are all within the scope of protection of this application.

Claims

1. A step of obtaining the position of each of a plurality of keyframes of an effect in haptic data, wherein the plurality of keyframes includes a first target keyframe and a second target keyframe located before the first target keyframe, The steps include determining the encoded position information of the first target keyframe based on the difference between the position of the first target keyframe and the position of the second target keyframe, The process includes the step of encoding the encoded position information of the first target keyframe and obtaining a first encoding result, The encoding result of the tactile data includes the first encoding result, A method for encoding tactile data.

2. The method according to claim 1, wherein the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe.

3. After the step of determining the encoded position information of the first target keyframe, The process further includes determining the number of first bits based on the encoded position information corresponding to each of the plurality of keyframes, The step of encoding the encoded position information of the first target keyframe and obtaining the first encoding result is: The method according to claim 1, comprising the step of encoding the encoded position information of the first target keyframe using the first number of bit digits as the number of encoded bit digits, and obtaining a first encoding result.

4. The step of determining the number of first bits is: The steps include determining the maximum value of encoded position information corresponding to the plurality of keyframes, The method according to claim 3, comprising the step of determining the number of encoded bit digits required for the maximum value as the first bit digit.

5. The method according to claim 3 or 4, wherein the encoding result of the tactile data further includes the number of first bits.

6. The first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, and the third target keyframe is the first keyframe of the effect. The aforementioned method, The process further includes the step of encoding the encoded position information of the third target keyframe and obtaining a second encoding result, The method according to any one of claims 1 to 5, wherein the encoding result of the tactile data further includes the second encoding result.

7. The step of encoding the encoded position information of the third target keyframe and obtaining the second encoding result is: If the position of the third target keyframe and the effect position of the effect are the same, the second encoding result is determined to be a preset value, or The method according to claim 6, further comprising the step of, if the position of the third target keyframe and the effect position of the effect are different, encoding the encoded position information of the third target keyframe based on the preset encoding bit digits to obtain the second encoding result.

8. The first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, the third target keyframe is the first keyframe of the effect, and the first bit digit is determined based on the encoded position information corresponding to the keyframe among the plurality of keyframes other than the third target keyframe. The step of encoding the encoded position information of the first target keyframe using the first number of bit digits as the number of encoded bit digits, and obtaining the first encoding result, If the position of the third target keyframe and the effect position of the effect are different, the steps include determining the number of second bits that represent the number of encoded bits required to encode the encoded position information of the third target keyframe, If the number of second bits is greater than the number of first bits, the step of updating the number of first bits to the number of second bits, The method according to claim 3, comprising the step of encoding the encoded position information of the first target keyframe using the updated first number of bit digits as the encoded number of bit digits, and obtaining a first encoding result.

9. The process further includes the step of encoding the encoded position information of the third target keyframe using the updated first number of bit digits as the encoded number of bit digits, and obtaining a second encoded result. The encoding result of the tactile data further includes the second encoding result, The method according to claim 8.

10. If different keyframes of the effect are located in the first and second packets, respectively, and the keyframe preceding the fourth target keyframe is located in the first packet, then the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the start time position of the second packet, or the encoded position information of the fourth target keyframe is determined based on the difference between the position of the fourth target keyframe and the effect position of the effect. The method according to any one of claims 1 to 9, wherein the fourth target keyframe is the first keyframe of the second packet, and the first target keyframe is a keyframe other than the fourth target keyframe among the plurality of keyframes.

11. The step of obtaining the position of each of the multiple keyframes of the effect in the haptic data is: The method according to any one of claims 1 to 10, comprising the step of obtaining a keyframe list of effects in haptic data, the keyframe list including the positions of a plurality of keyframes arranged in chronological order.

12. A step of decoding a first encoding result from the encoding results of haptic data to obtain encoded position information of a first target keyframe, wherein the encoded position information corresponding to the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe, the first target keyframe and the second target keyframe are keyframes among a plurality of keyframes of an effect in the haptic data, and the second target keyframe is a keyframe located before the first target keyframe, The steps include determining the position of the first target keyframe based on the encoded position information of the first target keyframe, A method for decoding tactile data, including the above.

13. The method according to claim 12, wherein the second target keyframe is located before the first target keyframe and is the keyframe closest to the first target keyframe.

14. The step of decoding the first encoded result from the encoded tactile data and obtaining encoded position information of the first target keyframe is as follows: The process includes the step of decoding a first encoded result from the encoded results of tactile data based on the first bit digit, and obtaining encoded position information of a first target keyframe. The method according to claim 12 or 13, wherein the first number of bits is the number of encoding bits for encoding the encoded position information of the first target keyframe.

15. The method according to claim 14, wherein the encoding result of the tactile data further includes the first bit digit, and the first bit digit is determined based on encoded position information corresponding to each of the plurality of keyframes.

16. The method according to claim 14 or 15, wherein the first number of bits is the number of encoded bits required for the maximum value of encoded position information corresponding to the plurality of keyframes.

17. The encoding result of the tactile data further includes a second encoding result, the first target keyframe is a keyframe among the plurality of keyframes other than the third target keyframe, the third target keyframe is the first keyframe of the effect, and the method is The method according to any one of claims 12 to 16, further comprising the step of determining the position of the third target keyframe based on the second encoding result.

18. The step of determining the position of the third target keyframe based on the second encoding result is: If the second encoding result is a preset value, the step of determining that the position of the third target keyframe is the same as the effect position of the effect, or The method according to claim 17, comprising the steps of: if the second encoding result is not the preset value, decoding the second encoding result based on the preset encoding bit digits to obtain encoded position information of the third target keyframe; and determining the position of the third target keyframe based on the encoded position information of the third target keyframe.

19. An acquisition module for obtaining the position of each of multiple keyframes of an effect in haptic data, wherein the multiple keyframes include a first target keyframe and a second target keyframe located before the first target keyframe, A first determination module for determining the encoded position information of the first target keyframe based on the difference between the position of the first target keyframe and the position of the second target keyframe, The system comprises a first encoding module for encoding the encoded position information of the first target keyframe and obtaining a first encoding result, The encoding result of the tactile data includes the first encoding result, A device for encoding tactile data.

20. A decoding module for decoding a first encoding result from the encoding results of haptic data and obtaining encoded position information of a first target keyframe, wherein the encoded position information corresponding to the first target keyframe is determined based on the difference between the position of the first target keyframe and the position of the second target keyframe, the first target keyframe and the second target keyframe are keyframes among a plurality of keyframes of an effect in the haptic data, and the second target keyframe is a keyframe located before the first target keyframe, The system comprises a first determination module for determining the position of the first target keyframe based on the encoded position information of the first target keyframe, A device for decoding tactile data.

21. A terminal comprising a processor, memory, and a program or command stored in the memory and executable by the processor, wherein when the program or command is executed by the processor, it realizes a step of the tactile data encoding method described in any one of claims 1 to 11, or when the program or command is executed by the processor, it realizes a step of the tactile data decoding method described in any one of claims 12 to 18.

22. A readable storage medium in which a program or command is stored, wherein when the program or command is executed by a processor, it realizes the steps of the method for encoding tactile data according to any one of claims 1 to 11, or when the program or command is executed by a processor, it realizes the steps of the method for decoding tactile data according to any one of claims 12 to 18.