A method, apparatus and system for encrypted transmission of game data

By swapping characters across data packets and correcting parameters in the game data packet group, the problem of easy decryption by the thief in the existing technology is solved, and the security and confidentiality of data transmission are achieved.

CN120750679BActive Publication Date: 2025-10-31SHENZHEN LIEYOU TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511270192.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-10-31
Estimated Expiration
2045-09-08

AI Technical Summary

Technical Problem

Existing methods of encrypting game data transmission, which encrypt the corresponding string of data, split it into substrings, number them, and send them, make it easy for the thief to decrypt, thus reducing the difficulty of information theft and resulting in poor security protection.

Method used

Multiple data packet groups are generated. By swapping characters across data packets, the semantics of each data packet are changed. The swapping parameters are determined during the transmission process. The receiving end reassembles the data packets according to their numbers. At the same time, the receiving end corrects the swapping parameters by querying the characteristic parameters of the receiving end to restore the initial data packets.

Benefits of technology

Even if the data is intercepted by the thief, the thief cannot accurately decrypt the data content, thus ensuring the security and confidentiality of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120750679B_ABST
    Figure CN120750679B_ABST
Patent Text Reader

Abstract

This invention relates to the field of communications, and in particular to a method, apparatus, and system for encrypted transmission of game data. The method achieves semantic changes in data packets by swapping characters across data packets in a data packet group. Thus, even if the sub-data is intercepted by a thief, the data packet reassembled by the thief according to the number is a scrambled data packet with changed semantics, which misleads the thief and prevents them from knowing the true data content, thereby ensuring data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communications, and in particular to a method, apparatus, and system for encrypted transmission of game data. Background Technology

[0002] Encrypted transmission of game data is a key technology to ensure that game information is not stolen, tampered with, or forged during transmission.

[0003] Existing methods for encrypting game data involve encrypting the corresponding string, splitting the encrypted string, numbering the resulting substrings, and sending each substring to the receiving end. The receiving end then reassembles the received substrings into an encrypted string according to their numbers and decrypts it using a key. However, this method can also be misleading to those who steal data. Once a substring is intercepted, the attacker can easily reconstruct the encrypted string based on its number, and then decrypt it, making information theft easier and consequently reducing the security of the transmitted information. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, device, and system for encrypted transmission of game data to address the aforementioned problems.

[0005] This invention provides a method for encrypted transmission of game data, the method comprising:

[0006] S1: After generating multiple data packets to be transmitted, classify each data packet to obtain several data packet groups. Among them, each data packet belonging to the same data packet group has the same type of statement components, and the order of the statement components is consistent.

[0007] S2: For each data packet group, align and arrange the data packets to obtain the first array;

[0008] S3: Based on the sentence components of each data packet, the characters in the first array are swapped across data packets, so that the semantics of each data packet changes, resulting in the corresponding scrambled data packets;

[0009] S4: Determine the swapping parameters during the character swapping process and send the swapping parameters to the receiving end;

[0010] S5: Each scrambled data packet is split into sub-data, each sub-data is numbered, and the sub-data is sent to the receiving end. After receiving the sub-data, the receiving end reassembles the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain the second array.

[0011] S6: Query the characteristic parameters of the second array at the receiving end to determine the changed parameters of the first array and the second array, send the changed parameters to the receiving end, so that the receiving end can correct the swapping parameters according to the changed parameters, and restore each scrambled data packet to the initial data packet according to the swapping parameters.

[0012] In one embodiment, the present invention provides a game data encryption transmission device, the device comprising:

[0013] The classification module is used to classify the data packets after generating multiple data packets to be transmitted, resulting in several data packet groups. Among them, the data packets belonging to the same data packet group have the same type of statement components, and the order of the statement components is consistent.

[0014] The first processing module is used to align and arrange the data packets for each data packet group to obtain the first array;

[0015] The second processing module is used to perform cross-data packet swapping on the characters in the first array according to the sentence components of each data packet, so that the semantics of each data packet changes and the corresponding scrambled data packets are obtained.

[0016] The first sending module is used to determine the swapping parameters during the character swapping process and send the swapping parameters to the receiving end;

