Haptic data encoding method, haptic data decoding method, and related device

By using the relative value between the key frame position and the previous key frame position in tactile coding, the data redundancy problem in the existing technology is solved and the coding efficiency is improved.

WO2024199057A1PCT designated stage expired Publication Date: 2024-10-03VIVO MOBILE COMM CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/082836
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-28
Filing Date
2024-03-21
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

In the tactile coding of the existing technology, the difference information between the key frame position and the effect position is encoded, which results in large data redundancy and low coding efficiency.

Method used

By obtaining the positions of multiple key frames in the tactile data, the encoding position information of the first target key frame is determined, and encoding is performed based on the difference between the first target key frame and the second target key frame, thereby reducing data redundancy and improving encoding. efficiency.

Benefits of technology

It effectively reduces the number of bits required to encode position information, improves the compression efficiency of tactile signals, and improves coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024082836_03102024_PF_FP_ABST
    Figure CN2024082836_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and discloses a haptic data encoding method, a haptic data decoding method, and a related device. The haptic data encoding method in embodiments of the present application comprises: acquiring the position of each of a plurality of keyframes of an effect in haptic data, wherein the plurality of keyframes comprise a first target keyframe and a second target keyframe, and the second target keyframe is a keyframe before the first target keyframe; determining encoding position information of the first target keyframe, wherein the encoding position information of the first target keyframe is determined according to a difference between the position of the first target keyframe and the position of the second target keyframe; and encoding the encoding position information of the first target keyframe to obtain a first encoding result, wherein an encoding result of the haptic data comprises the first encoding result.
Need to check novelty before this filing date? Find Prior Art

Description

Tactile data encoding method, tactile data decoding method and related devices

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese Patent Application No. 202310312430.6 filed in China on March 28, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application belongs to the field of computer technology, and specifically relates to a tactile data encoding method, a tactile data decoding method, and related devices. Background Art

[0004] As the sense of touch becomes increasingly important in consumer peripherals, tactile coding is becoming increasingly important. For tactile coding, the Moving Pictures Experts Group (MPEG) defines four types of haptic bands: transient bands, curve bands, vectorial wave bands, and wavelet wave bands. Each band consists of a series of "effects" of the same band type, and each effect is defined by a list of "keyframes." When performing tactile coding, the position information of each effect's keyframe must be encoded.

[0005] In related technologies, when encoding the position information of the key frame of an Effect, the difference information between the position of the key frame and the position of the Effect is encoded, which results in large data redundancy and low encoding efficiency.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a tactile data encoding method, a tactile data decoding method, and related devices, which can solve the problem of low encoding efficiency.

[0008] In a first aspect, a tactile data encoding method is provided, the method comprising:

[0009] Obtaining a position of each key frame in a plurality of key frames of the effect in the tactile data, where the plurality of key frames include a first target key frame and a second target key frame, where the second target key frame is a key frame located before the first target key frame;

[0010] Determining encoding position information of a first target key frame, where the encoding position information of the first target key frame is determined according to a difference between a position of the first target key frame and a position of the second target key frame;

[0011] Encoding the encoding position information of the first target key frame to obtain a first encoding result;

[0012] The encoding result of the tactile data includes the first encoding result.

[0013] In a second aspect, a tactile data decoding method is provided, the method comprising:

[0014] Decoding a first encoding result among the encoding results of the tactile data to obtain encoding position information of a first target key frame, where the encoding position information corresponding to the first target key frame is determined based on a difference between a position of the first target key frame and a position of a second target key frame, where the first target key frame and the second target key frame are key frames among multiple key frames of the effect in the tactile data, and the second target key frame is a key frame located before the first target key frame;

[0015] The position of the first target key frame is determined based on the encoded position information of the first target key frame.

[0016] In a third aspect, a tactile data encoding device is provided, comprising:

[0017] an acquisition module, configured to acquire a position of each key frame in a plurality of key frames of the effect in the tactile data, wherein the plurality of key frames include a first target key frame and a second target key frame, wherein the second target key frame is a key frame located before the first target key frame;

[0018] A first determining module is configured to determine encoding position information of a first target key frame, where the encoding position information of the first target key frame is determined according to a difference between a position of the first target key frame and a position of the second target key frame;

[0019] A first encoding module, configured to encode the encoding position information of the first target key frame to obtain a first encoding result;

[0020] The encoding result of the tactile data includes the first encoding result.

[0021] In a fourth aspect, a tactile data decoding device is provided, comprising:

[0022] a decoding module, configured to decode a first encoding result in the encoding results of the tactile data to obtain encoding position information of a first target key frame, where the encoding position information corresponding to the first target key frame is determined based on a difference between a position of the first target key frame and a position of a second target key frame, where the first target key frame and the second target key frame are key frames among multiple key frames of the effect in the tactile data, and the second target key frame is a key frame located before the first target key frame;

[0023] The first determining module is configured to determine a position of the first target key frame based on the encoding position information of the first target key frame.

[0024] In a fifth aspect, a terminal is provided, which includes a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.

[0025] In a sixth aspect, a terminal is provided, comprising a processor and a communication interface, wherein the processor is used to: obtain the position of each key frame in multiple key frames of the effect in the tactile data, the multiple key frames comprising a first target key frame and a second target key frame, the second target key frame being a key frame located before the first target key frame; determine the encoding position information of the first target key frame, the encoding position information of the first target key frame being determined based on the difference between the position of the first target key frame and the position of the second target key frame; encode the encoding position information of the first target key frame to obtain a first encoding result; wherein the encoding result of the tactile data includes the first encoding result.

[0026] In the seventh aspect, a terminal is provided, including a processor and a communication interface, wherein the processor is used to: decode a first encoding result in the encoding results of tactile data to obtain encoding position information of a first target key frame, the encoding position information corresponding to the first target key frame is determined according to the difference between the position of the first target key frame and the position of the second target key frame, the first target key frame and the second target key frame are key frames among multiple key frames of the effect in the tactile data, and the second target key frame is a key frame located before the first target key frame; determine the position of the first target key frame based on the encoding position information of the first target key frame.

[0027] In an eighth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.

[0028] In the ninth aspect, a coding and decoding system is provided, comprising: an encoding end device and a decoding end device, wherein the encoding end device can be used to execute the steps of the method described in the first aspect, and the decoding end device can be used to execute the steps of the method described in the second aspect.

[0029] In the tenth aspect, a chip is provided, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method as described in the first aspect, or to implement the method as described in the second aspect.

[0030] In the eleventh aspect, a computer program / program product is provided, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect, or to implement the steps of the method described in the second aspect.

[0031] In an embodiment of the present application, the position of each key frame in a plurality of key frames of an effect in tactile data is obtained, the plurality of key frames including a first target key frame and a second target key frame, the second target key frame being a key frame located before the first target key frame; the encoding position information of the first target key frame is determined, the encoding position information of the first target key frame being determined according to the difference between the position of the first target key frame and the position of the second target key frame; the encoding position information of the first target key frame is encoded to obtain a first encoding result; wherein the encoding result of the tactile data includes the first encoding result. In this way, by encoding the encoding position information of the first target key frame determined by the difference between the position of the first target key frame and the position of the second target key frame, data redundancy can be reduced compared to encoding the difference information between the position of the key frame and the effect position, thereby improving encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] FIG1 is a schematic diagram of an encoder framework in the related art;

[0033] FIG2 is a schematic diagram of a tactile signal in the related art;

[0034] FIG3 is a flow chart of a tactile data encoding method provided in an embodiment of the present application;

[0035] FIG4 is a schematic diagram of tactile data packaging provided by an embodiment of the present application;

[0036] FIG5 is a flowchart of a tactile data decoding method provided in an embodiment of the present application;

[0037] FIG6 is a schematic structural diagram of a tactile data encoding device provided in an embodiment of the present application;

