A data compression method and device

A compression method and compression device technology, applied in the computer field, can solve problems such as long loading time, large full-frame motion data, and large storage space, so as to achieve the effects of reducing storage space, increasing loading speed, and improving user experience

Active Publication Date: 2019-12-24
LAYABOX NETWORK TECH BEIJING CO LTD
4 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0007] In view of this, the embodiments of the present invention provide a data compression method and device, which are use...
View more

Method used

By the compression equipment of described data, described acquisition unit obtains the original frame data corresponding to animation, and described determination unit determines the computable frame data in described original frame data, and described determination unit is also used for will not contain The original frame data of the computable frame data is determined to be compressed data, so as to realize the data compression of the original frame data corresponding to the animation, so that during the running of the game program, the loading speed of the animation data is increased, and the loading completion time is reduced. The storage space occupied by the final animation data c...
View more

Abstract

The embodiment of the invention provides a data compression method and equipment. The data compression method comprises the following steps: determining computable frame data in original frame data through acquiring the original frame data corresponding to cartoons; and furthermore, deleting the computable frame data so as to realize data compression on the original frame data corresponding to the cartoons, and obtain compressed cartoon data without the computable frame data. Therefore, in a running process of a game program, the loading speed of cartoon data is increased, the storage space occupied by the cartoon data after loading is reduced, and the user experience of users on games is effectively improved.

Application Domain

Video games

Technology Topic

Data compressionAnimation +2

Image

  • A data compression method and device
  • A data compression method and device
  • A data compression method and device

Examples

  • Experimental program(4)

Example Embodiment

[0042] Example 1
[0043] figure 1 It is a schematic flowchart of a data compression method provided by an embodiment of the present invention. The method can be as follows.
[0044] Step 11: Obtain the original frame data corresponding to the animation.
[0045] In step 11, after the game developer completes the character animation in the three-dimensional animation software, the action data corresponding to the character animation is exported from the three-dimensional animation software in full frame, and the full-frame action corresponding to the character animation is obtained. The data is the original frame data corresponding to the character animation.
[0046] For example, the game character includes 50 bones, and the skeletal animation corresponding to each bone includes 100 frames of action data. Therefore, the original frame data corresponding to the character animation of the game character includes 50×100=5000 frames of data.
[0047] Step 12: Determine the computable frame data in the original frame data.
[0048] Wherein, the computable frame data represents frame data that can be obtained through calculation in the original frame data.
[0049] In step 12, for the original frame data obtained in step 11, which contains frame data that can be obtained by calculation, it is determined that the original frame data includes frame data that can be obtained by calculation.
[0050] Step 13: Determine the original frame data that does not include the computable frame data as compressed animation data. .
[0051] In step 13, the computable frame data determined in step 12 is removed from the original frame data to achieve data compression of the original frame data, and all the computable frame data will not be included. The original frame data is determined to be compressed animation data.
[0052] It should be noted that the number of data frames included in the compressed animation data obtained after the original frame data is compressed is determined according to actual conditions, and is not specifically limited here. When the action animation corresponding to the original frame data is simpler, the number of data frames contained in the obtained compressed animation data is less.
[0053] The embodiment of the present invention obtains the original frame data corresponding to the animation, determines the computable frame data in the original frame data, and then deletes the computable frame data, so as to realize the data compression of the original frame data corresponding to the animation, and obtain the The compressed animation data containing the computable frame data enables the game program to increase the loading speed of the animation data during the running process, reduce the storage space occupied by the animation data after the loading is completed, and effectively improve the user experience of the game. .

Example Embodiment