[0017] The second sending module is used to split each scrambled data packet into sub-data, number each sub-data, and send the sub-data to the receiving end. After receiving the sub-data, the receiving end reassembles the data packets into scrambled data packets according to the sub-data numbers, and aligns and arranges each scrambled data packet to obtain the second array.

[0018] The third sending module is used to query the characteristic parameters of the second array at the receiving end to determine the changing parameters of the first array and the second array, and send the changing parameters to the receiving end so that the receiving end can correct the swapping parameters according to the changing parameters, so as to restore each scrambled data packet to the initial data packet according to the swapping parameters.

[0019] In one embodiment, the present invention provides a game data encrypted transmission system, the system comprising:

[0020] Receiver;

[0021] A computer device that communicates with the receiving end to execute the aforementioned game data encryption transmission method.

[0022] This invention provides a method, apparatus, and system for encrypted transmission of game data. The method includes generating multiple data packets to be transmitted, classifying each data packet to obtain several data packet groups; for each data packet group, aligning and arranging the data packets to obtain a first array; performing cross-data packet swapping on characters in the first array according to the sentence components of each data packet, changing the semantics of each data packet to obtain a corresponding scrambled data packet; determining swapping parameters during the character swapping process and sending the swapping parameters to the receiving end; splitting each scrambled data packet into sub-data, numbering each sub-data, and sending the sub-data to the receiving end, so that the receiving end, upon receiving the sub-data, reassembles the data packets into a scrambled data packet according to the sub-data's number. The scrambled data packets are aligned to form a second array. The characteristic parameters of the second array are queried at the receiving end to determine the change parameters between the first and second arrays. The change parameters are then sent to the receiving end, which corrects the swapping parameters based on the change parameters to restore the scrambled data packets to their initial state. In this application, by swapping the characters of data packets across data packets, semantic changes in the data packets can be achieved. Thus, even if the sub-data is intercepted by the thief, the data packet reassembled by the thief based on the number will still be a scrambled data packet with a changed semantics. This will mislead the thief, preventing them from knowing the true data content and ensuring data security. Attached Figure Description

[0023] Figure 1 This is a flowchart of a game data encryption transmission method provided in one embodiment;

[0024] Figure 2 A schematic diagram of a first array for a game data encryption transmission method provided in one embodiment;

[0025] Figure 3 This is a module flowchart of a game data encryption transmission device provided in one embodiment;

[0026] Figure 4 This is a schematic diagram of the composition of a game data encryption transmission system provided in one embodiment;

[0027] Figure 5 This is a block diagram of the internal structure of a computer device in one embodiment. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0029] It is understood that the terms "first," "second," etc., used in this invention may be used to describe various elements herein, but unless specifically stated otherwise, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this invention, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.

[0030] like Figure 1 As shown, in one embodiment, a method for encrypted transmission of game data is proposed, the method comprising:

[0031] S1: After generating multiple data packets to be transmitted, classify each data packet to obtain several data packet groups. Among them, each data packet belonging to the same data packet group has the same type of statement components, and the order of the statement components is consistent.

[0032] S2: For each data packet group, align and arrange the data packets to obtain the first array;

[0033] S3: Based on the sentence components of each data packet, the characters in the first array are swapped across data packets, so that the semantics of each data packet changes, resulting in the corresponding scrambled data packets;

[0034] S4: Determine the swapping parameters during the character swapping process and send the swapping parameters to the receiving end;

[0035] S5: Each scrambled data packet is split into sub-data, each sub-data is numbered, and the sub-data is sent to the receiving end. After receiving the sub-data, the receiving end reassembles the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain the second array.

[0036] S6: Query the characteristic parameters of the second array at the receiving end to determine the changed parameters of the first array and the second array, send the changed parameters to the receiving end, so that the receiving end can correct the swapping parameters according to the changed parameters, and restore each scrambled data packet to the initial data packet according to the swapping parameters.

[0037] In this embodiment, the method is executed in a computer device, which can be an independent physical server or terminal, or a server cluster consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN; the receiving end can be a gaming terminal for users to play games, such as a mobile phone, game console, tablet computer, or laptop computer; the computer device can communicate with the receiving end, thereby realizing data transmission between them.