[0038] FIG7 is a schematic structural diagram of a tactile data decoding device provided in an embodiment of the present application;

[0039] FIG8 is a schematic structural diagram of a communication device provided in an embodiment of the present application;

[0040] FIG9 is a schematic structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0042] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in this application represents at least one of the connected objects. For example, "A or B" covers three options, namely, Option 1: including A but not including B; Option 2: including B but not including A; Option 3: including both A and B. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0043] The term "indication" in this application can be either a direct indication (or explicit indication) or an indirect indication (or implicit indication). A direct indication can be understood as the sender explicitly informing the receiver of specific information, the operation to be performed, or the requested result, etc. in the instruction sent; an indirect indication can be understood as the receiver determining the corresponding information based on the instruction sent by the sender, or making a judgment and determining the operation to be performed or the requested result, etc. based on the judgment result.

[0044] The encoding and decoding end corresponding to the tactile data encoding and decoding method in the embodiment of the present application can be a terminal, which can also be called a terminal device or user equipment (UE). The terminal can be a mobile phone, a tablet personal computer, a laptop computer or a notebook computer, a personal digital assistant (PDA), a handheld computer, a netbook, an ultra-mobile personal computer (UMPC), a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device (Wearable Device) or a vehicle user equipment (VUE), a pedestrian terminal (Pedestrian User Equipment, PUE) and other terminal-side devices. Wearable devices include: smart watches, bracelets, headphones, glasses, etc. It should be noted that the specific type of the terminal is not limited in the embodiment of the present application.

[0045] For ease of understanding, some of the contents involved in the embodiments of this application are described below:

[0046] Haptics provide users with an additional level of entertainment and sensory immersion. Therefore, cleverly incorporating tactile information into audio, video, gaming, and other content can significantly enhance the user experience and experience of media content. Over the past few years, with the growing market importance of haptics in consumer peripherals (such as devices equipped with the Taptic Engine and devices equipped with the DualSense controller), tactile encoding has become increasingly important. Tactile digital encoding stores tactile data in a digital format. Like audio and video, digital encoding is crucial for the operation of digital haptic devices. Previous generations of haptic peripherals relied on less expressive haptic actuators, which were often based on state machine control processes. Furthermore, the current market and technology landscape is highly fragmented, with various technology manufacturers developing and implementing a multitude of different haptic encoding formats. This has led to cross-platform compatibility and interoperability issues, hindering the widespread adoption of haptic technology. To address these issues, the ongoing haptic standardization work within the Moving Picture Experts Group (MPEG) has highlighted the need for standardized haptic encoding representations. A standard haptic coding format (and associated standard decoders) will facilitate the inclusion of haptic technology into the ISOBMFF, MPEG-DASH and MPEG-I standards, making it easier for content creators as well as media / streaming content providers to incorporate haptic technology in a standardized way, thereby improving the overall user experience.

[0047] In the field of haptics, signal encoding typically employs two different representation methods: 1. Quantized: This representation is typically based on measured data. Samples of the raw tactile phenomenon are stored in a file at a specific acquisition frequency to represent the signal. An example of quantized tactile signals is implemented using WAV files, originally developed for audio. The WAV file format can capture real-world data and represent complex, wide-spectrum tactile feedback. A disadvantage of this tactile encoding is that once encoded, it is difficult to modify because the primitives used to create the signal are inaccessible. 2. Descriptive: This representation encodes tactile signals as a combination of primitives that can be synthesized; related vectorized formats include AHAP and IVS. The advantage of these formats is that they are created using combinations of primitives. They can be easily modified at runtime by applications and specialized programs. Currently, these solutions only support vibrotactile perception and do not support other forms of tactile sensation, such as kinesthetic, temperature, and texture. As signal complexity increases, their memory efficiency tends to be low and they cannot encode non-periodic phenomena.

[0048] The MPEG Haptic Coding standardization details a coded representation for tactile media that covers the two most common tactile sensations employed by devices today: vibrotactile and kinesthetic. This coded representation allows for the encoding of descriptive and quantitative data in a human-readable JSON format (.hjif) used as an interchange format, which can be compressed into a binary file format (.hmpg) for distribution or a packetized bitstream (MIHS) for streaming. This coded representation meets market expectations for compatibility of descriptive and quantitative formats, as well as interoperability between devices, for immersive 3D experiences and tactile data distribution.

[0049] As shown in Figure 1, the MPEG tactile encoder can process waveform pulse code modulation (PCM) signals and descriptive tactile files (such as AHAP, IVS, or HJIF in MPEG format). Metadata information is provided to the codec through the OHM input file. The encoder processes the two types of input files differently. For descriptive content, the input is semantically analyzed to transcode the data (if necessary) into the recommended encoding representation. For PCM content, the signal analysis process is divided into two sub-processes. After performing frequency band decomposition on the signal, the low frequency is encoded using a keyframe extraction process. The low frequency band is then reconstructed, and the residual between this signal and the original low frequency signal is calculated. Finally, this residual signal is added to the original high frequency band and encoded using wavelet transform.

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

[0051] For example, as shown in Figure 2, the tactile signal (Channel 1) is divided into a high-frequency band (e.g., a wave band) and a low-frequency band (e.g., a curve band). For example, 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. A local extremum extraction algorithm can be used to extract keyframes. The local extremum extraction algorithm extracts the time and amplitude of the extreme points. Each encoded point in the extreme points is then used as a keyframe to form a keyframe list to describe the current effect.

[0052] The syntax and semantic definitions for different types of haptic bands, effects, and keyframes are shown in Tables 1 to 5.

[0053] Table (Table)1.Syntax of readEffect()

[0054] Here, Syntax of readEffect() represents the syntactic rules of readEffect().

[0055] Id represents the ID of the effect;

[0056] effectType represents the type of effect;

[0057] effectPosition represents the position of the effect relative to the packet timestamp of the temporal data.

[0058] Table 2.Syntax of readEffectBasis()

[0059] Here, Syntax of readEffectBasis() represents the syntactic rule of readEffectBasis().

[0060] keyframesCount represents the number of keyframes belonging to the current effect in the data packet.

[0061] Table 3. Syntax of readKeyframe()

[0062] Table 4.Syntax of readTransientKeyframe()

[0063] Here, Syntax of readKeyframe() represents the syntactic rules of readKeyframe().

[0064] Syntax of readTransientKeyframe() represents the syntax rules of readTransientKeyframe().

[0065] Amplitude represents the amplitude of the key frame;

[0066] Position represents the keyframe position relative to the effect position;

[0067] frequency represents the frequency of key frames.

[0068] Table 5.Syntax of readCurveKeyframe()

[0069] Here, Syntax of readCurveKeyframe() represents the syntactic rules of readCurveKeyframe().

[0070] Amplitude represents the amplitude of the key frame;

[0071] position represents the keyframe position relative to the effect's position.

[0072] It should be noted that in related technologies, when encoding the position information of the keyframes of an effect, the keyframe positions relative to the effect positions are encoded, resulting in significant data redundancy and low encoding efficiency. Embodiments of the present application provide a tactile data encoding method, a tactile data decoding method, and related devices that can address the issue of low encoding efficiency.

[0073] The tactile data encoding method, tactile data decoding method and related devices provided by the embodiments of the present application are described in detail below with reference to some embodiments and their application scenarios in conjunction with the accompanying drawings.

[0074] 3 , which is a flow chart of a tactile data encoding method provided in an embodiment of the present application, which can be applied to an encoding end. As shown in FIG3 , the tactile data encoding method includes the following steps:

[0075] Step 101: Obtain the position of each key frame in a plurality of key frames of the effect in tactile data, where the plurality of key frames include a first target key frame and a second target key frame, where the second target key frame is a key frame located before the first target key frame.

[0076] The tactile data may also be described as a tactile signal. The tactile data includes multiple effects. For example, the multiple key frames may be represented in the form of a key frame list, which includes multiple key frames.

