Game archive file storage method, device, terminal equipment and storage medium
By modifying and encrypting the strings in the game archive file, the problem of conflict between the game archive file and the DynamoDB database keywords is solved, and the secure storage of game archive files is realized and the user experience is improved.
Patent Information
- Application Number
- CN202410157999.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-02-01
AI Technical Summary
The game archive file may fail when stored in the DynamoDB database, resulting in the user's game archive file being lost, mainly because the k strings in the game archive file conflict with the keywords in the DynamoDB database.
By modifying the string in the local game archive file, a new string containing both letters and numbers is generated, and a new game archive file is generated based on the new string, and the new game archive file is encrypted and signed, and the target game archive file is obtained, so that it does not conflict with the remote database.
Avoid keyword conflicts between game archive files and remote databases, ensure that game archive files can be successfully stored in remote databases, and improve the user's play experience.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, terminal device and computer-readable storage medium for storing game archive files. Background Art
[0002] With the continuous development of network technology, games have become an indispensable part of the daily lives of more and more users. At the same time, more and more users will configure multiple game terminals for playing games in their daily lives. As a result, more and more users have the need to synchronize game archives between multiple game terminals.
[0003] In the related art, technicians often store the user's game archive files in the DynamoDB database in AWS (Amazon Web Services). However, since the k-string contained in the game archive files often conflicts with the keywords in the DynamoDB database, the game archive files may fail to be stored in the DynamoDB database, resulting in the loss of the user's game archive files, which greatly reduces the user's gaming experience.
[0004] Therefore, how to store game archive data in a remote database has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0005] The main purpose of the present application is to provide a method, apparatus, terminal device and computer-readable storage medium for storing game archive files, so as to enable the terminal device to modify and encrypt the user's local game archive files, thereby obtaining a target game archive file that does not conflict with a remote database, and then writing the target game archive file to the remote database to save the game archive file through the remote database.
[0006] To achieve the above object, the present application provides a method for storing game archive files, the method for storing game archive files comprising the steps of:
[0007] Get local game save files;
[0008] Reading each first character string contained in the local game archive file, and modifying each first character string to obtain each second character string, wherein the second character string contains both letters and numbers;
[0009] Obtaining a game archive file to be encrypted according to each of the second character strings, and encrypting the game archive file to be encrypted to obtain an encrypted game archive file;
[0010] A target game archive file is obtained by performing a signing operation on the encrypted game archive file, and the target game archive file is sent to a preset remote database so as to store the target game archive file through the remote database.
[0011] Furthermore, the step of modifying the first character strings to obtain the second character strings includes:
[0012] Get the preset character mapping relationship;
[0013] The target letters and target numbers corresponding to the first character strings are obtained based on the character mapping relationship, and the target letters and target numbers are combined to obtain the second character strings.
[0014] Furthermore, the step of encrypting the game archive file to be encrypted to obtain the encrypted game archive file comprises:
[0015] Reading a plurality of second character strings contained in the game archive file to be encrypted, and generating a third character string based on the plurality of second character strings;
[0016] Obtaining a preset key serial number, and writing the key serial number into the third character string to generate a fourth character string;
[0017] Decomposing the fourth character string to obtain a plurality of target base data, and concatenating the plurality of target base data to obtain an encrypted character string;
[0018] The encrypted string is written into the game archive file to be encrypted to obtain an encrypted game archive file.
[0019] Furthermore, the step of performing a signing operation on the encrypted game archive file to obtain a target game archive file includes:
[0020] Obtaining a preset field length, and trimming the encrypted string contained in the encrypted game archive file according to the field length to obtain a plurality of fifth strings, wherein the length of the fifth string is less than or equal to the field length;
[0021] Converting a plurality of the fifth character strings to obtain a sixth character string corresponding to each of the plurality of the fifth character strings, and concatenating the plurality of the sixth character strings to obtain a concatenated character string;
[0022] Determine a key string based on the key sequence number, and write the key string into the concatenated string to generate a seventh string;
[0023] The seventh character string is securely hashed to generate a target character string, and the target character string is written into the encrypted game archive file to obtain a target game archive file.
[0024] Furthermore, after the step of modifying the first character strings to obtain the second character strings, the method further includes:
[0025] Obtaining the archive saving time corresponding to the local game archive file, and generating a timestamp string based on the archive saving time;
[0026] A game archive file to be encrypted is obtained based on the timestamp character string and each of the second character strings, and the step of encrypting the game archive file to be encrypted to obtain an encrypted game archive file is performed.
[0027] Furthermore, after the step of sending the target game archive file to a preset remote database to store the target game archive file through the remote database, the method further includes:
[0028] When receiving the archive synchronization instruction sent by the user terminal, reading the archive synchronization instruction to obtain the user identity, and verifying the user identity to obtain an identity authentication result;
[0029] If the identity authentication result is that the identity authentication is passed, determining the target game archive file in the remote database according to the archive synchronization instruction;
[0030] The target game archive file is sent to the user terminal so that the user terminal performs an archive synchronization operation based on the target game archive file.
[0031] Furthermore, after the step of sending the target game archive file to a preset remote database to store the target game archive file through the remote database, the method further includes:
[0032] Reading a target character string contained in the target game archive file, and determining each game content field corresponding to the target game archive file based on the target character string;
[0033] Determine each game parameter value corresponding to the target game archive file based on each game content field, and judge whether the target game archive file is a normal game archive file according to each game parameter value;
[0034] If it is determined that the target game archive file is not a normal game archive file, a preset user classification tag is obtained, and the user classification tag is written into the user identity identifier.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a storage device for game archive files, the device comprising:
[0036] Archive acquisition module, used to obtain local game archive files;
[0037] A first processing module, configured to read each first character string contained in the local game archive file, and modify each first character string to obtain each second character string, wherein the second character string contains both letters and numbers;
[0038] A second processing module, used for obtaining a game archive file to be encrypted according to each of the second character strings, and encrypting the game archive file to be encrypted to obtain an encrypted game archive file;
[0039] The file storage module is used to perform a signing operation on the encrypted game archive file to obtain a target game archive file, and send the target game archive file to a preset remote database so as to store the target game archive file through the remote database.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a terminal device, which includes: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the game archive file storage method as described above are implemented.
[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the game archive file storage method as described above are implemented.
[0042] The game archive file storage method, apparatus, terminal device and computer-readable storage medium provided in the embodiments of the present application obtain a local game archive file; read each first character string contained in the local game archive file, and modify each first character string to obtain each second character string, wherein the second character string contains both letters and numbers; obtain a game archive file to be encrypted according to each second character string, and encrypt the game archive file to be encrypted to obtain an encrypted game archive file; sign the encrypted game archive file to obtain a target game archive file, and send the target game archive file to a preset remote database so as to store the target game archive file through the remote database.
[0043] In this embodiment, when the terminal device is running, the terminal device first accesses the user terminal to obtain the local game archive file stored in the user terminal. After that, the terminal device reads each first character string contained in the local game archive file, and modifies each first character string into a second character string containing both letters and numbers. After that, the terminal device writes each second character string generated into the local game archive file to obtain a game archive file to be encrypted, and encrypts the game archive file to be encrypted to obtain an encrypted game archive file. Finally, the terminal device signs the encrypted game archive file to obtain a signed target game archive file, and writes the target game archive file into a remote database connected to the terminal device to store and manage the target game archive file through the remote database.
[0044] In this way, the present application solves the technical problem in the related art that the game archive file cannot be stored in the DynamoDB database because the k character string in the game archive file will conflict with the keyword in the DynamoDB database. That is, the present application modifies the character string in the local game archive file to obtain a character string containing both letters and numbers, and generates a new game archive file based on the character string, and then encrypts and signs the new game archive file to obtain a target game archive file, so that the k character in the game archive file can contain both numbers and letters, avoiding the conflict between the k character and the keyword of the remote database, and achieving the technical effect of enabling the terminal device to modify and encrypt the user's local game archive file to obtain a target game archive file that does not conflict with the remote database, and then enabling the terminal device to write the target game archive file into the remote database to save the game archive file through the remote database. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the structure of a terminal device in the hardware operating environment involved in the embodiment of the present application;
[0046] Figure 2 This is a flowchart of a first embodiment of a method for storing game archive files of the present application;
[0047] Figure 3 This is a flowchart of a second embodiment of the method for storing game archive files of the present application;
[0048] Figure 4 This is a flowchart of a third embodiment of the method for storing game archive files of the present application;
[0049] Figure 5 This is a schematic diagram of the functional modules involved in an embodiment of a storage device for game archive files of the present application.
[0050] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0051] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] Reference Figure 1 , Figure 1 This is a schematic diagram of the terminal device structure of the hardware operating environment involved in the embodiment of the present application.
[0053] It should be noted that the terminal device of the embodiment of the present application can be a device for executing the storage method of the game archive files of the present application. The terminal device can specifically be a user terminal, a data storage control terminal, a PC or other terminals.
[0054] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0055] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the terminal device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0056] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a computer program.
[0057] exist Figure 1In the terminal device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the terminal device of the present application can be set in the terminal device, and the terminal device calls the computer program stored in the memory 1005 through the processor 1001, and executes the following embodiments.
[0058] Based on the above-mentioned terminal device, an overall concept of the storage method of the game archive files of the present application is provided.
[0059] With the continuous development of network technology, games have become an indispensable part of the daily lives of more and more users. At the same time, more and more users will configure multiple game terminals for playing games at the same time in their daily lives. In this way, more and more users have the need to synchronize game archives between multiple game terminals. In the related art, technicians often store the user's game archive files in the DynamoDB database in AWS (Amazon Web Services). However, since the k string contained in the game archive file often conflicts with the keywords in the DynamoDB database, the game archive file may fail to be stored when it is stored in the DynamoDB database, which leads to the loss of the user's game archive file, greatly reducing the user's gaming experience.
[0060] In response to the above phenomenon, the present application proposes a method for storing game archive files, which includes the following steps: obtaining a local game archive file; reading each first character string contained in the local game archive file, and modifying each first character string to obtain each second character string, wherein the second character string contains both letters and numbers; obtaining a game archive file to be encrypted according to each second character string, and encrypting the game archive file to be encrypted to obtain an encrypted game archive file; signing the encrypted game archive file to obtain a target game archive file, and sending the target game archive file to a preset remote database so as to store the target game archive file through the remote database.
[0061] In this way, the present application solves the technical problem in the related art that the game archive file cannot be stored in the DynamoDB database because the k character string in the game archive file will conflict with the keyword in the DynamoDB database. That is, the present application modifies the character string in the local game archive file to obtain a character string containing both letters and numbers, and generates a new game archive file based on the character string, and then encrypts and signs the new game archive file to obtain a target game archive file, so that the k character in the game archive file can contain both numbers and letters, avoiding the conflict between the k character and the keyword of the remote database, and achieving the technical effect of enabling the terminal device to modify and encrypt the user's local game archive file to obtain a target game archive file that does not conflict with the remote database, and then enabling the terminal device to write the target game archive file into the remote database to save the game archive file through the remote database.
[0062] Based on the above-mentioned terminal device and the overall concept of the storage method of the game archive files of the present application, various embodiments of the storage method of the game archive files of the present application are further proposed.
[0063] Please refer to Figure 2 , Figure 2 This is a flowchart of the first embodiment of the method for storing game archive files of the present application.
[0064] It should be understood that although a logical order is shown in the flow chart, in some cases, the method for storing game archive files of the present application may of course also perform the steps shown or described in an order different from that shown here.
[0065] like Figure 2 As shown, in this embodiment, the storage method of the game archive file of the present application may include the steps of:
[0066] Step S10: Obtain local game archive files;
[0067] Step S20: reading each first character string contained in the local game archive file, and modifying each first character string to obtain each second character string, wherein the second character string contains both letters and numbers;
[0068] Step S30: obtaining a game archive file to be encrypted according to each of the second character strings, and encrypting the game archive file to be encrypted to obtain an encrypted game archive file;
[0069] Step S40: performing a signing operation on the encrypted game archive file to obtain a target game archive file, and sending the target game archive file to a preset remote database to store the target game archive file through the remote database.
[0070] It should be noted that the first character string is the K character string contained in the local game archive file. It can be understood that the K character string is customized by the technician to meet the data storage or processing requirements. It can be understood that this application does not limit the specific content of the K character string.
[0071] In addition, the remote database may be a Lindorm database on an Alibaba Cloud server, or may be DynamoDB or 3S (Simple Storage Service) on AMS.
[0072] In this embodiment, during operation, the terminal device first accesses the first user terminal connected to itself, thereby obtaining a local game archive file stored locally by the first user terminal. Afterwards, the terminal device reads each first character string contained in the local game archive file, and modifies each first character string to obtain a plurality of second character strings containing both letters and numbers. Afterwards, the terminal device writes each second character string into the local game archive file to replace each first character string to obtain a game archive file to be encrypted, and encrypts the game archive file to be encrypted to obtain an encrypted game archive file. Finally, the terminal device signs the encrypted game archive file to obtain a target game archive file, and sends the signed target game archive file to a remote database connected to itself, so that the remote database stores the target game archive file.
[0073] Exemplarily, for example, when a user ends a stand-alone game and generates a local game archive file corresponding to the stand-alone game in a first user terminal used by the user, the terminal device accesses the first user terminal used by the user to play the stand-alone game, and obtains the local game archive file saved by the user when playing the stand-alone game from a storage device configured by the first user terminal itself. After that, the terminal device reads each first K character string contained in the local game archive file, and changes each first K character string to obtain each second character string containing both letters and numbers and having 2 digits (for example: a1, b2, c3, etc.). After that, the terminal device writes each second character string into the local game archive file to replace each first K character string to obtain a game archive file to be encrypted. Finally, the terminal device encrypts the game archive file to be encrypted based on preset key data to obtain an encrypted game archive file, and adds a signature to the encrypted game archive file to obtain a target game archive file. The terminal device then accesses the Lindorm database connected to itself, and sends the target game archive file to the Lindorm database to store the target game archive file through the Lindorm database.
[0074] In this way, the present application solves the technical problem in the related art that the game archive file cannot be stored in the DynamoDB database because the k character string in the game archive file will conflict with the keyword in the DynamoDB database. That is, the present application modifies the character string in the local game archive file to obtain a character string containing both letters and numbers, and generates a new game archive file based on the character string, and then encrypts and signs the new game archive file to obtain a target game archive file, so that the k character in the game archive file can contain both numbers and letters, avoiding the conflict between the k character and the keyword of the remote database, and achieving the technical effect of enabling the terminal device to modify and encrypt the user's local game archive file to obtain a target game archive file that does not conflict with the remote database, and then enabling the terminal device to write the target game archive file into the remote database to save the game archive file through the remote database.
[0075] Further, in a feasible embodiment, the step of "modifying the first character strings to obtain second character strings" in the above step S20 may specifically include:
[0076] Step S201: obtaining a preset character mapping relationship;
[0077] Step S202: obtaining target letters and target numbers corresponding to each of the first character strings based on the character mapping relationship, and combining the target letters and target numbers to obtain each second character string.
[0078] It should be noted that the character mapping relationship includes a plurality of standard K strings and a mapping relationship between letters and / or numbers corresponding to each of the plurality of standard K strings. It can be understood that the letters and / or numbers corresponding to the K strings can be determined through the character mapping relationship. In addition, the character mapping relationship is set by a technician and stored in a storage device configured by the terminal device itself before the terminal device leaves the factory, so that the terminal device can directly access the storage device to obtain the character mapping relationship when it needs to be used. The present application does not limit the specific content of the character mapping relationship.
[0079] In this embodiment, after obtaining each first character string, the terminal device first reads the storage device configured by itself to obtain the character mapping relationship preset by the technician. Thereafter, the terminal device determines the target letters and target numbers corresponding to each character in each first character string based on the character mapping relationship. The terminal device then combines the target letters and target numbers corresponding to each first character string to obtain each second character string containing both letters and numbers.
[0080] Exemplarily, for example, after obtaining each first K character string, the terminal device first reads the storage device configured by itself to obtain the character mapping relationship preset by the technician. Thereafter, the terminal device maps each first K character string based on the character mapping relationship, thereby obtaining the target letters and target numbers corresponding to each of the first K character strings. The terminal device then combines each of the target letters and the target numbers to obtain a two-digit K character string in which the first digit is letters az and the second digit is a number from 0 to 9. The terminal device then determines the two-digit K character string containing both letters and numbers as the second character string.
[0081] It should be noted that, in the process of combining the target letters and target numbers, the terminal device can also form a two-digit K string whose first digit is a number from 0 to 9 and whose second digit is letters from a to z, thereby determining the two-digit K string containing both letters and numbers as the second string. In addition, in this embodiment and another embodiment, the terminal device can also obtain a K string containing both the target letters and the target numbers and having a digit greater than 2 as the second string based on the character mapping relationship. It can be understood that the present application does not limit the digit number of the obtained second K string.
[0082] In this way, the terminal device can modify the K character string in the game archive file so that the number of bits of the modified K character string can avoid being the same as the number of bits of the keyword in the remote database. At the same time, by making the modified K character string contain both letters and numbers, it is possible to avoid conflicts between the number of bits of the modified K character string and the keyword in the remote database, thereby ensuring that the modified game archive file can be stored in the remote database.
[0083] Further, in a feasible embodiment, the step of "encrypting the game archive file to be encrypted to obtain an encrypted game archive file" in the above step 30 may specifically include:
[0084] Step S301: reading a plurality of second character strings contained in the game archive file to be encrypted, and generating a third character string based on the plurality of second character strings;
[0085] Step S302: obtaining a preset key serial number, and writing the key serial number into the third character string to generate a fourth character string;
[0086] Step S303: decomposing the fourth character string to obtain a plurality of target base data, and concatenating the plurality of target base data to obtain an encrypted character string;
[0087] Step S304: Write the encrypted string into the game archive file to be encrypted to obtain an encrypted game archive file.
[0088] It should be noted that the key serial number is a serial number corresponding to the key data. It can be understood that when there are multiple key data, each key data has a corresponding key serial number, and the terminal device can then determine the corresponding key data through the key serial number; in addition, when there are multiple key serial numbers, the terminal device can select any one of the multiple key serial numbers to use, and this application does not limit the process of the terminal device selecting the key serial number.
[0089] In this embodiment, after obtaining the game archive file to be encrypted, the terminal device first reads multiple two-digit second character strings containing letters and numbers contained in the game archive file to be encrypted, and the terminal device then sorts and splices each of the second character strings to generate a third character string. At the same time, the terminal device randomly selects a key number from the preset multiple key numbers, and then writes the key number into the third character string to obtain a fourth character string. Thereafter, the terminal device further decomposes the fourth character string to obtain multiple hexadecimal data, and converts the multiple hexadecimal data to obtain multiple 29-base data. The terminal device then splices the multiple 29-base data to obtain an encrypted character string. Finally, the terminal device writes the encrypted character string into the game archive file to be encrypted, thereby obtaining an encrypted game archive file.
[0090] Exemplarily, for example, after obtaining the game archive file to be encrypted, the terminal device first reads the second K character strings a1, b2, c3, d4, e5, f6, g7, h8, i9, which are multiple digits of 2 and contain letters and numbers in the game archive file to be encrypted, and then the terminal device sorts and splices each of the second K character strings according to a preset splicing order to obtain a third character string a1b2c3d4e5f6g7h8i9. At the same time, the terminal device randomly selects a key number from the preset multiple key numbers, and determines that the key number is 01. The terminal device then writes the key number 01 into the third character string a1b2c3d4e5f6g7h8i9 to obtain a fourth character string a1b2c3d4e5f6g7h8i901. After that, the terminal device uses 8 The fourth character string a1b2c3d4e5f6g7h8i901 is decomposed from back to front in units of bits to obtain multiple hexadecimal numbers: g7h8i901, c3d4e5f6, a1b2. The terminal device then converts the multiple hexadecimal numbers to obtain corresponding 29-decimal numbers: 2fi7l3omd, 1pr6o6js6, j5mk. The terminal device concatenates the 29-decimal numbers 2fi7l3omd, 1pr6o6js6, j5mk using hyphens to obtain an encrypted character string 2fi7l3omd-1pr6o6js6-j5mk. Finally, the terminal device writes the encrypted character string 2fi7l3omd-1pr6o6js6-j5mk into the field with key xkx in the game archive file to be encrypted, thereby obtaining the encrypted game archive file.
[0091] In this way, the terminal device can encrypt the game archive files, thereby improving the security of the game archive files during transmission.
[0092] Further, in a feasible embodiment, the step of "performing a signing operation on the encrypted game archive file to obtain a target game archive file" in the above step 40 may specifically include:
[0093] Step S401: obtaining a preset field length, and trimming the encrypted string contained in the encrypted game archive file according to the field length to obtain a plurality of fifth strings, wherein the length of the fifth string is less than or equal to the field length;
[0094] Step S402: converting the plurality of fifth character strings to obtain the sixth character strings corresponding to the plurality of fifth character strings, and concatenating the plurality of sixth character strings to obtain a concatenated character string;
[0095] Step S403: determining a key string based on the key sequence number, and writing the key string into the concatenated string to generate a seventh string;
[0096] Step S404: Perform secure hash processing on the seventh character string to generate a target character string, and write the target character string into the encrypted game archive file to obtain a target game archive file.
[0097] It should be noted that the secure hash operation is specifically a SHA1 (Secure Hash Algorithm 1) operation, and the SHA1 operation is a cryptographic hash function. It is understandable that the specific calculation process of the SHA1 operation is a prior art, so it will not be repeated here.
[0098] In this embodiment, after obtaining the encrypted game archive file, the terminal device first obtains the field length preset by the technician, and based on the field length, trims the encrypted string in the encrypted game archive file to obtain multiple fifth strings whose length does not exceed the field length. After that, the terminal device obtains the preset final archiving method, and based on the final archiving method, converts each of the fifth strings to obtain the sixth string corresponding to each of the fifth strings. The terminal device then concatenates the sixth strings. After that, the terminal device determines the corresponding key string based on the above-mentioned key serial number, and adds the key string to the concatenated string to obtain the seventh string. Finally, the terminal device performs secure hash processing on the seventh string to generate a target string, and writes the target string into the encrypted game archive file to obtain the target game archive file.
[0099] Exemplarily, for example, after obtaining the encrypted game archive file, the terminal device first obtains the field length preset by the technician as 10 bits, and the terminal device then crops the encrypted string 2fi7l3omd-1pr6o6js6-j5mk in the encrypted game archive file based on the field length, thereby obtaining multiple fifth strings with a length not exceeding 10 bits. Afterwards, the terminal device obtains the preset final archive method, and converts each of the fifth strings based on the final archive method, thereby obtaining the sixth string corresponding to each of the fifth strings. The terminal device then splices each of the sixth strings to obtain a spliced string. At the same time, the terminal device determines the key string 123456789 based on the above-mentioned key serial number, and converts it. The key string 123456789 is written into the concatenated string to generate the seventh string abcdes3flasddkjf123456789. Finally, the terminal device performs SHA1 operation on the seventh string abcdes3flasddkjf123456789 to obtain the target string 39b2931642369c8b1a94178a0244d56c987ba2f8. The terminal device then writes the first 20 bits of the target string 39b2931642369c8b1a94178a0244d56c987ba2f8 into the archive field with key xsx in the encrypted game archive file to obtain the target game archive file.
[0100] In this way, the terminal device can sign the encrypted game archive file, thereby further improving the security of the game archive file when it is sent to the remote database.
[0101] Based on the above-mentioned first embodiment of the method for storing game archive files of the present application, a second embodiment of the method for storing game archive files of the present application is proposed here.
[0102] For further information, please refer to Figure 3 , Figure 3 This is a flow chart of the second embodiment of the method for storing game archive files of the present application. Figure 3 As shown, in a feasible embodiment, after the above step S20, the storage method of the game archive file of the present application may further include the following steps:
[0103] Step A10: Obtain the archive saving time corresponding to the local game archive file, and generate a timestamp string based on the archive saving time;
[0104] Step A20: Obtain the game archive file to be encrypted based on the timestamp character string and each of the second character strings, and execute the step of encrypting the game archive file to be encrypted to obtain the encrypted game archive file.
[0105] In this embodiment, after obtaining the second character string, the terminal device can also obtain the archive saving time of the first user terminal when generating the above-mentioned local game archive file through the above-mentioned first user terminal, and the terminal device further determines the target timestamp based on the archive saving time, and generates a target timestamp character string based on the target timestamp. Thereafter, the terminal device writes the target timestamp character string into each of the second characters, thereby obtaining the above-mentioned game archive file to be encrypted based on each of the second characters with the target timestamp character string. After obtaining the game archive file to be encrypted, the terminal device further encrypts the game archive file to be encrypted to obtain the above-mentioned encrypted game archive file.
[0106] Exemplarily, for example, after obtaining the above-mentioned two-digit K character string containing both letters and numbers, the terminal device can also access the above-mentioned first user terminal to read the archive save time corresponding to the first user terminal when generating the above-mentioned local game archive file, and the terminal device then determines the current timestamp corresponding to the user when playing the stand-alone game based on the archive save time, and generates a target timestamp character string based on the current timestamp, and the terminal device then writes the target timestamp character string into each of the two-digit K character strings containing both letters and numbers to generate the above-mentioned game archive file to be encrypted. After obtaining the game archive file to be encrypted, the terminal device then encrypts the game archive file to be encrypted to obtain the above-mentioned encrypted game archive file.
[0107] In this way, the terminal device can generate a game archive file based on the system time when the user plays the stand-alone game, thereby ensuring that the game archive file has a corresponding game version number, so that the user can synchronize the game version number when synchronizing the archive files between different user terminals.
[0108] Based on the first embodiment and / or second embodiment of the method for storing game archive files of the present application described above, a third embodiment of the method for storing game archive files of the present application is proposed herein.
[0109] For further information, please refer to Figure 4 , Figure 4 This is a flowchart of a third embodiment of the method for storing game archive files of the present application. Figure 4 As shown, in a feasible embodiment, after the above step S40, the storage method of the game archive file of the present application may further include the following steps:
[0110] Step B10: upon receiving the archive synchronization instruction sent by the user terminal, reading the archive synchronization instruction to obtain the user identity, and verifying the user identity to obtain an identity authentication result;
[0111] Step B20: if the identity authentication result is that the identity authentication is passed, determining the target game archive file in the remote database according to the archive synchronization instruction;
[0112] Step B30: Send the target game archive file to the user terminal so that the user terminal can perform an archive synchronization operation based on the target game archive file.
[0113] In this embodiment, when the user switches from the above-mentioned first user terminal to a new second user terminal to continue playing a stand-alone game, the user can initiate an archive synchronization instruction through the second user terminal. When the terminal device receives the archive synchronization instruction sent by the user through the second user terminal, it reads the archive synchronization instruction to obtain the user identity corresponding to the second user terminal. The terminal device verifies the user identity to obtain an identity authentication result. Thereafter, when the terminal device determines that the identity authentication result is passed, it accesses the remote database according to the archive synchronization instruction to determine the target game archive file that the user needs to synchronize in the remote database. Finally, the terminal device sends the target game archive file to the second user terminal that outputs the archive synchronization instruction, so that the second user terminal can perform an archive synchronization operation based on the target game archive file.
[0114] Exemplarily, for example, when a user switches from user terminal A to a new user terminal B to continue playing a stand-alone game, the user can generate an archive synchronization instruction through the user terminal B and send the archive synchronization instruction to the terminal device. When the terminal device receives the archive synchronization instruction, it first reads the archive synchronization instruction to obtain the user account information carried in the archive synchronization instruction. The terminal device authenticates the user account information based on a preset account database and obtains an authentication result. Afterwards, if the terminal device determines that the authentication result is verified, it accesses the above-mentioned Lindorm database according to the user account to find the latest target game archive file corresponding to the user account in the Lindorm database. The terminal device then sends the target game archive file to user terminal B, so that user terminal B can perform an archive synchronization operation based on the target game archive file, thereby keeping the game archive progress in user terminal A and user terminal B the same.
[0115] In this way, when the user continues to play using other user terminal devices, the terminal device can send the latest game archive data stored by the user to the new user terminal used by the user if verification is passed, thereby ensuring that the archive data can be synchronized after the user changes the terminal device.
[0116] It should be noted that the above-mentioned account database is a database containing multiple standard user account information. It can be understood that the process by which the terminal device authenticates the user account information based on the preset account database and obtains the identity authentication result is: the collected user account information is compared with the multiple standard user account information contained in the account database to obtain multiple comparison results, and when it is determined based on the multiple comparison results that there is standard user account information that is the same as the user account information in the multiple standard user account information, the identity authentication result is determined to be verified passed.
[0117] Based on the various embodiments of the method for storing game archive files of the present application described above, a fourth embodiment of the method for storing game archive files of the present application is proposed herein.
[0118] Further, in a feasible embodiment, after the above step S40, the storage method of the game archive file of the present application may further include the following steps:
[0119] Step C10: reading a target character string contained in the target game archive file, and determining each game content field corresponding to the target game archive file based on the target character string;
[0120] Step C20: determining each game parameter value corresponding to the target game archive file based on each of the game content fields, and judging whether the target game archive file is a normal game archive file according to each of the game parameter values;
[0121] Step C30: If it is determined that the target game archive file is not a normal game archive file, a preset user classification tag is obtained, and the user classification tag is written into the user identity.
[0122] In this embodiment, after the terminal device stores the target game archive file in the remote database, the terminal device can also periodically access the remote database to obtain each target game archive file stored in the remote database, and read the target character string contained in each target game archive file. The terminal device then determines the game content field corresponding to each target game archive file based on each target character string. Thereafter, the terminal device determines each game parameter value corresponding to the target game archive file based on each game content field. The terminal device makes a judgment based on each game parameter value to determine whether the target game archive file is a normal game archive file. Finally, if the terminal device determines that the target game archive file is not a normal game archive file, it determines that the user account corresponding to the user has cheated. The terminal device then obtains a preset user classification label and adds the user classification label to the user account to execute corresponding punishment measures on the user account.
[0123] Exemplarily, for example, after the terminal device stores the target game archive file in the Lindorm database, the terminal device may also locate the Lindorm database to obtain each target game archive file contained in the Lindorm database, and then the terminal device reads the target character string contained in each target game archive file, and determines the game content field corresponding to each target game archive file based on each target character string. After that, the terminal device determines the game parameter value such as the character attribute and the character asset corresponding to the target game archive file based on each game content field. At the same time, the terminal device obtains a preset standard game parameter database, and compares each game parameter value based on the standard game parameter range contained in the standard game parameter database, so as to determine whether the target game archive file is a normal game archive file based on the comparison result. Finally, when the terminal device determines that the comparison result is that the game parameter value corresponding to the target game archive file is not within the standard game parameter range, it determines that the target game archive file is not a normal game archive file, and then determines that the above-mentioned user account has cheating behavior. The terminal device then obtains a preset user classification label, and adds the user classification label to the user account, so as to perform operations such as banning the user account.
[0124] In this way, the terminal device can determine whether there is a game archive file modified by cheating means by accessing the target game archive file stored in the Lindorm database, and then determine whether the user has cheated. If it is determined that the user has cheated, the terminal device will take corresponding punishment measures against the user.
[0125] In addition, to achieve the above purpose, the present application also provides a storage device for game archive files, please refer to Figure 5 , Figure 5 This is a schematic diagram of the functional modules involved in an embodiment of a storage device for game archive files of the present application, such as Figure 5 As shown, the device comprises:
[0126] Archive acquisition module 10, used to obtain local game archive files;
[0127] The first processing module 20 is used to read each first character string contained in the local game archive file, and modify each first character string to obtain each second character string, wherein the second character string contains both letters and numbers;
[0128] A second processing module 30 is used to obtain a game archive file to be encrypted according to each of the second character strings, and encrypt the game archive file to be encrypted to obtain an encrypted game archive file;
[0129] The file storage module 40 is used to perform a signing operation on the encrypted game archive file to obtain a target game archive file, and send the target game archive file to a preset remote database to store the target game archive file through the remote database.
[0130] Furthermore, the first processing module 20 is also used for:
[0131] Get the preset character mapping relationship;
[0132] The target letters and target numbers corresponding to the first character strings are obtained based on the character mapping relationship, and the target letters and target numbers are combined to obtain the second character strings.
[0133] Furthermore, the second processing module 30 is further configured to:
[0134] Reading a plurality of second character strings contained in the game archive file to be encrypted, and generating a third character string based on the plurality of second character strings;
[0135] Obtaining a preset key serial number, and writing the key serial number into the third character string to generate a fourth character string;
[0136] Decomposing the fourth character string to obtain a plurality of target base data, and concatenating the plurality of target base data to obtain an encrypted character string;
[0137] The encrypted string is written into the game archive file to be encrypted to obtain an encrypted game archive file.
[0138] Furthermore, the file storage module 40 is also used for:
[0139] Obtaining a preset field length, and trimming the encrypted string contained in the encrypted game archive file according to the field length to obtain a plurality of fifth strings, wherein the length of the fifth string is less than or equal to the field length;
[0140] Converting a plurality of the fifth character strings to obtain a sixth character string corresponding to each of the plurality of the fifth character strings, and concatenating the plurality of the sixth character strings to obtain a concatenated character string;
[0141] Determine a key string based on the key sequence number, and write the key string into the concatenated string to generate a seventh string;
[0142] The seventh character string is securely hashed to generate a target character string, and the target character string is written into the encrypted game archive file to obtain a target game archive file.
[0143] Furthermore, the first processing module 20 is also used for:
[0144] Obtaining the archive saving time corresponding to the local game archive file, and generating a timestamp string based on the archive saving time;
[0145] A game archive file to be encrypted is obtained based on the timestamp character string and each of the second character strings, and the step of encrypting the game archive file to be encrypted to obtain an encrypted game archive file is performed.
[0146] Furthermore, the file storage module 40 is also used for:
[0147] When receiving the archive synchronization instruction sent by the user terminal, reading the archive synchronization instruction to obtain the user identity, and verifying the user identity to obtain an identity authentication result;
[0148] If the identity authentication result is that the identity authentication is passed, determining the target game archive file in the remote database according to the archive synchronization instruction;
[0149] The target game archive file is sent to the user terminal so that the user terminal can perform an archive synchronization operation based on the target game archive file.
[0150] Furthermore, the file storage module 40 is also used for:
[0151] Reading a target character string contained in the target game archive file, and determining each game content field corresponding to the target game archive file based on the target character string;
[0152] Determine each game parameter value corresponding to the target game archive file based on each game content field, and judge whether the target game archive file is a normal game archive file according to each game parameter value;
[0153] If it is determined that the target game archive file is not a normal game archive file, a preset user classification tag is obtained, and the user classification tag is written into the user identity identifier.
[0154] In addition, the present application also provides a terminal device having a computer program that can be run on a processor, and when the terminal device executes the computer program, the steps of the game archive file storage method as described in any of the above embodiments are implemented.
[0155] The specific embodiments of the terminal device of the present application are basically the same as the embodiments of the above-mentioned game archive file storage method, and will not be described in detail here.
[0156] In addition, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for storing game archive files as described in any of the above embodiments are implemented.
[0157] The specific embodiments of the computer-readable storage medium of the present invention are basically the same as the embodiments of the storage method of the game archive files mentioned above, and will not be described in detail here.
[0158] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0159] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for a terminal device (which can be a user terminal, a data storage control terminal, a PC, etc.) to execute the methods described in each embodiment of the present application.
[0161] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for storing game archive files, characterized in that: The method for storing game archive files comprises the steps of: Get local game save files; Read each first character string contained in the local game archive file, and modify each first character string to obtain each second character string, wherein the second character string contains both letters and numbers, and the first character string is a k character string used to meet data storage or processing requirements; The step of modifying the first character strings to obtain the second character strings includes: Get the preset character mapping relationship; Obtaining target letters and target numbers corresponding to each of the first character strings based on the character mapping relationship, and combining each of the target letters and the target numbers to obtain each of the second character strings; Obtaining a game archive file to be encrypted according to each of the second character strings, and encrypting the game archive file to be encrypted to obtain an encrypted game archive file; A target game archive file is obtained by performing a signing operation on the encrypted game archive file, and the target game archive file is sent to a preset remote database so as to store the target game archive file through the remote database.
2. The method for storing game archive files according to claim 1, characterized in that: The step of encrypting the game archive file to be encrypted to obtain the encrypted game archive file comprises: Reading a plurality of second character strings contained in the game archive file to be encrypted, and generating a third character string based on the plurality of second character strings; Obtaining a preset key serial number, and writing the key serial number into the third character string to generate a fourth character string; Decomposing the fourth character string to obtain a plurality of target base data, and concatenating the plurality of target base data to obtain an encrypted character string; The encrypted string is written into the game archive file to be encrypted to obtain an encrypted game archive file.
3. The method for storing game archive files according to claim 2, characterized in that: The step of performing a signing operation on the encrypted game archive file to obtain a target game archive file comprises: Obtaining a preset field length, and trimming the encrypted string contained in the encrypted game archive file according to the field length to obtain a plurality of fifth strings, wherein the length of the fifth string is less than or equal to the field length; Converting a plurality of the fifth character strings to obtain a sixth character string corresponding to each of the plurality of the fifth character strings, and concatenating the plurality of the sixth character strings to obtain a concatenated character string; Determine a key string based on the key sequence number, and write the key string into the concatenated string to generate a seventh string; The seventh character string is securely hashed to generate a target character string, and the target character string is written into the encrypted game archive file to obtain a target game archive file.
4. The method for storing game archive files according to claim 1, wherein: After the step of modifying the first character strings to obtain the second character strings, the method further includes: Obtaining the archive saving time corresponding to the local game archive file, and generating a timestamp string based on the archive saving time; A game archive file to be encrypted is obtained based on the timestamp character string and each of the second character strings, and the step of encrypting the game archive file to be encrypted to obtain an encrypted game archive file is performed.
5. The method for storing game archive files according to claim 1, wherein: After the step of sending the target game archive file to a preset remote database to store the target game archive file through the remote database, the method further includes: When receiving the archive synchronization instruction sent by the user terminal, reading the archive synchronization instruction to obtain the user identity, and verifying the user identity to obtain an identity authentication result; If the identity authentication result is that the identity authentication is passed, determining the target game archive file in the remote database according to the archive synchronization instruction; The target game archive file is sent to the user terminal so that the user terminal can perform an archive synchronization operation based on the target game archive file.
6. The method for storing game archive files according to claim 5, characterized in that: After the step of sending the target game archive file to a preset remote database to store the target game archive file through the remote database, the method further includes: Reading a target character string contained in the target game archive file, and determining each game content field corresponding to the target game archive file based on the target character string; Determine each game parameter value corresponding to the target game archive file based on each game content field, and judge whether the target game archive file is a normal game archive file according to each game parameter value; If it is determined that the target game archive file is not a normal game archive file, a preset user classification tag is obtained, and the user classification tag is written into the user identity identifier.
7. A storage device for game archive files, characterized in that: The device comprises: Archive acquisition module, used to obtain local game archive files; A first processing module, configured to read each first character string contained in the local game archive file, and modify each first character string to obtain each second character string, wherein the second character string contains both letters and numbers, and the first character string is a k character string used to meet data storage or processing requirements; The step of modifying the first character strings to obtain the second character strings includes: Get the preset character mapping relationship; Obtaining target letters and target numbers corresponding to each of the first character strings based on the character mapping relationship, and combining each of the target letters and the target numbers to obtain each of the second character strings; A second processing module, used for obtaining a game archive file to be encrypted according to each of the second character strings, and encrypting the game archive file to be encrypted to obtain an encrypted game archive file; The file storage module is used to perform a signing operation on the encrypted game archive file to obtain a target game archive file, and send the target game archive file to a preset remote database so as to store the target game archive file through the remote database.
8. A terminal device, characterized in that: The terminal device includes: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the method for storing game archive files as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for storing a game archive file as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Game archiving processing method and device, terminal equipment and readable storage medium
CN111265860A
Tamper-proof method and device for process document, computer equipment and medium
CN112966304A