[0038] In this embodiment, in order to ensure the timeliness of data transmission, this method is executed every set time period (e.g., 0.1 seconds, or other durations, determined according to the actual transmission rate requirements), and the generated multiple data packets to be transmitted are the data packets generated in the previous time period.

[0039] In this embodiment, a data packet includes a series of characters, which can be considered a data statement. This data statement consists of several statement components (identifiers, separators, and control elements defined to allow the receiver to correctly parse the data), such as specifying the data meaning (key / tag), defining the structure (separator / container), controlling transmission (command / checksum), carrying metadata (header / parameters), and values. Unlike the "sentence components" of natural language, these emphasize "machine parsingability" rather than "semantic fluency."

[0040] In this embodiment, the split sub-data includes several consecutive characters. Then, the sub-data is numbered according to the order of the positions of the characters in the string of the entire scrambled data packet. After receiving the sub-data, the receiving end can reassemble the data according to the number to obtain the scrambled data packet again.

[0041] In this embodiment, the swapping parameter is a parameter representing the positional deviation of a character in the array. The swapping parameter is sent to the receiving end, which can then reverse the swapping of characters in the scrambled data packet according to the swapping parameter, thereby restoring the scrambled data packet to the initial data packet (i.e., the data packet representing the true semantics). Furthermore, since the receiving end does not know the computer device's arrangement of each data packet (i.e., the first array), the computer device's arrangement of each data packet is often different from the receiving end's arrangement of each data packet (i.e., the second array). Therefore, the computer device needs to 'communicate' with the receiving end so that the receiving end can correct the swapping parameter before performing the reverse swapping to obtain the correct data packet. This method also further enhances the confidentiality of the data (even if the swapping parameter is intercepted, the thief cannot accurately complete the reverse swapping).

[0042] In this application, by swapping the characters of data packets across data packets in a data packet group, the semantic changes of the data packets can be achieved. Thus, when sending sub-data, even if the sub-data is intercepted by the thief, the data packet obtained by the thief reassembling the sub-data according to the number is a scrambled data packet with a changed semantics. This will mislead the thief, preventing them from knowing the true data content and ensuring data security.

[0043] like Figure 2 As shown, in a preferred embodiment, aligning and arranging the data packets includes:

[0044] Arrange the characters in each data packet into a single line;

[0045] Align the first character of each line to obtain the first character array.

[0046] The process after step S2 also includes:

[0047] Establish a coordinate system with the first character at the top left corner of the first array as the origin;

[0048] Determine the first coordinates of each character in the first array in the coordinate system.

[0049] In this embodiment, after the first character of each line is aligned, the subsequent characters are also aligned in sequence; the coordinate scale of the coordinate system is set so that the horizontal and vertical coordinates of each character are both positive integers.

[0050] In a preferred embodiment, each statement component includes at least one character; cross-data packet swapping of characters in the first array based on the statement components of each data packet includes:

[0051] S31: Select the type of statement component to be replaced as the target type;

[0052] S32: Determine the statement component corresponding to the target type in each row of the first array;

[0053] S33: Swap the characters corresponding to the determined statement components across lines so that at least one character corresponding to the statement component in each line changes, thereby changing the semantics of each line. Here, the characters in the statement components are only swapped with characters in the same type of statement components.

[0054] S34: After the swap, determine the semantic rationality of each row of characters in the first array, and determine whether at least one row of characters has a semantic rationality less than a preset value. If not, the swap is completed; if so, execute steps S31 to S34 until the swap is completed.

[0055] Determining the semantic reasonableness of each row of characters in the first array includes:

[0056] S341: Retrieve the thesaurus of synonyms for the meanings represented by each sentence component of the line;

[0057] S342: Retrieve historical data packets whose sentence components are consistent with the sentence components in the current line of characters within a set time period.

[0058] S343: Select a historical data packet and determine whether the meaning represented by each sentence component in the historical data packet is in the thesaurus corresponding to the sentence component in the line of characters. If not, the semantic rationality is 0.

[0059] S344: If so, calculate the semantic similarity between the characters in this line and the characters in the historical data packet based on the preset semantic similarity.