[0077] In addition, the position of the key frame may refer to the time information of the key frame in the effect.

[0078] Step 102: Determine encoding position information of a first target key frame, where the encoding position information of the first target key frame is determined according to a difference between a position of the first target key frame and a position of the second target key frame.

[0079] The first target key frame may be a key frame other than the third target key frame among the multiple key frames, and the third target key frame is the first key frame of the effect. For example, the first target key frame may be any key frame other than the third target key frame among the multiple key frames.

[0080] In addition, the second target key frame may be the closest key frame before the first target key frame among the multiple key frames; or the second target key frame may be any key frame before the first target key frame among the multiple key frames. For example, the multiple key frames of the current effect include N key frames, the first target key frame is the mth key frame, and the second target key frame may be any key frame from the 1st key frame to the m-1th key frame, where m is an integer greater than 1 and less than N, and N is a positive integer.

[0081] In one embodiment, the multiple key frames of the effect include N key frames, the first target key frame is the mth key frame, the second target key frame is the mnth key frame, and n is an integer greater than or equal to 1 and less than or equal to m-1. The method may also include: encoding the position information of the first n key frames of the effect to obtain a third encoding result, and the encoding result of the tactile data also includes the third encoding result.

[0082] In addition, the encoded position information of the first target key frame can be the difference between the position of the first target key frame and the position of the second target key frame; or the difference between the position of the second target key frame and the position of the first target key frame; or the difference between the position of the first target key frame and the position of the second target key frame calculated using a preset algorithm; or the difference between the position of the second target key frame and the position of the first target key frame calculated using a preset algorithm, and this embodiment is not limited to this. The encoded position information of the first target key frame can be considered as the relative position information of the position of the first target key frame relative to the position of the second target key frame. For timing effects, position information is time information, and the encoded position information of the first target key frame can be the difference between the time position of the first target key frame and the time position of the second target key frame. For example, the encoded position information of the first target key frame can be the difference between the time position of the first target key frame and the time position of the second target key frame, or the difference between the time position of the second target key frame and the time position of the first target key frame, and this embodiment is not limited to this.

[0083] It should be noted that the encoded position information of the first target key frame can be used as the position information of the first target key frame.

[0084] Step 103: Encode the encoding position information of the first target key frame to obtain a first encoding result;

[0085] The encoding result of the tactile data includes the first encoding result.

[0086] The encoding result of the tactile data may also be described as a code stream of tactile data.

[0087] Additionally, a first bit number may be determined, the first bit number being determined based on the encoding position information corresponding to the multiple key frames, and the encoding position information of the first target key frame being encoded using the first bit number as the encoding bit number to obtain a first encoding result; alternatively, the encoding position information of the first target key frame may be encoded using a preset encoding bit number to obtain a first encoding result. For example, the preset encoding bit number may be 16 bits, or the preset encoding bit number may be other values, which are not limited in this embodiment.

[0088] It should be noted that the position information of each keyframe in the current effect is a value relative to the current effect position. This method of encoding position information has a large data redundancy. The embodiment of the present application proposes a method for encoding keyframe position information. Compared with the MPEG encoding of the relative positions of each keyframe and the effect position in the related art, this embodiment can reduce the number of bits required for encoding position information by encoding the relative value of each keyframe position and the previous keyframe position, thereby improving the compression efficiency of the tactile signal. For example, the effect position is 0s, and the position of the first keyframe of the effect is the same as the effect position, which is 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. If the relative position of each keyframe to the effect position is encoded, the encoded position information corresponding to the second to fourth keyframes is 5, 15, and 30, respectively. Using the scheme in this embodiment, taking the encoding of the relative value of each keyframe position to the position of the most recent previous keyframe as an example, the encoded position information corresponding to the second to fourth keyframes is 5, 10, and 15, respectively. This significantly reduces the amount of encoded position information, reducing the number of bits required to encode the position information, thereby reducing data redundancy and improving the compression efficiency of tactile data.

[0089] In an embodiment of the present application, the position of each key frame in a plurality of key frames of an effect in tactile data is obtained, the plurality of key frames including a first target key frame and a second target key frame, the second target key frame being a key frame located before the first target key frame; the encoding position information of the first target key frame is determined, the encoding position information of the first target key frame being determined according to the difference between the position of the first target key frame and the position of the second target key frame; the encoding position information of the first target key frame is encoded to obtain a first encoding result; wherein the encoding result of the tactile data includes the first encoding result. In this way, by encoding the encoding position information of the first target key frame determined by the difference between the position of the first target key frame and the position of the second target key frame, data redundancy can be reduced compared to encoding the encoding position information between the position of the key frame and the effect position, thereby improving encoding efficiency.

[0090] Optionally, the second target key frame is a key frame that is located before the first target key frame and is closest to the first target key frame.

[0091] The second target key frame may be a key frame preceding the first target key frame. For example, if the first target key frame is the mth key frame, the second target key frame may be the m-1th key frame.

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

[0093] Optionally, after determining the encoding position information of the first target key frame, the method further includes:

[0094] Determine a first bit number, where the first bit number is determined based on encoding position information corresponding to each key frame in the multiple key frames;

[0095] The encoding of the encoding position information of the first target key frame to obtain a first encoding result includes:

[0096] The encoding position information of the first target key frame is encoded using the first bit number as the encoding bit number to obtain a first encoding result.

[0097] Among them, the maximum value in the coding position information corresponding to the multiple key frames can be determined, and the number of coding bits required for the maximum value can be determined as the first number of bits; or, the maximum value in the coding position information corresponding to the multiple key frames can be determined, and the sum of the number of coding bits required for the maximum value and the preset number of bits can be determined as the first number of bits. The preset number of bits can be 1, 2, 3, etc. This embodiment does not limit the preset number of bits.

[0098] Taking the first bit number being 15 as an example, the bit number of the first encoding result obtained by encoding the encoding position information of the first target key frame using the first bit number is 15.

[0099] It should be noted that in the related art, MPEG uses a fixed 16 bits to encode the position information of key frames. However, this embodiment obtains the number of bits required to encode the corresponding key frame position information for each effect, rather than using a fixed 16 bits, and can adaptively allocate a more reasonable number of encoding bits.

[0100] In this embodiment, a first bit number is determined, and the first bit number is determined based on the encoding position information corresponding to each key frame in the multiple key frames; the encoding position information of the first target key frame is encoded using the first bit number as the encoding bit number to obtain a first encoding result. In this way, the number of bits required for encoding the corresponding key frame position information of each effect is obtained. Compared with using a fixed number of bits to encode all effects, a more reasonable number of encoding bits can be adaptively allocated, which can further reduce data redundancy and improve encoding efficiency.

[0101] Optionally, determining the first bit number includes:

[0102] Determine a maximum value of the encoding position information corresponding to the multiple key frames;

[0103] The number of coding bits required for the maximum value is determined as the first number of bits.

[0104] Among them, the coding position information corresponding to all key frames in the multiple key frames can be calculated, and the number of coding bits required for the maximum value in the coding position information can be determined as the first number of bits; or the coding position information corresponding to the remaining key frames in the multiple key frames except the first key frame can be calculated, and the number of coding bits required for the maximum value in the coding position information can be determined as the first number of bits. For example, the multiple key frames include the first key frame to the fourth key frame, and the coding position information corresponding to the second key frame to the fourth key frame is 5, 10, and 15 respectively. Then, the maximum value in the coding position information is 15, the first number of bits is the number of coding bits required for the maximum value, and the first number of bits is 4.

[0105] In one embodiment, the number of bits B required to encode the maximum value in the encoding position information is k :

[0106] Among them, p i Indicates the position of the i-th key frame, i is greater than 0; Indicates rounding up; B k The number of bits required to encode the position information of the key frame of the kth effect (i.e., the current effect) (i.e., the first bit); p i-1 Indicates the position of the i-1th key frame, where the i-1th key frame is the closest key frame before the i-th key frame.