[0054] Example 2
[0055] Based on the same inventive concept, in the embodiment of the present invention, it is further described in detail how the "determining the computable frame data in the original frame data" recorded in the above-mentioned embodiment 1 is specifically implemented.
[0056] Step 12 records "determine the calculable frame data in the original frame data. The calculable frame data represents frame data in the original frame data that can be calculated."
[0057] The following describes in detail how to determine the computable frame data. figure 2 This is a schematic flowchart of a method for determining computable frame data provided by an embodiment of the present invention. The method can be as follows.
[0058] Using the original frame data as input frame data, perform the following steps 21-24 for the first time to determine the computable frame data:
[0059] Step 21: Determine the compressed data corresponding to the non-edge frame data in the input frame data.
[0060] Wherein, the compressed data corresponding to any non-edge frame data in the input frame data is the input frame data lacking the frame data.
[0061] For example, the original frame data corresponding to a 0.3-second animation contains 10 frames of data, the 10-frame data is continuous frame data with equal time intervals, and the time interval between two adjacent frames of data is 1/30 second.
[0062] Using the original frame data containing 10 frames of data as input frame data, the operation of step 21 is performed to determine the compressed data corresponding to the non-edge frame data in the input frame data.
[0063] The non-edge frames of data are respectively the 2-9th frame data in the original frame data.
[0064] The compressed data corresponding to any non-edge frame data in the input frame data is the input frame data lacking the frame data, therefore:
[0065] The compressed data corresponding to the second frame data is "the first frame data, the 3-10th frame data";
[0066] The compressed data corresponding to the third frame data is "the 1-2 frame data, the 4-10 frame data";
[0067] The compressed data corresponding to the 4th frame data is "1-3th frame data, 5-10th frame data";
[0068] By analogy, the compressed data corresponding to each frame data in the 2-9th frame data are determined respectively.
[0069] Step 22: Determine the error value between the calculated data corresponding to the non-edge frame data and the original frame data.
[0070] Wherein, the calculation data corresponding to any non-edge frame data is calculated through the compressed data corresponding to the frame data.
[0071] Preferably, the calculation data corresponding to any non-edge frame data is calculated from the compressed data corresponding to the frame data, and includes:
[0072] Perform a linear interpolation operation on the compressed data corresponding to any non-edge frame data to obtain calculation data corresponding to the frame data.
[0073] Still taking the above 0.3-second animation as an example, the original frame data corresponding to the 0.3-second animation includes frame data from 1 to 10, and the non-edge frame data is the second frame data in the original frame data. -9 frames of data.
[0074] The calculation data corresponding to the non-edge frame data is determined, that is, the calculation data of the 2-9th frame data is determined.
[0075] The compressed data corresponding to the second frame data is "the first frame data, the 3-10th frame data".
[0076] Perform a linear interpolation operation on the first frame data and the third frame data adjacent to the second frame data to determine the second calculation frame data corresponding to the second frame data.
[0077] Therefore, the calculation data corresponding to the second frame data is "the first frame data, the second calculation frame data, and the 3-10 frame data".
[0078] Furthermore, the error value between the calculation data corresponding to the second frame data and the original frame data is determined, that is, the difference between the "first frame data, the second calculation frame data, and the 3-10 frame data" is determined. Describe the error value between "1-10 frame data".
[0079] The compressed data corresponding to the third frame data is "1-2th frame data, 4-10th frame data".
[0080] Perform a linear interpolation operation according to the second frame data and the fourth frame data adjacent to the third frame data to determine the third calculation frame data corresponding to the third frame data.
[0081] Therefore, the calculation data corresponding to the third frame data is "the 1-2 frame data, the third calculation frame data, and the 4-10 frame data".
[0082] Furthermore, the error value between the calculated data corresponding to the third frame data and the original frame data is determined, that is, "the 1-2 frame data, the third calculated frame data, the 4-10 frame data" and " The error value between 1-10 frame data".
[0083] By analogy, the error value between the calculated data corresponding to each frame data in the "2-9 frame data" and the original frame data is determined respectively.
[0084] Step 23: Determine whether there is an error value that meets a preset condition among the error values ​​corresponding to the non-edge frame data.
[0085] Preferably, the error value that satisfies the preset condition represents an error value that has the smallest value among the error values ​​corresponding to the non-edge frames of data and the value is smaller than the preset value.
[0086] It should be noted that the preset value can be determined according to actual conditions, and there is no specific limitation here.
[0087] Still taking the above 0.3-second animation as an example, it is determined whether there is an error value that meets a preset condition in the error value corresponding to each frame data in the "2-9th frame data".
[0088] Among the error values ​​corresponding to each frame data in the "2-9 frame data", the error value corresponding to the fourth frame data is the smallest numerical error value, and the error value corresponding to the fourth frame data is less than the preset value.
[0089] Therefore, the error value corresponding to the fourth frame of data is an error value that meets a preset condition.
[0090] Step 24: If it exists, determine the frame data corresponding to the error value that meets the preset condition as the computable frame data, use the compressed data corresponding to the computable frame data as the input frame data, and repeat the above steps 21-24.
[0091] Still taking the above 0.3-second animation as an example, since the error value corresponding to the fourth frame of data is an error value that meets a preset condition, the fourth frame of data is determined as computable frame data.
[0092] The compressed data corresponding to the fourth frame data is used as the input frame data, and the above steps 21-24 are executed for the second time to determine the computable frame data.
[0093] In the second execution of steps 21-24 to determine the computable frame data, the input frame data is the compressed data corresponding to the 4th frame data, that is, "the 1-3th frame data, the 5th-10th frame data" Frame data".
[0094] The operation of step 21 is performed on the input frame data to determine the compressed data corresponding to the non-edge frame data in the input frame data.
[0095] The non-edge frames of data are "2-3th frame data, 5-9th frame data".
[0096] The compressed data corresponding to any non-edge frame data in the input frame data is the input frame data lacking the frame data, therefore:
[0097] The compressed data corresponding to the second frame data is "the first frame data, the third frame data, and the 5th-10th frame data";
[0098] The compressed data corresponding to the third frame data is "1-2 frame data, 5-10 frame data";
[0099] The compressed data corresponding to the fifth frame data is "1-3th frame data, 6-10th frame data";
[0100] By analogy, the compressed data corresponding to each frame of data in the "2-3th frame data and 5-9th frame data" are respectively determined.
[0101] The operation of step 22 is performed to determine the error value between the calculated data corresponding to each frame data in the "2-3th frame data, 5-9th frame data" and the original frame data.
[0102] The compressed data corresponding to the second frame data is "the first frame data, the third frame data, and the 5th-10th frame data".
[0103] Perform a linear interpolation operation on the first frame data and the third frame data adjacent to the second frame data to determine the second calculation frame data corresponding to the second frame data; The third frame data and the fifth frame data adjacent to the frame data perform a linear interpolation operation to determine the fourth calculation frame data corresponding to the fourth frame data.
[0104] Therefore, the calculation data corresponding to the second frame data is "the first frame data, the second calculation frame data, the third frame data, the fourth calculation frame data, and the 5th-10th frame data".
[0105] Furthermore, the error value between the calculation data corresponding to the second frame data and the original frame data is determined, that is, the "first frame data, second calculation frame data, third frame data, and fourth calculation frame are determined The error value between the data, the 5th-10th frame data" and the said "1-10th frame data".
[0106] The compressed data corresponding to the third frame data is "1-2 frame data, 5-10 frame data".
[0107] The time interval between the third and fourth frame data is equal, and linear interpolation is performed on the second frame data and the fifth frame data adjacent to the third and fourth frame data to determine the The third calculation frame data corresponding to the three frames of data and the fourth calculation frame data corresponding to the fourth frame of data.
[0108] Therefore, the calculation data corresponding to the third frame data is "the 1-2 frame data, the 3-4 calculation frame data, and the 5-10 frame data".
[0109] Furthermore, the error value between the calculated data corresponding to the third frame data and the original frame data is determined, that is, the "1-2 frame data, the 3-4 calculated frame data, and the 5-10 frame The error value between the “data” and the “1-10th frame data”.
[0110] By analogy, determine the non-edge frame data in the input frame data, that is, the calculation data corresponding to each frame data in the "2-3 frame data, 5-9 frame data" and the The error value between the original frame data.
[0111] It is determined whether there is an error value that satisfies a preset condition among the error values ​​corresponding to each frame data in the "2-3th frame data, 5-9th frame data".
[0112] Among the error values ​​corresponding to each frame data in the "2-3th frame data, 5th-9th frame data", the error value corresponding to the 7th frame data is the error value with the smallest value, and the first The error value corresponding to 7 frames of data is less than the preset value.
[0113] Therefore, the error value corresponding to the seventh frame data is an error value that satisfies a preset condition, and the seventh frame data is determined to be the frame data that can be calculated.
[0114] The compressed data corresponding to the seventh frame data is used as the input frame data, and the above steps 21-24 are executed for the third time to determine the computable frame data.
[0115] Preferably, the method further includes:
[0116] If there is no error value satisfying the preset condition among the error values ​​corresponding to the non-edge frame data, the operation of determining the computable frame data is terminated.
[0117] Still taking the above 0.3-second animation as an example, in the third execution of steps 21-24 to determine the computable frame data, the input frame data is the compressed data corresponding to the seventh frame data, that is, the "th 1-3 frame data, 5-6 frame data, 8-10 frame data".
[0118] The operation of step 21 is performed on the input frame data to determine the compressed data corresponding to the non-edge frame data in the input frame data.
[0119] The non-edge frame data is "2-3th frame data, 5-6th frame data, and 8-9th frame data".
[0120] The compressed data corresponding to any non-edge frame data in the input frame data is the input frame data lacking the frame data, therefore:
[0121] The compressed data corresponding to the second frame data is "the first frame data, the third frame data, the 5th-6th frame data, and the 8th-10th frame data";
[0122] The compressed data corresponding to the third frame data is "the 1-2 frame data, the 5-6 frame data, and the 8-10 frame data";
[0123] The compressed data corresponding to the 5th frame data is "1-3th frame data, 6th frame data, 8-10th frame data";
[0124] By analogy, the compressed data corresponding to each frame data in the "2-3th frame data, 5-6th frame data, and 8-9th frame data" are respectively determined.
[0125] Perform the operation of step 22 to determine the error between the calculated data corresponding to each frame data in the "2-3 frame data, 5-6 frame data, and 8-9 frame data" and the original frame data value.
[0126] The compressed data corresponding to the second frame data is "the first frame data, the third frame data, the 5th-6th frame data, and the 8th-10th frame data".
[0127] Perform a linear interpolation operation on the first frame data and the third frame data adjacent to the second frame data to determine the second calculation frame data corresponding to the second frame data; The third frame data and the fifth frame data adjacent to the frame data perform a linear interpolation operation to determine the fourth calculation frame data corresponding to the fourth frame data; for all adjacent to the seventh frame data The sixth frame data and the eighth frame data perform a linear interpolation operation to determine the seventh calculation frame data corresponding to the seventh frame data.
[0128] Therefore, the calculation data corresponding to the second frame data is "1st frame data, 2nd calculation frame data, 3rd frame data, 4th calculation frame data, 5th-6th frame data, 7th calculation frame data, 8-10 frame data".
[0129] Furthermore, the error value between the calculation data corresponding to the second frame data and the original frame data is determined, that is, the "first frame data, second calculation frame data, third frame data, and fourth calculation frame are determined The error value between the data, the 5th-6th frame data, the 7th calculated frame data, the 8th-10th frame data" and the "1-10th frame data".
[0130] The compressed data corresponding to the third frame data is "1-2 frame data, 5-6 frame data, 8-10 frame data".
[0131] The time interval between the third and fourth frame data is equal, and linear interpolation is performed on the second frame data and the fifth frame data adjacent to the third and fourth frame data to determine the The third calculation frame data corresponding to the 3 frames of data and the fourth calculation frame data corresponding to the 4th frame data; execute on the 6th frame data and the 8th frame data adjacent to the 7th frame data The linear interpolation operation determines the seventh frame data corresponding to the seventh frame data.
[0132] Therefore, the calculation data corresponding to the third frame data is "the 1-2 frame data, the 3-4 calculation frame data, the 5-6 frame data, the seventh calculation frame data, and the 8-10 frame data".
[0133] Furthermore, the error value between the calculated data corresponding to the third frame data and the original frame data is determined, that is, the "1-2 frame data, the 3-4 calculated frame data, and the 5-6 frame Data, the seventh calculated frame data, the 8-10th frame data" and the error value between the "1-10th frame data".
[0134] By analogy, determine the non-edge frame data in the input frame data, that is, each frame data in the "2-3 frame data, 5-6 frame data, and 8-9 frame data" corresponds to The error value between the calculated data and the original frame data.
[0135] It is determined whether there is an error value that satisfies a preset condition among the error values ​​corresponding to each frame data in the "2-3th frame data, 5-6th frame data, and 8-9th frame data".
[0136] Among the error values ​​corresponding to each frame data in the "2-3 frame data, 5-6 frame data, and 8-9 frame data", the error value corresponding to the 6th frame data is the error with the smallest value Value, but the error value corresponding to the 6th frame data is not less than the preset value.
[0137] Therefore, there is no error value that meets the preset condition in the error value corresponding to each frame data in the "2-3 frame data, 5-6 frame data, and 8-9 frame data", and the execution of step 21 is terminated. -24 Determine the operation of the computable frame data.
[0138] By performing steps 21-24 three times to determine the calculation of the frame data, it can be known that the original frame data corresponding to the 0.3-second animation contains the data of frames 1-10, wherein the data of the fourth frame and the The 7th frame data is computable frame data.