[0060] S345: Repeat steps S343 to S344 until the semantic similarity of each historical data packet is obtained.

[0061] S346: Take the highest semantic similarity as the semantic reasonableness of the characters in that line.

[0062] Semantic similarity is calculated using the following formula:

[0063] ;

[0064] in, For semantic similarity, m represents the number of sentence components in the historical data packets. The similarity between the meaning of the character corresponding to the k-th statement component in the historical data packet and the meaning of the character corresponding to the corresponding statement component in the same line.

[0065] In this embodiment, the type of statement component to be swapped is selected as the target type. One statement component type can be selected for swapping initially. If the swapping fails to complete with one statement component, two statement components are selected for swapping simultaneously. If the swapping still fails, three statement components are selected for swapping simultaneously, and this process is repeated until the swapping is complete. Furthermore, during the swapping, characters of each semantic component are swapped individually. That is, characters belonging to one semantic component in a row can only be swapped with characters belonging to the same semantic component in other rows. The swapping method can be sequential, for example, in the case of three rows of characters, swapping the characters in the first row with those in the second row... The characters in each row can be swapped: swap the characters in the second row with those in the third row, and swap the characters in the third row with those in the first row; or for each target category, randomly shuffle the characters belonging to that target category across the three rows; the goal is to ensure that at least one character corresponding to a statement component in each row changes. Furthermore, since the lengths of strings belonging to the same statement component in each row may differ, during the adjustment process, for each row, if the space left by the swapped characters is insufficient to accommodate the new string, the following characters are adaptively moved backward; if there is sufficient space, the following characters are moved forward, maintaining no gaps between rows.

[0066] In this embodiment, the types of statement components in the historical data packets, and the order of each type of statement component in the data packet, are consistent with the characters in the row. This allows each statement component in the row to be associated with a statement component in the historical data packet for synonym comparison, thereby determining semantic similarity. The characters corresponding to the statement components in the data packet are equivalent to a word with corresponding meanings. For example, for the statement component 'Tag', the string corresponding to the statement component in a data packet is 'Mountain' (mountain, i.e., a tag belonging to the landform category). A synonym dictionary is pre-set for each type of tag. For example, the synonym dictionary for landform tags includes multiple strings representing landforms such as 'Mountain, Hill, River, Lake, Sea, etc.'. In the synonym dictionary, any two words are pre-set with a semantic similarity (not 0). For example, the similarity between Mountain and Hill is 0.9, and the similarity between Mountain and River is 0.1.

[0067] In this embodiment, the preset value can be set to 0.8 or other values; historical data packets are data packets generated in history. Since they are actually generated data packets, it can be considered that the generation of this data is reasonable. The higher the semantic reasonableness, the closer the semantics of the scrambled data packets are to the semantics of the historical data packets, and they can also be regarded as having reasonable semantics. Through this embodiment, the meaning of the scrambled data packets obtained at the end can have a high degree of reasonableness, which can confuse the thief and make the thief believe that it is real data, thus misleading them.

[0068] In this embodiment, after the swap is completed, the semantic similarity between each row of scrambled data packets and the original data packets in that row (i.e., the data packets before scrambling) can be determined. If the semantic similarity is higher than a certain value, such as 0.7, it means that the scrambling is not thorough enough and the scrambling can continue.

[0069] In this embodiment, the data packets of the first array become scrambled data packets after the character swapping is completed.

[0070] In a preferred embodiment, determining the swapping parameters during the character swapping process includes:

[0071] For each character that is swapped, record the first coordinate of that character. and the second coordinate to which it was moved This yields a swap parameter. ;

[0072] Send the swapped parameters to the receiving end, that is, send each swapped parameter obtained to the receiving end.

[0073] The characteristic parameters of the second array at the query receiver include:

[0074] For each scrambled data packet in the first array, identify the shortest characteristic character segment of the scrambled data packet, where the shortest characteristic character segment is the continuous character segment containing the fewest characters that does not exist in other scrambled data packets;

[0075] The shortest feature character segment is sent to the receiving end, so that the receiving end can identify the row number of the shortest feature character segment in the second array and send it back.