[0107] In this embodiment, the maximum value of the coding position information corresponding to the multiple key frames is determined; the number of coding bits required for the maximum value is determined as the first number of bits, so that the determined first number of bits can take the minimum value while satisfying the coding position information coding, thereby realizing the adaptive allocation of coding bits to each effect.

[0108] Optionally, the encoding result of the tactile data further includes the first bit number.

[0109] The first bit number can be written into the bitstream as metadata. For example, the first bit number can be written into the Haptic Effect data structure, for example, into readEffect(), readEffectBasis(), or other locations, which are not limited in this embodiment.

[0110] In this embodiment, the encoding result of the tactile data also includes the first bit number, which is the encoding bit number for encoding the encoding position information of the first target key frame, so that the decoding end can decode the first encoding result in the encoding result of the tactile data through the first bit number carried in the encoding result of the tactile data to obtain the encoding position information of the first target key frame.

[0111] Optionally, the first target key frame is a key frame among the multiple key frames except a third target key frame, and the third target key frame is the first key frame of the effect;

[0112] The method further comprises:

[0113] Encoding the encoding position information of the third target key frame to obtain a second encoding result;

[0114] The encoding result of the tactile data also includes the second encoding result.

[0115] In this embodiment, the third target key frame is the first key frame of the effect, and the encoding position information of the third target key frame is encoded to obtain a second encoding result; wherein, the encoding result of the tactile data also includes the second encoding result, so that the decoding end can obtain the encoding position information of the first key frame of the effect through decoding the second encoding result, and then the position of each key frame can be calculated through the encoding position information of the first key frame and the encoding position information corresponding to each key frame.

[0116] Optionally, encoding the encoding position information of the third target key frame to obtain a second encoding result includes:

[0117] In a case where the position of the third target key frame is the same as the effect position of the effect, determining the second encoding result to be a preset value; or

[0118] In a case where the position of the third target key frame is different from the effect position of the effect, the encoding position information of the third target key frame is encoded based on a preset encoding bit number to obtain the second encoding result.

[0119] Among them, when the position of the third target key frame is the same as the effect position of the effect, the encoding position information of the third target key frame can be determined to be a preset value (for example, 0, or 1), and the encoding position information of the third target key frame is encoded using 1 bit to obtain the second encoding result, which is the preset value.

[0120] In addition, the preset number of coding bits may be 16 bits, or the preset number of coding bits may be other values, for example, 20, 25, etc., which is not limited in this embodiment.

[0121] In addition, the encoding position information of the third target key frame can be determined based on the difference between the position of the third target key frame and the effect position of the effect. For example, the encoding position information of the third target key frame can be the difference between the position of the third target key frame and the effect position of the effect; or, the encoding position information of the third target key frame can be the difference between the effect position of the effect and the position of the third target key frame; or, the encoding position information of the third target key frame can be the value calculated by a preset algorithm based on the difference between the position of the third target key frame and the effect position of the effect; or, the encoding position information of the third target key frame can be the value calculated by a preset algorithm based on the difference between the effect position of the effect and the position of the third target key frame. This embodiment does not limit this.

[0122] In this embodiment, when the position of the third target key frame is the same as the effect position of the effect, the second encoding result is determined to be a preset value; or, when the position of the third target key frame is different from the effect position of the effect, the encoding position information of the third target key frame is encoded based on the preset encoding bit number to obtain the second encoding result, thereby enabling the encoding of the position of the first key frame of the effect.

[0123] Optionally, the first target key frame is a key frame other than a third target key frame among the multiple key frames, the third target key frame is the first key frame of the effect, and the first bit number is determined based on encoding position information corresponding to the key frames other than the third target key frame among the multiple key frames;

[0124] The encoding position information of the first target key frame is encoded using the first bit number as the encoding bit number to obtain a first encoding result, including:

[0125] In a case where the position of the third target key frame is different from the effect position of the effect, determining a second number of bits, where the second number of bits represents a number of coding bits required to encode the coding position information of the third target key frame;

[0126] When the second bit number is greater than the first bit number, updating the first bit number to the second bit number;

[0127] The updated first bit number is used as the encoding bit number to encode the encoding position information of the first target key frame to obtain a first encoding result.

[0128] In which, when 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; when the second bit number is less than or equal to the first bit number, the first bit number can be kept unchanged, so that the maximum value of the first bit number or the second bit number is used as the updated first bit number.

[0129] For example, the second bit number can be calculated as follows:

[0130] Among them, p′0 is the encoding position information of the third target key frame, B0 k Indicates the number of bits (ie, the second number of bits) required to encode the encoding position information of the third target key frame of the k-th effect (ie, the current effect).

[0131] In addition, a maximum value of the encoding position information corresponding to the key frames other than the third target key frame among the multiple key frames may be determined, and the number of encoding bits required for the maximum value may be determined as the first number of bits.

[0132] In this embodiment, a second bit number is determined, where the second bit number represents the number of coding bits required to encode the coding position information of the third target key frame; when 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; for the encoding of the coding position information of the first target key frame, the updated first bit number is used as the coding bit number, so that the decoding end can decode the positions of all key frames of the same effect through the same decoding bit number, and the decoding efficiency is high.

[0133] Optionally, the method further includes:

[0134] Encoding the encoding position information of the third target key frame using the updated first bit number as the encoding bit number to obtain a second encoding result;

[0135] The encoding result of the tactile data also includes the second encoding result.

[0136] In this embodiment, the encoding of the encoding position information of the first target key frame and the encoding position information of the third target key frame both use the updated first bit number as the encoding bit number, so that the decoding end can decode the positions of all key frames of the same effect through the same decoding bit number, and the decoding efficiency is high.

[0137] Optionally, when different key frames of the effect are located in the first data packet and the second data packet respectively, and the key frame before the fourth target key frame is located in the first data packet: the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the start time position of the second data packet, or the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the effect position of the effect;

[0138] The fourth target key frame is the first key frame in the second data packet, and the first target key frame is a key frame among the multiple key frames except the fourth target key frame.

[0139] In one embodiment, the method may further include: encoding the encoding position information of the fourth target key frame to obtain a fourth encoding result, and the encoding result of the tactile data also includes the fourth encoding result.

[0140] For example, when tactile data is packaged as shown in Figure 4, Effect 3 is packaged in two packets (Packet 2 and Packet 3). At this time, for the first key frame after the T3 moment of Effect 3 in Packet 3 (i.e., the fourth target key frame), the position information p′ of the fourth target key frame is i The calculation method of can be any of the following methods.

[0141] Method 1: Still calculate the encoding position information of the fourth target key frame according to the method described in steps 101 to 103, p′ i =p i -p i-1 At this time p i-1 This is the last frame of Effect 3 in Packet 2.

[0142] Method 2: p′ i =p i -T3. T3 is the timestamp of Packet 3.

[0143] Method 3: p′ i =p i -t e3 . t e3 The position of Effect 3 (Ep k ).

[0144] In this embodiment, when different key frames of the effect are respectively located in the first data packet and the second data packet, and the key frame before the fourth target key frame is located in the first data packet: the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the starting time position of the second data packet, so that the decoding end can determine the position of the fourth target key frame through the starting time position of the second data packet and the encoding position information of the fourth target key frame.

[0145] In this embodiment, when different key frames of the effect are respectively located in the first data packet and the second data packet, and the key frame before the fourth target key frame is located in the first data packet: the encoding position information of the fourth target key frame is determined based on the difference between the position of the fourth target key frame and the effect position of the effect, so that the decoding end can determine the position of the fourth target key frame through the starting time position of the effect and the encoding position information of the fourth target key frame.

[0146] Optionally, obtaining the position of each key frame in a plurality of key frames of the effect in the tactile data includes:

[0147] A key frame list of the effect in the tactile data is obtained, where the key frame list includes positions of multiple key frames, and the positions of the multiple key frames are arranged in chronological order.

[0148] Optionally, the key frame list further includes key frame identifiers corresponding to positions of the key frames.

[0149] The present application also provides a method for encoding tactile data, including the following steps:

[0150] encoding the encoding position information of the fourth target key frame to obtain a fourth encoding result, wherein the encoding result of the tactile data includes the fourth encoding result;

[0151] Wherein, the fourth target key frame is a key frame among a plurality of key frames of the effect in the tactile data;

[0152] In a case where different key frames of the effect are located in a first data packet and a second data packet respectively, and a key frame preceding a fourth target key frame is located in the first data packet: encoding position information of the fourth target key frame is determined according to a difference between a position of the fourth target key frame and a start time position of the second data packet, or encoding position information of the fourth target key frame is determined according to a difference between a position of the fourth target key frame and an effect position of the effect;

[0153] The fourth target key frame is the first key frame in the second data packet.

[0154] 5 , which is a flow chart of a tactile data decoding method provided in an embodiment of the present application, which can be applied to a decoding end. As shown in FIG5 , the tactile data decoding method includes the following steps:

[0155] Step 201: Decode a first encoding result among the encoding results of the tactile data to obtain encoding position information of a first target key frame, where the encoding position information corresponding to the first target key frame is determined based on a difference between a position of the first target key frame and a position of a second target key frame, where the first target key frame and the second target key frame are key frames among multiple key frames of the effect in the tactile data, and the second target key frame is a key frame located before the first target key frame;

[0156] Step 202: Determine the position of the first target key frame based on the encoded position information of the first target key frame.

[0157] Optionally, the second target key frame is a key frame that is located before the first target key frame and is closest to the first target key frame.

[0158] Optionally, decoding a first encoding result among the encoding results of the tactile data to obtain encoding position information of a first target key frame includes:

[0159] Decoding a first encoding result in the encoding results of the tactile data based on a first bit number to obtain encoding position information of a first target key frame;

[0160] The first number of bits is the number of bits for encoding the encoding position information of the first target key frame.

[0161] Optionally, the encoding result of the tactile data further includes the first bit number, and the first bit number is determined based on encoding position information corresponding to each key frame in the multiple key frames.

[0162] Optionally, the first number of bits is the number of coding bits required for a maximum value of the coding position information corresponding to the multiple key frames.

[0163] Optionally, the encoding result of the tactile data further includes a second encoding result, the first target key frame is a key frame among the multiple key frames except a third target key frame, the third target key frame is a first key frame of the effect, and the method further includes:

[0164] The position of the third target key frame is determined based on the second encoding result.

[0165] Optionally, determining the position of the third target key frame based on the second encoding result includes:

[0166] When the second encoding result is a preset value, determining that the position of the third target key frame is the same as the effect position of the effect; or

[0167] When the second encoding result is not the preset value, the second encoding result is decoded based on the preset encoding bit number to obtain the encoding position information of the third target key frame; and the position of the third target key frame is determined based on the encoding position information of the third target key frame.

[0168] It should be noted that this embodiment is an implementation method of the decoding side corresponding to the embodiment shown in Figure 3. Its specific implementation method can refer to the relevant description of the embodiment shown in Figure 3. In order to avoid repetitive description, this embodiment will not be repeated, and the same beneficial effects can still be achieved.

[0169] The tactile data encoding method and the tactile data decoding method of the embodiment of the present application are described below through two specific embodiments:

[0170] Example 1:

[0171] For the encoding end, the tactile data encoding method may include the following process:

[0172] Step 11: Get the keyframe list of the current effect.

[0173] Step 12: Calculate the difference between the position of each key frame except the first key frame in the key frame list and the position of the previous key frame in order (the difference is greater than zero), obtain the maximum difference and calculate the number of bits B required to encode the maximum difference k :

[0174] Among them, p i Indicates the position of the i-th key frame, i is greater than 0; Indicates rounding up; B k The number of bits required to encode the key frame position information of the kth effect (i.e., the current effect); p i-1 Indicates the position of the i-1th key frame, where the i-1th key frame is the closest key frame before the i-th key frame.

[0175] Step 13: Encode the key frame position information corresponding to the current effect by the number of bits B required k Write the code stream as metadata. k Write into the Haptic Effect data structure. For example, you can write into readEffect(), readEffectBasis(), or other locations. There is no limitation here.

[0176] Step 14: Encode the position information p'0 of the first key frame and write it into the code stream. The position information p'0 of the first key frame is the sum of the first key frame position p0 and the current effect position information Ep. k The relative value (i.e. difference) of .

[0177] It should be noted that, depending on the actual packaging method of the haptic data stream, the position of the first keyframe in the current effect may be the same as or different from the current effect position. Therefore, the position information of the first keyframe can be encoded in the following ways, which are not limited here.

[0178] Method 1: If the first key frame position is the same as the current effect position, p′0 is 0 and p′0 is encoded with 1 bit.

[0179] Method 2: If the position of the first key frame is different from the current effect position, p′0 is encoded using the 16-bit encoding specified by MPEG in the related art.

[0180] Method 3: If the first keyframe position is different from the current effect position, first calculate the number of bits B0 required to encode p′0 k :

[0181] Then compare B0 k and B calculated in step 12 k , if B0 k Greater than B k , then B k Updated to B0 k , with the updated number of bits B k Encoding p′0 and p′ i If B0 k Less than B k , then keep B k No change, use B k Encoding p′0 and p′ i .

[0182] Step 15: Use the B determined in step 12 k The number of bits encodes the position information p′ of each key frame except the first key frame i (i.e. the encoding position information corresponding to each key frame) is written into the code stream. The position information of each key frame is the difference between the current key frame position and the previous key frame position, i.e.: p′ i =p i -p i-1 ,i>0.

[0183] Example 2:

[0184] For the decoding end, the tactile data decoding method may include the following process:

[0185] Step 21: Get the number of bits B required to encode the key frame position information of the current effect k .

[0186] Step 22: Get the current effect's position information Ep k , decode to obtain the position information p′0 of the first key frame in the current effect, and calculate the position p0 of the first key frame: p0=p′0+Ep k .

[0187] Step 23: Use the number of bits B obtained in step 21 k Decode the difference p′ between the position of each key frame except the first key frame and the position of the previous key frame i , calculate the position p0 of each key frame: p i =p′ i +p i-1 ;

[0188] Where i>0.

[0189] This embodiment can reduce the number of bits required for encoding position information by encoding the relative value of each key frame position and the previous key frame position, and obtain the number of bits required for encoding the corresponding key position information for each effect. It can adaptively allocate a more reasonable number of encoding bits, reduce data redundancy, and improve coding efficiency.

[0190] It should be noted that the tactile data encoding method provided in the embodiments of the present application can be executed by a tactile data encoding device, or a control module within the tactile data encoding device that is configured to execute the tactile data encoding method. In the embodiments of the present application, the tactile data encoding device executing the tactile data encoding method is used as an example to illustrate the tactile data encoding device provided in the embodiments of the present application.

[0191] Please refer to FIG6 . FIG6 is a structural diagram of a tactile data encoding device provided in an embodiment of the present application. As shown in FIG6 , the tactile data encoding device 300 includes:

[0192] An acquisition module 301 is configured to acquire a position of each key frame in a plurality of key frames of the effect in the tactile data, wherein the plurality of key frames include a first target key frame and a second target key frame, wherein the second target key frame is a key frame located before the first target key frame;

[0193] A first determining module 302 is configured to determine encoding position information of a first target key frame, where the encoding position information of the first target key frame is determined based on a difference between a position of the first target key frame and a position of the second target key frame;

[0194] A first encoding module 303 is configured to encode the encoding position information of the first target key frame to obtain a first encoding result;