Example Embodiment

[0139] Example 3
[0140] Based on the same inventive concept, for the compressed animation data determined by the method described in the above-mentioned embodiment 1 and/or embodiment 2, in order to ensure that the game engine runs the compressed animation data to obtain the game effect and operation The game effect obtained by the original frame data will not affect the user experience of the game, and the original frame data and the compressed animation data are tested and compared.
[0141] image 3 The schematic diagram of the action animation corresponding to the original frame data provided by the embodiment of the present invention.
[0142] Figure 4 A schematic diagram of an action animation corresponding to the compressed animation data provided by the embodiment of the present invention.
[0143] by image 3 with Figure 4 It can be seen by comparison that using the data compression method described in the embodiment of the present invention, the compressed animation data contains only 15 frames of data, and the motion animation obtained from the compressed animation data is the same as the motion animation obtained from the original frame data. Similar, it will not affect the user experience of the game.
[0144] At the same time, an embodiment of the present invention also provides a game in which the animation data in the game is obtained after compressing the original frame data using the data compression method described in Embodiment 1 and/or Embodiment 2 above. The compressed animation data.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Resource loading and packaging method and device, equipment and medium

PendingCN112035187AImprove loading speed
Owner:北京思明启创科技有限公司

Method and device for adding webpage to window in three-dimensional model, terminal and storage medium