[0076] Determine the changing parameters of the first array and the second array, send the changing parameters to the receiving end, and enable the receiving end to correct and switch the parameters based on the changing parameters, including:

[0077] For each scrambled data packet corresponding to the first array, determine the row number p of the character in the first array and the row number j in the second array, and obtain the row number difference R = jp;

[0078] Send R to the receiving end, so that the receiving end corrects the corresponding swapping parameters. .

[0079] In this embodiment, ' ' is a conversion symbol, Indicates from coordinates Convert to The characteristic parameter of the second array is the row number of the shortest characteristic character segment in the second array; the shortest characteristic character segment can serve as an identifier for scrambling data packets, enabling the receiving end to determine which scrambled data packet is being queried by the computer device.

[0080] In this embodiment, the difference between the first array and the second array lies in the different row numbers of the shuffled data packets. Therefore, the correction of the swapping parameters involves correcting the ordinate in the swapping parameters to obtain the corrected swapping parameters. The receiving end can restore the scrambled data packet to its original form by reversing the characters in the second array according to this parameter; the reversal is done according to... Make the swap.

[0081] like Figure 3 As shown, in one embodiment, a game data encryption transmission device is provided, the device comprising:

[0082] The classification module is used to classify the data packets after generating multiple data packets to be transmitted, resulting in several data packet groups. Among them, the data packets belonging to the same data packet group have the same type of statement components, and the order of the statement components is consistent.

[0083] The first processing module is used to align and arrange the data packets for each data packet group to obtain the first array;

[0084] The second processing module is used to perform cross-data packet swapping on the characters in the first array according to the sentence components of each data packet, so that the semantics of each data packet changes and the corresponding scrambled data packets are obtained.

[0085] The first sending module is used to determine the swapping parameters during the character swapping process and send the swapping parameters to the receiving end;

[0086] The second sending module is used to split each scrambled data packet into sub-data, number each sub-data, and send the sub-data to the receiving end. After receiving the sub-data, the receiving end reassembles the data packets into scrambled data packets according to the sub-data numbers, and aligns and arranges each scrambled data packet to obtain the second array.

[0087] The third sending module is used to query the characteristic parameters of the second array at the receiving end to determine the changing parameters of the first array and the second array, and send the changing parameters to the receiving end so that the receiving end can correct the swapping parameters according to the changing parameters, so as to restore each scrambled data packet to the initial data packet according to the swapping parameters.

[0088] The process by which each module in the game data encryption transmission device provided in this application implements its respective function can be found in the foregoing. Figure 1 The description of the illustrated embodiment will not be repeated here.

[0089] like Figure 4 As shown, in one embodiment, a game data encrypted transmission system is provided, the system comprising:

[0090] Receiver;

[0091] A computer device that communicates with the receiving end to execute the aforementioned game data encryption transmission method.

[0092] In this embodiment, the computer device cooperates with the receiving end to change the semantics of the data packets by swapping the characters of the data packets in the data packet group. Thus, when sending sub-data, even if the sub-data is intercepted by the thief, the data packet obtained by the thief reassembling the sub-data according to the number is a scrambled data packet with a changed semantics. This will mislead the thief and prevent them from knowing the true data content, thus ensuring data security.

[0093] Figure 5 An internal structural diagram of a computer device in one embodiment is shown. Figure 5As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement the game data encryption transmission method provided in this embodiment of the invention. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute the game data encryption transmission method provided in this embodiment of the invention. The display screen of the computer device can be a liquid crystal display (LCD) or an e-ink display. The input device of the computer device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse, etc.

[0094] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0095] In one embodiment, the game data encryption transmission device provided by this invention can be implemented as a computer program, and the computer program can be implemented as follows: Figure 5 It runs on the computer device shown. The computer device's memory can store the various program modules that make up the game's encrypted data transmission device, for example, Figure 3 The classification module, first processing module, second processing module, first sending module, second sending module, and third sending module are shown. The computer program, comprised of these modules, causes the processor to execute the steps of the game data encryption transmission method of the various embodiments of the present invention described in this specification.

