CN109589608A - The method and apparatus for protecting game data - Google Patents
The method and apparatus for protecting game data Download PDFInfo
- Publication number
- CN109589608A CN109589608A CN201811552449.3A CN201811552449A CN109589608A CN 109589608 A CN109589608 A CN 109589608A CN 201811552449 A CN201811552449 A CN 201811552449A CN 109589608 A CN109589608 A CN 109589608A
- Authority
- CN
- China
- Prior art keywords
- encryption
- rendered
- data
- parameter
- encrypted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/70—Game security or game management aspects
- A63F13/75—Enforcing rules, e.g. detecting foul play or generating lists of cheating players
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- General Business, Economics & Management (AREA)
- Storage Device Security (AREA)
Abstract
The embodiment of the present invention provides a kind of method and apparatus for protecting game data, original data to be rendered to be encrypted are encrypted according to encryption relevant parameter by CPU, the data to be rendered encrypted, GPU is according to encryption relevant parameter, the data to be rendered encrypted are decrypted, obtain original data to be rendered, it is drawn according to original data to be rendered, due to being encrypted to original data to be rendered, to, increase the difficulty that cheating procedure identification goes out original data to be rendered, so that cheating program can not modify to original data to be rendered, enhance the safety of model, in turn, improve the user experience of game player.
Description
Technical field
The present embodiments relate to computer technology more particularly to a kind of method and apparatus for protecting game data.
Background technique
With computer technology especially computer drawing technology, the development of computer networking technology and mobility device
Development, while possess several players received in the cell phone platform large size game on line of the same virtual 3D scene it is more and more
Player likes.This game relies on the hardware device of cell phone client, especially cell phone client graphics processor (Graphics
Processing Unit, GPU) carry out the drafting of virtual 3D scene.
However, exploration of some mobile phones because of platform, once possess root (root) permission, it can be to any interior in mobile phone
The video memory that bag deposit includes GPU is modified, so that mobile phone games are easy to carry out cheating operation by cheating modification of program data.Such as:
The vertex data for the model that cheating program needs to modify by the cache lookup of poll GPU, is then changed by internal storage data
The vertex data of the model of variable field scape modifies model in the performance of client, so that cheating personnel be made to make a profit.
In the prior art, server end passes through the number for the server-side for judging whether the incoming data of client meet server-side
According to whether the behavior to judge client is legal, when the behavior for determining client is illegal, alarms.
However, cheating has occurred and that using the method for the prior art, it can not effectively prevent the modification to model,
So that the user experience of game player is not high.
Summary of the invention
The embodiment of the present invention provides a kind of method and apparatus for protecting game data, to increase the safety of model, improves
The user experience of game player.
In a first aspect, the embodiment of the present invention provides a kind of method for protecting game data, comprising:
Central processor CPU is encrypted original data to be rendered to be encrypted according to encryption relevant parameter, obtains
To the data to be rendered encrypted;
Place is decrypted according to the encryption relevant parameter, to the data to be rendered encrypted in graphics processor GPU
Reason, obtains the original data to be rendered;
The GPU is drawn according to the original data to be rendered.
Optionally, the original data to be rendered to be encrypted are the vertex data of game model to be encrypted.
Optionally, the central processor CPU carries out original data to be rendered to be encrypted according to encryption relevant parameter
Before encryption processing step, further includes:
Predefine game model to be encrypted;
Obtain the game model for needing to draw;
When it is described to need the game model drawn be the game model to be encrypted when, obtain the game to be encrypted
The vertex data of model.
Optionally, the encryption relevant parameter includes: encryption function and encryption parameter.
Optionally, place is decrypted to the data to be rendered encrypted according to the encryption relevant parameter in the GPU
Reason, obtains the original data to be rendered, comprising:
The GPU obtains the encryption parameter from the CPU;
The GPU is according to the encryption parameter and pre-stored decryption function, to the number to be rendered encrypted
According to being decrypted, the original data to be rendered are obtained, the decryption function is the inverse function of the encryption function.
Optionally, place is decrypted to the data to be rendered encrypted according to the encryption relevant parameter in the GPU
Reason, obtains the original data to be rendered, comprising:
GPU decryption function according to the pre-stored data and deciphering parameter, to the data to be rendered encrypted into
Row decryption processing, obtains the original data to be rendered, and the decryption function is the inverse function of the encryption function, the decryption
Parameter is identical as the encryption parameter.
Optionally, place is decrypted to the data to be rendered encrypted according to the encryption relevant parameter in the GPU
Reason, before obtaining the original data to be rendered, further includes:
The encryption relevant parameter is transferred to the GPU by the CPU.
Optionally, the encryption relevant parameter is transferred to the GPU by the CPU, comprising:
The encryption function and the encryption parameter are transmitted to GPU by the CPU.
Optionally, place is decrypted to the data to be rendered encrypted according to the encryption relevant parameter in the GPU
Reason, obtains the original data to be rendered, comprising:
The GPU obtains decryption function according to the encryption function, and the decryption function is the inverse letter of the encryption function
Number;
The GPU obtains deciphering parameter according to the encryption parameter, and the encryption parameter is identical as the deciphering parameter;
The GPU carries out the data to be rendered encrypted according to the decryption function and the deciphering parameter
Decryption processing obtains the original data to be rendered.
Optionally, the encryption relevant parameter is transferred to the GPU by the CPU, comprising:
Decryption function and deciphering parameter are transmitted to GPU by the CPU;
Wherein, the decryption function is the inverse function of the encryption function, the deciphering parameter and the encryption parameter phase
Together.
Optionally, the encryption relevant parameter is transmitted to GPU by the CPU, comprising:
The selection rule and encryption function of encryption parameter are transmitted to GPU by the CPU.
Optionally, further includes:
The GPU is decrypted the second model according to default deciphering parameter;
Wherein, second model and the game model to be encrypted share the same tinter;
The data of second model are identical as after decryption processing before being decrypted.
Optionally, the encryption parameter is random value.
Second aspect, the embodiment of the present invention provide a kind of device for protecting game data, comprising:
Central processing unit, for original data to be rendered to be encrypted to be encrypted according to encryption relevant parameter,
The data to be rendered encrypted;
Graphics processor, for according to the encryption relevant parameter, the data to be rendered encrypted to be decrypted
Processing, obtains the original data to be rendered;
The graphics processor is also used to be drawn according to the original data to be rendered.
Optionally, the original data to be rendered to be encrypted are the vertex data of game model to be encrypted.
Optionally, the central processing unit is also used to predefine game model to be encrypted;Obtain the trip for needing to draw
Play model;When it is described to need the game model drawn be the game model to be encrypted when, obtain the game to be encrypted
The vertex data of model.
Optionally, the encryption relevant parameter includes: encryption function and encryption parameter.
Optionally, the graphics processor is specifically used for obtaining the encryption parameter from the CPU;Joined according to the encryption
The data to be rendered encrypted are decrypted in several and pre-stored decryption function, obtain it is described it is original to
Rendering data, the decryption function are the inverse function of the encryption function.
Optionally, the graphics processor is specifically used for decryption function according to the pre-stored data and deciphering parameter, to institute
It states the data to be rendered encrypted to be decrypted, obtains the original data to be rendered, the decryption function is described adds
The inverse function of close function, the deciphering parameter are identical as the encryption parameter.
Optionally, the central processing unit is also used to the encryption relevant parameter being transferred to the GPU.
Optionally, the central processing unit is specifically used for the encryption function and the encryption parameter being transmitted to GPU.
Optionally, the graphics processor is specifically used for obtaining decryption function according to the encryption function, is added according to described
Close parameter obtains deciphering parameter, according to the decryption function and the deciphering parameter, to the data to be rendered encrypted
It is decrypted, obtains the original data to be rendered, wherein the decryption function is the inverse function of the encryption function;
The encryption parameter is identical as the deciphering parameter;
Optionally, the central processing unit is specifically used for decryption function and deciphering parameter being transmitted to GPU;
Wherein, the decryption function is the inverse function of the encryption function, the deciphering parameter and the encryption parameter phase
Together.
Optionally, the central processing unit is specifically used for for the selection rule and encryption function of encryption parameter being transmitted to
GPU。
Optionally, the graphics processor is also used to that the second model is decrypted according to default deciphering parameter;
Wherein, second model and the game model to be encrypted share the same tinter;
The data of second model are identical as after decryption processing before being decrypted.
Optionally, the encryption parameter is random value.
The third aspect, the embodiment of the present invention provide a kind of storage medium, and the storage medium is used to store computer program,
The computer program is for realizing the method for protecting game data described in first aspect.
The method and apparatus of protection model provided in an embodiment of the present invention, by CPU according to encryption relevant parameter to be added
Close original data to be rendered are encrypted, the data to be rendered encrypted, and GPU is right according to encryption relevant parameter
The data to be rendered encrypted are decrypted, and obtain original data to be rendered, are drawn according to original data to be rendered,
Due to being encrypted to original data to be rendered, thus, increase the difficulty that cheating procedure identification goes out original data to be rendered, makes
The program that must practise fraud can not modify to original data to be rendered, enhance the safety of model, in turn, improve game player
User experience.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art
To obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of method for protecting game data provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of the method for another protection game data provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of the method for another protection game data provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of device for protecting game data provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Description and claims of this specification and term " first ", " second ", " third " " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiment of the present invention described herein for example can be to remove
Sequence other than those of illustrating or describe herein is implemented.In addition, term " includes " and " having " and theirs is any
Deformation, it is intended that cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, system, production
Product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include be not clearly listed or for this
A little process, methods, the other step or units of product or equipment inherently.
Before scene of game load, central processing unit (Central Processing Unit, CPU) encrypts needs
Original data to be rendered are encrypted, wherein original data to be rendered can be game model vertex data, can be by
The textures data of modification, data cached, supplemental characteristic (such as: color, sky of direction light etc.) etc., are loaded into scene of game
When drawing data to be rendered, graphics processor (Graphics Processing Unit, GPU) is to the data to be rendered encrypted
It is decrypted, obtains original data to be rendered, drawn according to original data to be rendered.Due to original number to be rendered
According to being encrypted, thus, increase the difficulty that cheating procedure identification goes out original data to be rendered, so that cheating program can not be to original
The data to be rendered that begin are modified, and the safety of model is enhanced, and in turn, improve the user experience of game player.
Technical solution of the present invention is described in detail with specifically embodiment below.These specific implementations below
Example can be combined with each other, and the same or similar concept or process may be repeated no more in some embodiments.
Fig. 1 is a kind of flow diagram of method for protecting game data provided in an embodiment of the present invention, as shown in Figure 1,
The method of the present embodiment is as follows:
S101:CPU is encrypted original data to be rendered to be encrypted according to encryption relevant parameter, obtains having added
Close data to be rendered.
Before scene of game load:
Determine the original data to be rendered of (needing to encrypt) to be encrypted in scene of game, wherein original data to be rendered
The vertex data that can be game model, the textures data that can be modified, data cached, supplemental characteristic (such as: direction light
Color, sky etc.) etc., in this regard, the embodiment of the present invention is with no restrictions.
Wherein, game model can be person model, be also possible to object model or other kinds of model, in this regard,
The embodiment of the present invention is with no restrictions.
Game model to be encrypted can be all persons' model in game, the part personage's mould being also possible in game
Type, such as: it can be the person model of dominant role;It is also possible to all or part of object model or other kinds of
Model determines which game model needs to encrypt, can be arranged according to practical application scene, in this regard, the embodiment of the present invention is not done
Limitation.
CPU can predefine game model to be encrypted, obtain the game model for needing to draw, when the trip that needs are drawn
When model of playing is game model to be encrypted, the vertex data of game model to be encrypted is obtained from video memory, using encryption letter
Several and encryption parameter, is encrypted the vertex data of game model to be encrypted, the data of the model encrypted.
To avoid cribber's opposite vertexes data and modify therefrom to make a profit so that cheating program can not recognize vertex data.
Wherein, the encryption function of selection, which should meet, can generate inverse function, the complexity effect model of encryption function
Degree of safety, encryption function is more complicated, and cheating device is more difficult to analyze encryption function, and the degree of safety of model is higher.
Wherein, the encryption parameter being encrypted every time can be a fixed value, be also possible to every time solid from one group
A value is selected in definite value, is also possible to a random value, if the encryption parameter used every time is different, increase cheating device, which analyzes, to be added
The difficulty of close parameter can further increase the safety of model.
S103:GPU according to encryption relevant parameter, the data to be rendered encrypted are decrypted, obtain it is original to
Rendering data.
When scene of game is loaded into and draws data to be rendered:
GPU obtains decryption function and deciphering parameter;GPU is according to decryption function and deciphering parameter to having encrypted to wash with watercolours
Dye data are decrypted.
Wherein, it includes but is not limited to following several possible realizations that GPU, which obtains decryption function and the mode of deciphering parameter,
Mode:
Wherein, decryption function is the inverse function of encryption function, and deciphering parameter is identical as encryption parameter.
A kind of possible implementation are as follows:
GPU can obtain decryption function and deciphering parameter from the CPU encryption function transmitted and encryption parameter, specifically
Ground can obtain decryption function by seeking the inverse function of encryption function;By encryption parameter directly as deciphering parameter.
By taking the vertex data of encrypted lottery model as an example, it is assumed that encryption function f, encryption parameter ɑ, the trip for needing to encrypt
The vertex of play model is V, and vertex is indicated by vertex position and normal, vertex position Vpos, normal Vnormal, after encryption
Vertex be V':
(V'pos,V'normal)=f (Vpos,Vnormal,ɑ)
For using simple linear function as encryption function,
V'pos=aVpos
V'normal=aVnormal
Correspondingly,
Vpos=V'pos/a
Vnormal=V'normal/a
Wherein, V'posFor the vertex position after encryption, V'normalFor the normal on the vertex after encryption.
Alternatively possible implementation are as follows:
CPU obtains decryption function and deciphering parameter according to encryption function and encryption parameter, by decryption function and deciphering parameter
It is transferred to GPU.
Correspondingly, GPU directly can obtain decryption function and decryption ginseng from the CPU decryption function transmitted and deciphering parameter
Number.
Another possible implementation are as follows:
GPU can obtain decryption function by seeking the inverse function of encryption function according to the encryption function that CPU is transmitted;
GPU can determine encryption parameter according to the selection rule of encryption parameter.
Another possible implementation are as follows:
What encryption function and decryption function CPU and GPU had made an appointment, then it does not need to carry out encryption function or decryption again
The transmitting of function;Correspondingly, GPU can be to be rendered to what is encrypted according to encryption parameter and pre-stored decryption function
Data are decrypted, and obtain original data to be rendered.
Optionally, the selection rule of encryption parameter and deciphering parameter or encryption parameter and deciphering parameter is also possible to CPU
It is set in advance in advance with GPU, does not then need the biography for the selection rule for carrying out encryption parameter, deciphering parameter or encryption parameter again
It passs.Correspondingly, GPU can carry out the data to be rendered encrypted according to the decryption function and deciphering parameter of pre-selection storage
Decryption processing obtains original data to be rendered.Alternatively, GPU determines deciphering parameter according to the selection rule of deciphering parameter, according to solution
Close parameter and pre-stored encryption function, are decrypted the data to be rendered encrypted, obtain original number to be rendered
According to.
S105:GPU is drawn according to original data to be rendered.
Optionally, when drawing data to be rendered, when any need transmits data to be rendered, what is all transmitted is after decrypting
Original data to be rendered.
By taking the vertex data of game model as an example, GPU successively carries out the draftings such as vertex variation, rasterisation and illumination behaviour
Make.After drawing game model, when the vertex data of any required TRANSFER MODEL, what is all transmitted is the vertex data after decryption.
The present embodiment is encrypted original data to be rendered to be encrypted according to encryption relevant parameter by CPU,
The data to be rendered encrypted, GPU are decrypted the data to be rendered encrypted according to encryption relevant parameter,
Original data to be rendered are obtained, are drawn according to original data to be rendered, due to being encrypted to original data to be rendered,
To increase the difficulty that cheating procedure identification goes out original data to be rendered, so that cheating program can not be to original data to be rendered
It modifies, enhances the safety of model, in turn, improve the user experience of game player.
Fig. 2 is the flow diagram of the method for another protection game data provided in an embodiment of the present invention, and Fig. 2 is to scheme
On the basis of 1 illustrated embodiment, optionally, can also include: before S103
S102:CPU is transferred to the GPU for relevant parameter is encrypted.
Including but not limited to following several possible implementations:
A kind of possible implementation: encryption function and encryption parameter are transmitted to GPU by CPU, specifically, can be by drawing
Application programming interface (Application Programming Interface, API) transmitting order transmitting processed.
Correspondingly, GPU obtains decryption function according to the encryption function, and the decryption function is the inverse of the encryption function
Function;The GPU obtains deciphering parameter according to the encryption parameter, and the encryption parameter is identical as the deciphering parameter;It is described
GPU is decrypted the data to be rendered encrypted, obtains according to the decryption function and the deciphering parameter
The original data to be rendered.
Alternatively possible implementation: decryption function and deciphering parameter are transmitted to GPU by CPU;
Wherein, decryption function is the inverse function of encryption function, and deciphering parameter is identical as the encryption parameter.
Another possible implementation: the selection rule and encryption function of encryption parameter are transmitted to GPU by CPU.
For example, one group of parameter can be safeguarded by encrypting end (CPU) and decrypting end (GPU), include extremely in this group of parameter
Few two encryption parameters, encryption end select a parameter to be used for original according to preset selection rule from this group of parameter
Data to be rendered are encrypted, and correspondingly, decrypting end selects one according to identical selection rule from this group of parameter
Parameter for the data to be rendered encrypted to be decrypted, selection rule for example: can be sequence according to parameter according to
Secondary use, it is assumed that there are three parameter, respectively (a, b, c) such as: encryption end for the first time use a parameter to original data to be rendered into
Row encryption is for the second time encrypted original data to be rendered using b parameter, for the third time using c parameter to original
Data to be rendered are encrypted, and the 4th time original data to be rendered are encrypted in use a parameter, and so circulation makes
With;Decrypting end is then for the first time decrypted the data to be rendered encrypted using a parameter, and second using b parameter pair
The data to be rendered encrypted are decrypted, and place is decrypted to the data to be rendered encrypted using c parameter for the third time
Reason, the 4th time the data to be rendered encrypted are decrypted in use a.Encryption end and decrypting end have been made an appointment one group of ginseng
Several and preset rules then further increase the safety of data to be rendered to decrypting end transmitting encryption parameter without encrypting end
Property.
The present embodiment is encrypted original data to be rendered to be encrypted according to encryption relevant parameter by CPU,
The data to be rendered encrypted, CPU are transferred to the GPU for relevant parameter is encrypted, so that GPU obtains the related ginseng of encryption
Number, and according to encryption relevant parameter, the data to be rendered encrypted are decrypted, original data to be rendered, root are obtained
It is drawn according to original data to be rendered, due to being encrypted to original data to be rendered, thus, increase cheating procedure identification
The difficulty of original data to be rendered out enhances to be rendered so that cheating program can not modify to original data to be rendered
The safety of data improves the user experience of game player in turn.
Game client would generally use a GPU tinter (shader) to be drawn to multiple models, but use
Multiple models that the same shader is drawn, some are the models for needing to encrypt, some are the moulds for not needing to be encrypted
Type, but multiple models can be decrypted in shader, in embodiment illustrated in fig. 3, by with game model to be encrypted
Other models for not needing to be encrypted for sharing same tinter are known as the second model;Fig. 3 is provided in an embodiment of the present invention
The flow diagram of the method for another protection game data, Fig. 3 is on the basis of Fig. 1 or embodiment illustrated in fig. 2, further
Ground can also include:
S107:GPU is decrypted the second model according to default deciphering parameter.
Interim, the data of the second model are identical as after decryption processing before being decrypted.
For the second model for not needing to be encrypted, place is decrypted using the decryption function and deciphering parameter of default
Reason will not be changed with the data of decryption treated model before decryption processing, such as: encryption function is linear function, is added
Close parameter is 1.
Game model, which is divided into, to be needed the game model encrypted, shares the same shader's with the game model encrypted is needed
Non-encrypted the second model, general models;It for the game model that encrypts of needs, is encrypted at encryption end, and can be with
By after encryption Encryption Model and encryption function and encryption parameter be passed to GPU, GPU shader is decrypted;It is right
In with the second non-encrypted model for needing the same shader of encrypted lottery model sharing, encryption end without encryption,
The decryption function of default and deciphering parameter are passed to GPU, GPU shader is decrypted;It is and existing for general models
Technology same treatment.
The present embodiment shares other of same tinter by using default deciphering parameter pair and game model to be encrypted
The model for not needing to be encrypted is decrypted, so that the technical solution has more universality, application scenarios are wider
It is general.
Fig. 4 is a kind of structural schematic diagram of device for protecting game data provided in an embodiment of the present invention, as shown in figure 4,
Including CPU401 and GPU402, wherein CPU401, for according to encryption relevant parameter to original data to be rendered to be encrypted into
Row encryption, the data to be rendered encrypted;
GPU402, for according to the encryption relevant parameter, the data to be rendered encrypted to be decrypted,
Obtain the original data to be rendered;
The GPU402 is also used to be drawn according to the original data to be rendered.
Optionally, the original data to be rendered to be encrypted are the vertex data of game model to be encrypted.
Optionally, the CPU401 is also used to predefine game model to be encrypted;Obtain the game mould for needing to draw
Type;When it is described to need the game model drawn be the game model to be encrypted when, obtain the game model to be encrypted
Vertex data.
Optionally, the encryption relevant parameter includes: encryption function and encryption parameter.
Optionally, the GPU402 is specifically used for obtaining the encryption parameter from the CPU;According to the encryption parameter with
And pre-stored decryption function, the data to be rendered encrypted are decrypted, are obtained described original to be rendered
Data, the decryption function are the inverse function of the encryption function.
Optionally, the GPU402 be specifically used for decryption function according to the pre-stored data and deciphering parameter, to it is described
The data to be rendered of encryption are decrypted, and obtain the original data to be rendered, and the decryption function is the encryption letter
Several inverse functions, the deciphering parameter are identical as the encryption parameter.
Optionally, the CPU401 is also used to the encryption relevant parameter being transferred to the GPU.
Optionally, the CPU401 is specifically used for the encryption function and the encryption parameter being transmitted to GPU.
Optionally, the GPU402 is specifically used for obtaining decryption function according to the encryption function, is joined according to the encryption
Number obtains deciphering parameter, according to the decryption function and the deciphering parameter, carries out to the data to be rendered encrypted
Decryption processing obtains the original data to be rendered, wherein the decryption function is the inverse function of the encryption function;It is described
Encryption parameter is identical as the deciphering parameter;
Optionally, the CPU401 is specifically used for decryption function and deciphering parameter being transmitted to GPU;
Wherein, the decryption function is the inverse function of the encryption function, the deciphering parameter and the encryption parameter phase
Together.
Optionally, the CPU401 is specifically used for the selection rule and encryption function of encryption parameter being transmitted to GPU.
Optionally, the GPU402 is also used to that the second model is decrypted according to default deciphering parameter;
Wherein, second model and the game model to be encrypted share the same tinter;
The data of second model are identical as after decryption processing before being decrypted.
Optionally, the encryption parameter is random value.
The module of Fig. 4 shown device accordingly can be used for executing the technical solution of embodiment of the method shown in above-mentioned Fig. 1-Fig. 3,
Principle is similar in fact.
The device of the present embodiment adds original data to be rendered to be encrypted according to encryption relevant parameter by CPU
Close processing, the data of the model encrypted, GPU solve the data to be rendered encrypted according to encryption relevant parameter
Close processing obtains original data to be rendered, is drawn according to original data to be rendered, due to carrying out to original data to be rendered
Encryption, thus, increase the difficulty that cheating procedure identification goes out original data to be rendered, so that cheating program can not to original to wash with watercolours
Dye data are modified, and are enhanced the safety of data to be rendered, in turn, are improved the user experience of game player.
The embodiment of the present invention also provides a kind of storage medium, and the storage medium is for storing computer program, the meter
Calculation machine program is for realizing the method for protecting game data described in above-mentioned Fig. 1-Fig. 3 embodiment of the method.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or
The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (15)
1. a kind of method for protecting game data characterized by comprising
Central processor CPU is encrypted original data to be rendered to be encrypted according to encryption relevant parameter, obtains
The data to be rendered of encryption;
Graphics processor GPU is decrypted the data to be rendered encrypted, obtains according to the encryption relevant parameter
To the original data to be rendered;
The GPU is drawn according to the original data to be rendered.
2. the method according to claim 1, wherein the original data to be rendered to be encrypted are to be encrypted
The vertex data of game model.
3. according to the method described in claim 2, it is characterized in that, the central processor CPU is according to encryption relevant parameter pair
Original data to be rendered to be encrypted are encrypted before step, further includes:
Predefine game model to be encrypted;
Obtain the game model for needing to draw;
When it is described to need the game model drawn be the game model to be encrypted when, obtain the game model to be encrypted
Vertex data.
4. method according to claim 1-3, which is characterized in that the encryption relevant parameter includes: encryption letter
Several and encryption parameter.
5. according to the method described in claim 4, it is characterized in that, the GPU according to the encryption relevant parameter, to it is described
The data to be rendered of encryption are decrypted, and obtain the original data to be rendered, comprising:
The GPU obtains the encryption parameter from the CPU;
The GPU according to the encryption parameter and pre-stored decryption function, to the data to be rendered encrypted into
Row decryption processing, obtains the original data to be rendered, and the decryption function is the inverse function of the encryption function.
6. according to the method described in claim 4, it is characterized in that, the GPU according to the encryption relevant parameter, to it is described
The data to be rendered of encryption are decrypted, and obtain the original data to be rendered, comprising:
GPU decryption function according to the pre-stored data and deciphering parameter, solve the data to be rendered encrypted
Close processing, obtains the original data to be rendered, and the decryption function is the inverse function of the encryption function, the deciphering parameter
It is identical as the encryption parameter.
7. according to the method described in claim 4, it is characterized in that, the GPU according to the encryption relevant parameter, to it is described
The data to be rendered of encryption are decrypted, before obtaining the original data to be rendered, further includes:
The encryption relevant parameter is transferred to the GPU by the CPU.
8. the method according to the description of claim 7 is characterized in that the CPU encryption relevant parameter is transferred to it is described
GPU, comprising:
The encryption function and the encryption parameter are transmitted to GPU by the CPU.
9. according to the method described in claim 8, it is characterized in that, the GPU according to the encryption relevant parameter, to it is described
The data to be rendered of encryption are decrypted, and obtain the original data to be rendered, comprising:
The GPU obtains decryption function according to the encryption function, and the decryption function is the inverse function of the encryption function;
The GPU obtains deciphering parameter according to the encryption parameter, and the encryption parameter is identical as the deciphering parameter;
The GPU is decrypted the data to be rendered encrypted according to the decryption function and the deciphering parameter
Processing, obtains the original data to be rendered.
10. the method according to the description of claim 7 is characterized in that the CPU encryption relevant parameter is transferred to it is described
GPU, comprising:
Decryption function and deciphering parameter are transmitted to GPU by the CPU;
Wherein, the decryption function is the inverse function of the encryption function, and the deciphering parameter is identical as the encryption parameter.
11. the method according to the description of claim 7 is characterized in that the encryption relevant parameter is transmitted to GPU by the CPU,
Include:
The selection rule and encryption function of encryption parameter are transmitted to GPU by the CPU.
12. according to the method described in claim 3, it is characterized by further comprising:
The GPU is decrypted the second model according to default deciphering parameter;
Wherein, second model and the game model to be encrypted share the same tinter;
The data of second model are identical as after decryption processing before being decrypted.
13. according to the method described in claim 4, it is characterized in that, the encryption parameter is random value.
14. a kind of device for protecting game data characterized by comprising
Central processing unit is obtained for original data to be rendered to be encrypted to be encrypted according to encryption relevant parameter
The data to be rendered encrypted;
Graphics processor, for according to the encryption relevant parameter, the data to be rendered encrypted to be decrypted,
Obtain the original data to be rendered;
The graphics processor is also used to be drawn according to the original data to be rendered.
15. a kind of storage medium, which is characterized in that the storage medium is for storing computer program, the computer program
For realizing the method for the described in any item protection game datas of claim 1-13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811552449.3A CN109589608A (en) | 2018-12-19 | 2018-12-19 | The method and apparatus for protecting game data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811552449.3A CN109589608A (en) | 2018-12-19 | 2018-12-19 | The method and apparatus for protecting game data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109589608A true CN109589608A (en) | 2019-04-09 |
Family
ID=65963835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811552449.3A Pending CN109589608A (en) | 2018-12-19 | 2018-12-19 | The method and apparatus for protecting game data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109589608A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110334027A (en) * | 2019-07-04 | 2019-10-15 | 深圳市腾讯网域计算机网络有限公司 | Game picture test method and device |
CN113209628A (en) * | 2021-05-12 | 2021-08-06 | 郑州大学 | AI-based image processing method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1650268A (en) * | 2001-12-04 | 2005-08-03 | 微软公司 | Methods and systems for cryptographically protecting secure content |
CN104991827A (en) * | 2015-06-26 | 2015-10-21 | 季锦诚 | Method for sharing GPU resources in cloud game |
CN105096373A (en) * | 2015-06-30 | 2015-11-25 | 华为技术有限公司 | Media content rendering method, user device and rendering system |
CN105579961A (en) * | 2013-09-25 | 2016-05-11 | Arm有限公司 | Data processing systems |
CN106411880A (en) * | 2016-09-27 | 2017-02-15 | 北京奇虎科技有限公司 | Security encryption and decryption methods and devices for game data |
JP6392439B1 (en) * | 2017-12-15 | 2018-09-19 | グリー株式会社 | Program, terminal device, and information processing system |
-
2018
- 2018-12-19 CN CN201811552449.3A patent/CN109589608A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1650268A (en) * | 2001-12-04 | 2005-08-03 | 微软公司 | Methods and systems for cryptographically protecting secure content |
CN105579961A (en) * | 2013-09-25 | 2016-05-11 | Arm有限公司 | Data processing systems |
CN104991827A (en) * | 2015-06-26 | 2015-10-21 | 季锦诚 | Method for sharing GPU resources in cloud game |
CN105096373A (en) * | 2015-06-30 | 2015-11-25 | 华为技术有限公司 | Media content rendering method, user device and rendering system |
CN106411880A (en) * | 2016-09-27 | 2017-02-15 | 北京奇虎科技有限公司 | Security encryption and decryption methods and devices for game data |
JP6392439B1 (en) * | 2017-12-15 | 2018-09-19 | グリー株式会社 | Program, terminal device, and information processing system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110334027A (en) * | 2019-07-04 | 2019-10-15 | 深圳市腾讯网域计算机网络有限公司 | Game picture test method and device |
CN110334027B (en) * | 2019-07-04 | 2024-04-12 | 深圳市腾讯网域计算机网络有限公司 | Game picture testing method and device |
CN113209628A (en) * | 2021-05-12 | 2021-08-06 | 郑州大学 | AI-based image processing method and device |
CN113209628B (en) * | 2021-05-12 | 2022-09-06 | 郑州大学 | AI-based image processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
ES2880407T3 (en) | Method and device for mapping virtual objects based on augmented reality | |
CN105681309B (en) | A kind of information processing method, first terminal, second terminal and server | |
US8782418B2 (en) | Entertainment device | |
CN110266682B (en) | Data encryption method and device, mobile terminal and decryption method | |
CN106621326A (en) | Local application quick start with cloud transitioning | |
CN106598882B (en) | A kind of safe internal storage data guard method and device | |
Mishra et al. | Image encryption using Fibonacci-Lucas transformation | |
US8740698B2 (en) | Game system, game execution apparatus, and portable storage medium | |
US20080096665A1 (en) | System and a method for a reality role playing game genre | |
US8745726B2 (en) | Identity verification in virtual worlds using encoded data | |
CN103841469B (en) | A kind of digital movie copyright protection method and apparatus | |
JP2010515154A (en) | Visualizing object relationships | |
CN105556574A (en) | Rendering apparatus, rendering method thereof, program and recording medium | |
CN108259171A (en) | The guard method of Shader files and device | |
CN109589608A (en) | The method and apparatus for protecting game data | |
KR20140051801A (en) | Methods and devices for optimising rendering of an encrypted 3d graphical object | |
US20150018080A1 (en) | Secure distributed gambling | |
JP2014085674A (en) | Method and device for encrypting 3d object by applying function changed by using secret key | |
CN109395383A (en) | A kind of game score method and apparatus | |
KR20130127383A (en) | Methods and devices for 3d object protection using surface subdivision | |
CN110474932A (en) | A kind of encryption method and system based on information transmission | |
CN107431620A (en) | Instantiated during the operation of broadcast encryption scheme | |
CN112383523B (en) | Image encryption method, related device and storage medium | |
CN108134673A (en) | A kind of method and device for generating whitepack library file | |
Alhamadani | Implement image encryption on chaotic and discrete transform domain encryption |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190409 |