[0195] The encoding result of the tactile data includes the first encoding result.

[0196] Optionally, the second target key frame is a key frame that is located before the first target key frame and is closest to the first target key frame.

[0197] Optionally, the device further comprises:

[0198] A second determining module is configured to determine a first number of bits, where the first number of bits is determined based on encoding position information corresponding to each key frame in the plurality of key frames;

[0199] The first encoding module is specifically configured to:

[0200] The encoding position information of the first target key frame is encoded using the first bit number as the encoding bit number to obtain a first encoding result.

[0201] Optionally, the second determining module is specifically configured to:

[0202] Determine a maximum value of the encoding position information corresponding to the multiple key frames;

[0203] The number of coding bits required for the maximum value is determined as the first number of bits.

[0204] Optionally, the encoding result of the tactile data further includes the first bit number.

[0205] Optionally, the first target key frame is a key frame among the multiple key frames except a third target key frame, and the third target key frame is the first key frame of the effect;

[0206] The device further comprises:

[0207] A second encoding module, configured to encode the encoding position information of the third target key frame to obtain a second encoding result;

[0208] The encoding result of the tactile data also includes the second encoding result.

[0209] Optionally, the second encoding module is specifically configured to:

[0210] In a case where the position of the third target key frame is the same as the effect position of the effect, determining the second encoding result to be a preset value; or

[0211] In a case where the position of the third target key frame is different from the effect position of the effect, the encoding position information of the third target key frame is encoded based on a preset encoding bit number to obtain the second encoding result.

[0212] Optionally, the first target key frame is a key frame other than a third target key frame among the multiple key frames, the third target key frame is the first key frame of the effect, and the first bit number is determined based on encoding position information corresponding to the key frames other than the third target key frame among the multiple key frames;

[0213] The first encoding module is specifically configured to:

[0214] In a case where the position of the third target key frame is different from the effect position of the effect, determining a second number of bits, where the second number of bits represents a number of coding bits required to encode the coding position information of the third target key frame;

[0215] When the second bit number is greater than the first bit number, updating the first bit number to the second bit number;

[0216] The updated first bit number is used as the encoding bit number to encode the encoding position information of the first target key frame to obtain a first encoding result.

[0217] Optionally, the device further comprises:

[0218] a third encoding module, configured to encode the encoding position information of the third target key frame using the updated first bit number as the encoding bit number to obtain a second encoding result;

[0219] The encoding result of the tactile data also includes the second encoding result.

[0220] Optionally, when different key frames of the effect are located in the first data packet and the second data packet respectively, and the key frame before the fourth target key frame is located in the first data packet: the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the start time position of the second data packet, or the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the effect position of the effect;

[0221] The fourth target key frame is the first key frame in the second data packet, and the first target key frame is a key frame among the multiple key frames except the fourth target key frame.

[0222] Optionally, the acquisition module is specifically configured to:

[0223] A key frame list of the effect in the tactile data is obtained, where the key frame list includes positions of multiple key frames, and the positions of the multiple key frames are arranged in chronological order.

[0224] The tactile data encoding device in the embodiment of the present application can be a device, a device or electronic device with an operating system, or a component, integrated circuit, or chip in a terminal. The device or electronic device can be a mobile terminal or a non-mobile terminal. For example, the mobile terminal can include but is not limited to the types of terminals listed above, and the non-mobile terminal can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), an ATM or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0225] The tactile data encoding device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 3 and achieve the same technical effect. To avoid repetition, it will not be described here.

[0226] It should be noted that the tactile data decoding method provided in the embodiments of the present application can be executed by a tactile data decoding device, or by a control module within the tactile data decoding device that is configured to execute the tactile data decoding method. In the embodiments of the present application, the tactile data decoding device executing the tactile data decoding method is used as an example to illustrate the tactile data decoding device provided in the embodiments of the present application.

[0227] Please refer to FIG. 7 , which is a structural diagram of a tactile data decoding device provided in an embodiment of the present application. As shown in FIG. 7 , the tactile data decoding device 400 includes:

[0228] a decoding module 401 configured to decode a first encoding result in the encoding results of the tactile data to obtain encoding position information of a first target key frame, where the encoding position information corresponding to the first target key frame is determined based on a difference between a position of the first target key frame and a position of a second target key frame, where the first target key frame and the second target key frame are key frames among multiple key frames of the effect in the tactile data, and the second target key frame is a key frame located before the first target key frame;

[0229] The first determining module 402 is configured to determine the position of the first target key frame based on the encoding position information of the first target key frame.

[0230] Optionally, the second target key frame is a key frame that is located before the first target key frame and is closest to the first target key frame.

[0231] Optionally, the decoding module is specifically configured to:

[0232] Decoding a first encoding result in the encoding results of the tactile data based on a first bit number to obtain encoding position information of a first target key frame;

[0233] The first number of bits is the number of bits for encoding the encoding position information of the first target key frame.

[0234] Optionally, the encoding result of the tactile data further includes the first bit number, and the first bit number is determined based on encoding position information corresponding to each key frame in the multiple key frames.

[0235] Optionally, the first number of bits is the number of coding bits required for a maximum value of the coding position information corresponding to the multiple key frames.

[0236] Optionally, the encoding result of the tactile data further includes a second encoding result, the first target key frame is a key frame among the multiple key frames except a third target key frame, the third target key frame is a first key frame of the effect, and the apparatus further includes:

[0237] The second determining module is configured to determine a position of the third target key frame based on the second encoding result.

[0238] Optionally, the second determining module is specifically configured to:

[0239] When the second encoding result is a preset value, determining that the position of the third target key frame is the same as the effect position of the effect; or

[0240] When the second encoding result is not the preset value, the second encoding result is decoded based on the preset encoding bit number to obtain the encoding position information of the third target key frame; and the position of the third target key frame is determined based on the encoding position information of the third target key frame.

[0241] The tactile data decoding device in the embodiment of the present application can be a device, a device or electronic device with an operating system, or a component, integrated circuit, or chip in a terminal. The device or electronic device can be a mobile terminal or a non-mobile terminal. For example, the mobile terminal can include but is not limited to the types of terminals listed above, and the non-mobile terminal can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), an ATM or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0242] The tactile data decoding device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 5 and achieve the same technical effect. To avoid repetition, it will not be described here.

[0243] Optionally, as shown in FIG8 , an embodiment of the present application further provides a communication device 500, comprising a processor 501 and a memory 502. The memory 502 stores programs or instructions that can be run on the processor 501. For example, when the communication device 500 is an encoding end device, the program or instruction, when executed by the processor 501, implements the various steps of the above-mentioned tactile data encoding method embodiment and can achieve the same technical effect. When the communication device 500 is a decoding end device, the program or instruction, when executed by the processor 501, implements the various steps of the above-mentioned tactile data decoding method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0244] An embodiment of the present application further provides a terminal including a processor and a communication interface, the processor being configured to: obtain a position of each keyframe from a plurality of keyframes of an effect in tactile data, the plurality of keyframes including a first target keyframe and a second target keyframe, the second target keyframe being a keyframe located before the first target keyframe; determine encoding position information of the first target keyframe, the encoding position information of the first target keyframe being determined based on a difference between a position of the first target keyframe and a position of the second target keyframe; encode the encoding 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. Alternatively, the processor is configured to: decode a first encoding result from the encoding result of the tactile data to obtain encoding position information of the first target keyframe, the encoding position information corresponding to the first target keyframe being determined based on a difference between a position of the first target keyframe and a position of the second target keyframe, the first target keyframe and the second target keyframe being keyframes from the plurality of keyframes of the effect in the tactile data, the second target keyframe being a keyframe located before the first target keyframe; and determine the position of the first target keyframe based on the encoding position information of the first target keyframe. This terminal embodiment corresponds to the aforementioned tactile data encoding method or tactile data decoding method embodiment. Each implementation process and implementation method of the aforementioned tactile data encoding method or tactile data decoding method embodiment is applicable to this terminal embodiment and can achieve the same technical effects. Specifically, Figure 9 is a schematic diagram of the hardware structure of a terminal implementing an embodiment of the present application.