[0096] For example, Figure 5 The computer equipment shown can be used as follows Figure 3 The classification module in the game data encryption transmission device shown executes step S1; the computer device can execute step S2 through the first processing module; the computer device can execute step S3 through the second processing module; the computer device can execute step S4 through the first sending module; the computer device can execute step S5 through the second sending module; and the computer device can execute step S6 through the third sending module.

[0097] In one embodiment, a computer device is provided, the computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps:

[0098] S1: After generating multiple data packets to be transmitted, classify each data packet to obtain several data packet groups. Among them, each data packet belonging to the same data packet group has the same type of statement components, and the order of the statement components is consistent.

[0099] S2: For each data packet group, align and arrange the data packets to obtain the first array;

[0100] S3: Based on the sentence components of each data packet, the characters in the first array are swapped across data packets, so that the semantics of each data packet changes, resulting in the corresponding scrambled data packets;

[0101] S4: Determine the swapping parameters during the character swapping process and send the swapping parameters to the receiving end;

[0102] S5: Each scrambled data packet is split into sub-data, each sub-data is numbered, and the sub-data is sent to the receiving end. After receiving the sub-data, the receiving end reassembles the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain the second array.

[0103] S6: Query the characteristic parameters of the second array at the receiving end to determine the changed parameters of the first array and the second array, send the changed parameters to the receiving end, so that the receiving end can correct the swapping parameters according to the changed parameters, and restore each scrambled data packet to the initial data packet according to the swapping parameters.

[0104] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, causes the processor to perform the following steps:

[0105] S1: After generating multiple data packets to be transmitted, classify each data packet to obtain several data packet groups. Among them, each data packet belonging to the same data packet group has the same type of statement components, and the order of the statement components is consistent.

[0106] S2: For each data packet group, align and arrange the data packets to obtain the first array;

[0107] S3: Based on the sentence components of each data packet, the characters in the first array are swapped across data packets, so that the semantics of each data packet changes, resulting in the corresponding scrambled data packets;

[0108] S4: Determine the swapping parameters during the character swapping process and send the swapping parameters to the receiving end;

[0109] S5: Each scrambled data packet is split into sub-data, each sub-data is numbered, and the sub-data is sent to the receiving end. After receiving the sub-data, the receiving end reassembles the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain the second array.

[0110] S6: Query the characteristic parameters of the second array at the receiving end to determine the changed parameters of the first array and the second array, send the changed parameters to the receiving end, so that the receiving end can correct the swapping parameters according to the changed parameters, and restore each scrambled data packet to the initial data packet according to the swapping parameters.

[0111] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0112] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0113] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0114] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for encrypting and transmitting game data, characterized in that, The method includes: S1: After generating multiple data packets to be transmitted, classify each data packet to obtain several data packet groups. Among them, each data packet belonging to the same data packet group has the same type of statement components, and the order of the statement components is consistent. S2: For each data packet group, align and arrange the data packets to obtain the first array; S3: Based on the sentence components of each data packet, the characters in the first array are swapped across data packets, so that the semantics of each data packet changes, resulting in the corresponding scrambled data packets; S4: Determine the swapping parameters during the character swapping process and send the swapping parameters to the receiving end; S5: Each scrambled data packet is split into sub-data, each sub-data is numbered, and the sub-data is sent to the receiving end. After receiving the sub-data, the receiving end reassembles the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain the second array. S6: Query the characteristic parameters of the second array at the receiving end to determine the changed parameters of the first array and the second array, send the changed parameters to the receiving end, so that the receiving end can correct the swapping parameters according to the changed parameters, and restore each scrambled data packet to the initial data packet according to the swapping parameters.

2. The method according to claim 1, characterized in that, Aligning and arranging the data packets includes: Arrange the characters in each data packet into a single line; Align the first character of each line to obtain the first character array; The process after step S2 also includes: Establish a coordinate system with the first character at the top left corner of the first array as the origin; Determine the first coordinates of each character in the first array in the coordinate system.