PendingCN111597478AImprove loading speedPrevent animation effects from freezing
Owner:深圳市华橙数字科技有限公司

Application starting method and device, terminal and storage medium

PendingCN112860439AImprove loading speedfast startup
Owner:BEIJING BYTEDANCE NETWORK TECH CO LTD

Dynamic display method, device and equipment for static picture

PendingCN111724460AImprove loading speedImprove user experience
Owner:BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1

Game loading method and device, equipment and storage medium

PendingCN111013157AReduce waste of resourcesImprove loading speed
Owner:上海米哈游网络科技股份有限公司

Classification and recommendation of technical efficacy words

  • Improve loading speed
  • save storage space

Preloading method and device for webpage information

ActiveCN107066632AImprove loading speedAvoid Webpage Caton
Owner:XIAMEN MEET YOU INFORMATION TECH

Network data storing, obtaining method and its implementing device

InactiveCN101115064AReduce data download pressureImprove loading speed
Owner:TENCENT TECH (SHENZHEN) CO LTD

Road network shape point data loading method and device, and navigation method and device

ActiveCN103185582AImproved loading and usage performanceImprove loading speed
Owner:SHANGHAI PATEO ELECTRONIC EQUIPMENT MANUFACTURING CO LTD

Page data processing method device and equipment and computer readable storage medium

PendingCN110083616AImprove loading speed
Owner:WEBANK (CHINA)

Applet page rendering method and device, electronic equipment and storage medium

PendingCN112540806AImprove loading speedImprove page performance
Owner:BEIJING BAIDU NETCOM SCI & TECH CO LTD

Method and system for displaying phone number information

ActiveCN103078949AReduce the amount of operationsave storage space
Owner:BEIJING QIHOO TECH CO LTD

Method of encoding structured low density check code

InactiveCN101141133AGood frame error rate performancesave storage space
Owner:BEIJING UNIV OF POSTS & TELECOMM +1

De-block effect filtering device and method

InactiveCN101409833Asave storage spaceloose timing
Owner:昆山杰得微电子有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products