[0245] The terminal 600 includes but is not limited to: a radio 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 at least some of the components of the processor 610.

[0246] Those skilled in the art will appreciate that the terminal 600 may also include a power supply (such as a battery) to power various components. The power supply may be logically connected to the processor 610 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The terminal structure shown in FIG9 does not limit the terminal. The terminal may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.

[0247] It should be understood that in an embodiment of the present application, the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and at least one of other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0248] In the embodiment of the present application, after receiving downlink data from a network-side device, the radio frequency unit 601 may transmit the data to the processor 610 for processing. Furthermore, the radio frequency unit 601 may send uplink data to the network-side device. Typically, the radio frequency unit 601 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like.

[0249] The memory 609 can be used to store software programs or instructions and various data. The memory 609 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 609 may include a volatile memory or a non-volatile memory, or the memory 609 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory x09 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0250] Processor 610 may include one or more processing units. Optionally, processor 610 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 610.

[0251] Wherein, when the terminal is an encoding terminal:

[0252] The processor 610 is configured to:

[0253] Obtaining a position of each key frame in a plurality of key frames of the effect in the tactile data, where the plurality of key frames include a first target key frame and a second target key frame, where the second target key frame is a key frame located before the first target key frame;

[0254] Determining encoding position information of a first target key frame, where the encoding position information of the first target key frame is determined according to a difference between a position of the first target key frame and a position of the second target key frame;

[0255] Encoding the encoding position information of the first target key frame to obtain a first encoding result;

[0256] The encoding result of the tactile data includes the first encoding result.

[0257] Optionally, the second target key frame is a key frame that is located before the first target key frame and is closest to the first target key frame.

[0258] Optionally, the processor 610 is further configured to:

[0259] Determine a first bit number, where the first bit number is determined based on encoding position information corresponding to each key frame in the multiple key frames;

[0260] The encoding position information of the first target key frame is encoded using the first bit number as the encoding bit number to obtain a first encoding result.

[0261] Optionally, the processor 610 is specifically configured to:

[0262] Determine a maximum value of the encoding position information corresponding to the multiple key frames;

[0263] The number of coding bits required for the maximum value is determined as the first number of bits.

[0264] Optionally, the encoding result of the tactile data further includes the first bit number.

[0265] Optionally, the first target key frame is a key frame among the multiple key frames except a third target key frame, and the third target key frame is the first key frame of the effect;

[0266] The processor 610 is further configured to:

[0267] Encoding the encoding position information of the third target key frame to obtain a second encoding result;

[0268] The encoding result of the tactile data also includes the second encoding result.

[0269] Optionally, the processor 610 is specifically configured to:

[0270] In a case where the position of the third target key frame is the same as the effect position of the effect, determining the second encoding result to be a preset value; or

[0271] In a case where the position of the third target key frame is different from the effect position of the effect, the encoding position information of the third target key frame is encoded based on a preset encoding bit number to obtain the second encoding result.

[0272] Optionally, the first target key frame is a key frame other than a third target key frame among the multiple key frames, the third target key frame is the first key frame of the effect, and the first bit number is determined based on encoding position information corresponding to the key frames other than the third target key frame among the multiple key frames;

[0273] The processor 610 is specifically configured to:

[0274] In a case where the position of the third target key frame is different from the effect position of the effect, determining a second number of bits, where the second number of bits represents a number of coding bits required to encode the coding position information of the third target key frame;

[0275] When the second bit number is greater than the first bit number, updating the first bit number to the second bit number;

[0276] The updated first bit number is used as the encoding bit number to encode the encoding position information of the first target key frame to obtain a first encoding result.

[0277] Optionally, the processor 610 is further configured to:

[0278] Encoding the encoding position information of the third target key frame using the updated first bit number as the encoding bit number to obtain a second encoding result;

[0279] The encoding result of the tactile data also includes the second encoding result.

[0280] Optionally, when different key frames of the effect are located in the first data packet and the second data packet respectively, and the key frame before the fourth target key frame is located in the first data packet: the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the start time position of the second data packet, or the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the effect position of the effect;

[0281] The fourth target key frame is the first key frame in the second data packet, and the first target key frame is a key frame among the multiple key frames except the fourth target key frame.

[0282] Optionally, the processor 610 is specifically configured to:

[0283] A key frame list of the effect in the tactile data is obtained, where the key frame list includes positions of multiple key frames, and the positions of the multiple key frames are arranged in chronological order.

[0284] Wherein, when the terminal is a decoding terminal:

[0285] The processor 610 is configured to:

[0286] Decoding a first encoding result among the encoding results of the tactile data to obtain encoding position information of a first target key frame, where the encoding position information corresponding to the first target key frame is determined based on a difference between a position of the first target key frame and a position of a second target key frame, where the first target key frame and the second target key frame are key frames among multiple key frames of the effect in the tactile data, and the second target key frame is a key frame located before the first target key frame;

[0287] The position of the first target key frame is determined based on the encoded position information of the first target key frame.

[0288] Optionally, the second target key frame is a key frame that is located before the first target key frame and is closest to the first target key frame.

[0289] Optionally, the processor 610 is further configured to:

[0290] Decoding a first encoding result in the encoding results of the tactile data based on a first bit number to obtain encoding position information of a first target key frame;

[0291] The first number of bits is the number of bits for encoding the encoding position information of the first target key frame.

[0292] Optionally, the encoding result of the tactile data further includes the first bit number, and the first bit number is determined based on encoding position information corresponding to each key frame in the multiple key frames.

[0293] Optionally, the first number of bits is the number of coding bits required for a maximum value of the coding position information corresponding to the multiple key frames.

[0294] Optionally, the encoding result of the tactile data further includes a second encoding result, the first target key frame is a key frame other than a third target key frame among the multiple key frames, the third target key frame is a first key frame of the effect, and the processor 610 is further configured to:

[0295] The position of the third target key frame is determined based on the second encoding result.

[0296] Optionally, the processor 610 is specifically configured to:

[0297] When the second encoding result is a preset value, determining that the position of the third target key frame is the same as the effect position of the effect; or

[0298] When the second encoding result is not the preset value, the second encoding result is decoded based on the preset encoding bit number to obtain the encoding position information of the third target key frame; and the position of the third target key frame is determined based on the encoding position information of the third target key frame.

[0299] Specifically, the terminal of the embodiment of the present application also includes: instructions or programs stored in the memory 609 and executable on the processor 610. The processor 610 calls the instructions or programs in the memory 609 to execute the methods of the modules shown in FIG6 or FIG7 and achieve the same technical effect. To avoid repetition, they will not be elaborated here.

[0300] An embodiment of the present application further provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned tactile data encoding method embodiment are implemented. Alternatively, when the program or instruction is executed by a processor, the various processes of the above-mentioned tactile data decoding method embodiment are implemented, and the same technical effects can be achieved. To avoid repetition, they are not repeated here.

[0301] The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. In some examples, the readable storage medium may be a non-transitory readable storage medium.

[0302] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned tactile data encoding method embodiment, or to implement the various processes of the above-mentioned tactile data decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0303] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0304] An embodiment of the present application further provides a computer program / program product, which is stored in a storage medium and is executed by at least one processor to implement the various processes of the above-mentioned tactile data encoding method or tactile data decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0305] An embodiment of the present application also provides a coding and decoding system, including: an encoding end device and a decoding end device, wherein the encoding end device can be used to execute the steps of the tactile data encoding method described above, and the decoding end device can be used to execute the steps of the tactile data decoding method described above.