3. The method according to claim 2, characterized in that, Each statement component includes at least one character; cross-data packet swapping of characters in the first array based on the statement components of each data packet includes: S31: Select the type of statement component to be replaced as the target type; S32: Determine the statement component corresponding to the target type in each row of the first array; S33: Swap the characters corresponding to the determined statement components across lines so that at least one character corresponding to the statement component in each line changes, thereby changing the semantics of each line. Here, the characters in the statement components are only swapped with characters in the same type of statement components. S34: After the swap, determine the semantic rationality of each row of characters in the first array, and determine whether at least one row of characters has a semantic rationality less than a preset value. If not, the swap is completed; if so, execute steps S31 to S34 until the swap is completed.

4. The method according to claim 3, characterized in that, Determining the semantic reasonableness of each row of characters in the first array includes: S341: Retrieve the thesaurus of synonyms for the meanings represented by the characters of each statement component in this line; S342: Retrieve historical data packets whose sentence components are consistent with the sentence components in the current line of characters within a set time period. S343: Select a historical data packet and determine whether the meaning represented by the characters of each sentence component in the historical data packet is in the thesaurus corresponding to the sentence component in that line of characters. If not, the semantic rationality is 0. S344: If so, calculate the semantic similarity between the characters in this line and the characters in the historical data packet based on the preset semantic similarity. S345: Repeat steps S343 to S344 until the semantic similarity of each historical data packet is obtained. S346: Take the highest semantic similarity as the semantic reasonableness of the characters in that line.

5. The method according to claim 4, characterized in that, Semantic similarity is calculated using the following formula: ; in, For semantic similarity, m represents the number of sentence components in the historical data packets. The similarity between the meaning of the character corresponding to the k-th statement component in the historical data packet and the meaning of the character corresponding to the corresponding statement component in the same line.

6. The method according to claim 3, characterized in that, Determining the swapping parameters during character swapping includes: For each character that is swapped, record the first coordinate of that character. and the second coordinate to which it was moved This yields a swap parameter. ; Send the swapped parameters to the receiving end, that is, send each swapped parameter obtained to the receiving end.

7. The method according to claim 6, characterized in that, The characteristic parameters of the second array at the query receiver include: For each scrambled data packet in the first array, identify the shortest characteristic character segment of the scrambled data packet, where the shortest characteristic character segment is the continuous character segment containing the fewest characters that does not exist in other scrambled data packets; The shortest feature character segment is sent to the receiving end, so that the receiving end can identify the row number of the shortest feature character segment in the second array and send it back.

8. The method according to claim 7, characterized in that, Determine the changing parameters of the first array and the second array, send the changing parameters to the receiving end, and enable the receiving end to correct and switch the parameters based on the changing parameters, including: For each scrambled data packet corresponding to the first array, determine the row number p of the character in the first array and the row number j in the second array, and obtain the row number difference R = jp; Send R to the receiving end, so that the receiving end corrects the corresponding swapping parameters. .

9. A game data encryption transmission device, characterized in that, The device includes: The classification module is used to classify the data packets after generating multiple data packets to be transmitted, resulting in several data packet groups. Among them, the data packets belonging to the same data packet group have the same type of statement components, and the order of the statement components is consistent. The first processing module is used to align and arrange the data packets for each data packet group to obtain the first array; The second processing module is used to perform cross-data packet swapping on the characters in the first array according to the sentence components of each data packet, so that the semantics of each data packet changes and the corresponding scrambled data packets are obtained. The first sending module is used to determine the swapping parameters during the character swapping process and send the swapping parameters to the receiving end; The second sending module is used to split each scrambled data packet into sub-data, number each sub-data, and send the sub-data to the receiving end. After receiving the sub-data, the receiving end reassembles the data packets into scrambled data packets according to the sub-data numbers, and aligns and arranges each scrambled data packet to obtain the second array. The third sending module is used to query the characteristic parameters of the second array at the receiving end to determine the changing parameters of the first array and the second array, and send the changing parameters to the receiving end so that the receiving end can correct the swapping parameters according to the changing parameters, so as to restore each scrambled data packet to the initial data packet according to the swapping parameters.

10. A game data encryption transmission system, characterized in that, The system includes: Receiver; A computer device, communicating with a receiving end, for executing the game data encryption transmission method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Security file transmission method and device, electronic equipment and storage medium

    CN116032487A

  • Data transmission defense method and system and storage medium

    CN118300885A