[0306] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0307] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of a computer software product plus a necessary general-purpose hardware platform, or of course, by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes a number of instructions for enabling a terminal or network-side device to execute the methods described in each embodiment of the present application.

[0308] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of this application and the scope of protection of the claims. These implementation methods are all within the protection of this application.

Claims

1. A tactile data encoding method, comprising: Acquire the position of each key frame in a plurality of key frames of the effect in the tactile data, wherein the plurality of key frames include a first target key frame and a second target key frame, wherein the second target key frame is a key frame located before the first target key frame; Determining encoding position information of a first target key frame, wherein the encoding position information of the first target key frame is determined according to a difference between a position of the first target key frame and a position of the second target key frame; Encoding the encoding position information of the first target key frame to obtain a first encoding result; The encoding result of the tactile data includes the first encoding result.

2. The method according to claim 1, wherein: The second target key frame is a key frame that is located before the first target key frame and is closest to the first target key frame.

3. The method according to claim 1, wherein: After determining the encoding position information of the first target key frame, the method further includes: Determine a first bit number, where the first bit number is determined based on encoding position information corresponding to each key frame in the multiple key frames; The step of encoding the encoding position information of the first target key frame to obtain a first encoding result includes: The encoding position information of the first target key frame is encoded using the first bit number as the encoding bit number to obtain a first encoding result.

4. The method according to claim 3, wherein: The determining of the first bit number comprises: Determine a maximum value of the encoding position information corresponding to the multiple key frames; The number of coding bits required for the maximum value is determined as the first number of bits.

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

6. The method according to any one of claims 1 to 5, wherein: The first target key frame is a key frame among the multiple key frames except a third target key frame, and the third target key frame is the first key frame of the effect; The method further comprises: Encoding the encoding position information of the third target key frame to obtain a second encoding result; The encoding result of the tactile data also includes the second encoding result.

7. The method according to claim 6, wherein: The step of encoding the encoding position information of the third target key frame to obtain a second encoding result includes: In a case where the position of the third target key frame is the same as the effect position of the effect, determining that the second encoding result is a preset value; or In a case where the position of the third target key frame is different from the effect position of the effect, the encoding position information of the third target key frame is encoded based on a preset number of encoding bits to obtain the second encoding result.

8. The method according to claim 3, wherein: The first target key frame is a key frame other than a third target key frame among the multiple key frames, the third target key frame is the first key frame of the effect, and the first bit number is determined based on encoding position information corresponding to key frames other than the third target key frame among the multiple key frames; The step of encoding the encoding position information of the first target key frame by using the first bit number as the encoding bit number to obtain a first encoding result includes: In a case where the position of the third target key frame is different from the effect position of the effect, determining a second number of bits, where the second number of bits represents the number of coding bits required to encode the coding position information of the third target key frame; When the second bit number is greater than the first bit number, updating the first bit number to the second bit number; The updated first bit number is used as the encoding bit number to encode the encoding position information of the first target key frame to obtain a first encoding result.

9. The method according to claim 8, wherein: The method further comprises: Encoding the encoding position information of the third target key frame using the updated first bit number as the encoding bit number to obtain a second encoding result; The encoding result of the tactile data also includes the second encoding result.

10. The method according to any one of claims 1 to 9, wherein: In the case where different key frames of the effect are located in the first data packet and the second data packet respectively, and the key frame before the fourth target key frame is located in the first data packet: the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the start time position of the second data packet, or the encoding position information of the fourth target key frame is determined according to the difference between the position of the fourth target key frame and the effect position of the effect; The fourth target key frame is the first key frame in the second data packet, and the first target key frame is a key frame among the multiple key frames except the fourth target key frame.

11. The method according to any one of claims 1 to 10, wherein: The step of obtaining the position of each key frame in the plurality of key frames of the effect in the tactile data comprises: A key frame list of the effect in the tactile data is obtained, wherein the key frame list includes positions of multiple key frames, and the positions of the multiple key frames are arranged in chronological order.

12. A tactile data decoding method, comprising: Decoding a first encoding result in the encoding results of the tactile data to obtain encoding position information of a first target key frame, wherein the encoding position information corresponding to the first target key frame is determined according to a difference between a position of the first target key frame and a position of a second target key frame, wherein the first target key frame and the second target key frame are key frames among multiple key frames of the effect in the tactile data, and the second target key frame is a key frame located before the first target key frame; The position of the first target key frame is determined based on the encoded position information of the first target key frame.

13. The method according to claim 12, wherein: The second target key frame is a key frame that is located before the first target key frame and is closest to the first target key frame.

14. The method according to claim 12 or 13, wherein: The decoding of the first encoding result in the encoding results of the tactile data to obtain the encoding position information of the first target key frame includes: Decoding a first encoding result in the encoding results of the tactile data based on a first bit number to obtain encoding position information of a first target key frame; The first number of bits is the number of bits for encoding the encoding position information of the first target key frame.

15. The method according to claim 14, wherein: The encoding result of the tactile data further includes the first bit number, which is determined based on encoding position information corresponding to each key frame in the multiple key frames.

16. The method according to claim 14 or 15, wherein: The first number of bits is the number of encoding bits required for the maximum value of the encoding position information corresponding to the multiple key frames.

17. The method according to any one of claims 12 to 16, wherein: The encoding result of the tactile data further includes a second encoding result, the first target key frame is a key frame other than a third target key frame among the multiple key frames, the third target key frame is a first key frame of the effect, and the method further includes: The position of the third target key frame is determined based on the second encoding result.

18. The method according to claim 17, wherein: The determining the position of the third target key frame based on the second encoding result includes: When the second encoding result is a preset value, determining that the position of the third target key frame is the same as the effect position of the effect; or When the second encoding result is not the preset value, the second encoding result is decoded based on the preset encoding bit number to obtain the encoding position information of the third target key frame; and the position of the third target key frame is determined based on the encoding position information of the third target key frame.

19. A tactile data encoding device, comprising: An acquisition module, used to acquire the position of each key frame in a plurality of key frames of the effect in the tactile data, wherein the plurality of key frames include a first target key frame and a second target key frame, wherein the second target key frame is a key frame located before the first target key frame; A first determination module, used to determine the encoding position information of a first target key frame, wherein the encoding position information of the first target key frame is determined according to the difference between the position of the first target key frame and the position of the second target key frame; A first encoding module, used for encoding the encoding position information of the first target key frame to obtain a first encoding result; The encoding result of the tactile data includes the first encoding result.

20. A tactile data decoding device, comprising: A decoding module is used to decode a first encoding result in the encoding results of the tactile data to obtain encoding position information of a first target key frame, wherein the encoding position information corresponding to the first target key frame is determined according to a difference between a position of the first target key frame and a position of a second target key frame, and the first target key frame and the second target key frame are respectively The key frame is a key frame among a plurality of key frames of the effect in the tactile data, and the second target key frame is a key frame located before the first target key frame; The first determining module is used to determine the position of the first target key frame based on the encoding position information of the first target key frame.

21. A terminal comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein: When the program or instruction is executed by the processor, the steps of the tactile data encoding method as described in any one of claims 1 to 11 are implemented; or, when the program or instruction is executed by the processor, the steps of the tactile data decoding method as described in any one of claims 12 to 18 are implemented.

22. A readable storage medium storing a program or an instruction, wherein: When the program or instruction is executed by the processor, the steps of the tactile data encoding method as described in any one of claims 1 to 11 are implemented; or, when the program or instruction is executed by the processor, the steps of the tactile data decoding method as described in any one of claims 12 to 18 are implemented.

Citation Information

Patent Citations

  • Enhanced dynamic haptic effects

    CN103869969A

  • Method And Schemes For Perceptually Driven Encoding Of Haptic Effects

    CN107710107A

  • Haptic effect generation for space-dependent content

    CN108255295A

  • Encoding dynamic haptic effects

    CN108803869A