Game data encryption transmission method, device and system
By generating and swapping the characters of the data packet group, the semantic changes of the data packet are achieved, which solves the problem of easy decryption by eavesdroppers and improves the security of game data transmission.
Patent Information
- Application Number
- CN202511270192.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-09-08
AI Technical Summary
The existing game data encryption transmission method encrypts the corresponding string of data and splits it into substrings and sends them numbered. The eavesdropper can easily decrypt it, making it easier to steal information and having poor security protection effect.
Generate multiple data packet groups. The same group of data packets have the same sentence components and are aligned. The semantics are changed by swapping characters across data packets. After sending the sub-data, the receiving end merges and restores the data packets, and corrects the swap parameters through feature parameters to restore the original data packet.
By swapping data packets across different time periods, the semantics of the data packets reassembled by the eavesdropper are changed, and the real data content cannot be known, thereby improving the security of data transmission.
Smart Images

Figure CN120750679A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method, device and system for encrypting and transmitting game data. Background Art
[0002] Game data encryption transmission is a key technology to protect game information from being stolen, tampered with or forged during transmission; The existing game data encryption transmission method will split the encrypted string after encrypting the string corresponding to the data, and then number the substrings formed after the splitting, and then send them to the receiving end separately. The receiving end will reassemble the received substrings into an encrypted string according to the numbers, and then decrypt the encrypted string with a key; however, this method will also form a guide for the eavesdropper, that is, after intercepting the substring, the eavesdropper can easily restore each substring into an encrypted string according to the number on the intercepted substring, and then decrypt the encrypted string, making the entire information theft less difficult, and correspondingly reducing the security protection effect of the transmitted information. Summary of the Invention
[0003] Based on this, it is necessary to provide a game data encryption transmission method, device and system to address the above problems.
[0004] The embodiment of the present invention is implemented as follows: a method for encrypting and transmitting game data is provided, the method comprising: S1: After generating a plurality of data packets to be transmitted, classify each data packet to obtain a plurality of data packet groups, wherein each data packet belonging to the same data packet group has the same type of sentence components and the arrangement order of the sentence components is consistent; S2: For each data packet group, align the data packets to obtain a first array; S3: swapping characters in the first array across data packets based on the sentence components of each data packet, so that the semantics of each data packet changes, and obtaining corresponding scrambled data packets; S4: Determine the transposition parameters during the character transposition process and send the transposition parameters to the receiving end; S5: Splitting each scrambled data packet into sub-data, numbering each sub-data, and sending the sub-data to a receiving end, so that after receiving the sub-data, the receiving end recombines the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain a second array; S6: querying the characteristic parameters of the second array at the receiving end to determine the change parameters of the first array and the second array, and sending the change parameters to the receiving end so that the receiving end modifies the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters.
[0005] In one embodiment, the present invention provides a device for encrypting and transmitting game data, the device comprising: a classification module for classifying each data packet after generating a plurality of data packets to be transmitted, to obtain a plurality of data packet groups, wherein each data packet belonging to the same data packet group has the same type of sentence components and the sentence components are arranged in the same order; A first processing module is configured to align each data packet in each data packet group to obtain a first array; a second processing module, configured to swap characters in the first array across data packets according to sentence components of each data packet, so as to change the semantics of each data packet and obtain corresponding scrambled data packets; A first sending module, configured to determine a transposition parameter during a character transposition process and send the transposition parameter to a receiving end; a second sending module, configured to split each scrambled data packet into sub-data, number each sub-data, and send the sub-data to a receiving end, so that after receiving the sub-data, the receiving end re-combines the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain a second array; The third sending module is used to query the characteristic parameters of the second array of the receiving end to determine the change parameters of the first array and the second array, and send the change parameters to the receiving end, so that the receiving end corrects the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters.
[0006] In one embodiment, the present invention provides a game data encryption transmission system, the system comprising: Receiver; The computer device communicates with the receiving end and is used to execute the game data encryption transmission method.
[0007] The present invention provides a method, device and system for encrypting and transmitting game data, wherein the method comprises generating a plurality of data packets to be transmitted, classifying each data packet to obtain a plurality of data packet groups; for each data packet group, aligning each data packet to obtain a first array; transposing characters in the first array across data packets according to the sentence components of each data packet, so that the semantics of each data packet changes, and obtaining a corresponding scrambled data packet; determining a transposition parameter during the character transposition process, and sending the transposition parameter to a receiving end; splitting each scrambled data packet into sub-data, numbering each sub-data, and sending the sub-data to a receiving end, so that the receiving end, after receiving the sub-data, re-combines the data packets into scrambled data packets according to the sub-data numbers, and The scrambled data packets are aligned to obtain a second array; the characteristic parameters of the second array at the receiving end are queried to determine the change parameters between the first array and the second array, and the change parameters are sent to the receiving end, so that the receiving end corrects the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters; in the present application, by swapping the characters of the data packets in the data packet group across data packets, the semantic change of the data packets can be achieved, so that when the sub-data is sent, even if the sub-data is intercepted by the stealing party, the data packet obtained by the stealing party by reassembling the sub-data according to the number is also a scrambled data packet, and its semantics have also changed, which will mislead the thief and prevent him from knowing the true data content, thereby ensuring the security of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 A flowchart of a method for encrypting and transmitting game data provided in one embodiment; Figure 2 A first array schematic diagram of a method for encrypting and transmitting game data provided in one embodiment; Figure 3 This is a module flow chart of a device for encrypting and transmitting game data provided in one embodiment; Figure 4 A schematic diagram of the composition of a game data encryption transmission system provided in one embodiment; Figure 5 FIG. 1 is a block diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0009] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present 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 only used to explain the present invention and are not intended to limit the present invention.
[0010] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script without departing from the scope of the present invention.
[0011] like Figure 1 As shown, in one embodiment, a method for encrypting and transmitting game data is proposed, the method comprising: S1: After generating a plurality of data packets to be transmitted, classify each data packet to obtain a plurality of data packet groups, wherein each data packet belonging to the same data packet group has the same type of sentence components and the arrangement order of the sentence components is consistent; S2: For each data packet group, align the data packets to obtain a first array; S3: swapping characters in the first array across data packets based on the sentence components of each data packet, so that the semantics of each data packet changes, and obtaining corresponding scrambled data packets; S4: Determine the transposition parameters during the character transposition process and send the transposition parameters to the receiving end; S5: Splitting each scrambled data packet into sub-data, numbering each sub-data, and sending the sub-data to a receiving end, so that after receiving the sub-data, the receiving end recombines the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain a second array; S6: querying the characteristic parameters of the second array at the receiving end to determine the change parameters of the first array and the second array, and sending the change parameters to the receiving end so that the receiving end modifies the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters.
[0012] In this embodiment, this method is executed in a computer device, which can be an independent physical server or terminal, or a server cluster composed 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 game terminal for users to play games, such as a mobile phone, game console, tablet computer, laptop computer, etc.; the computer device can communicate with the receiving end, thereby realizing data transmission between the receiving end and the receiving end.
[0013] In this embodiment, to ensure the timeliness of data transmission, this method is executed every set time period (e.g., 0.1 seconds, or other time period, determined according to the actual transmission rate requirement), and the multiple data packets to be transmitted generated are the data packets generated in the previous time period; In this embodiment, a data packet consists of a series of characters, which can be considered a data sentence. A data sentence is composed of several sentence components (identifiers, separators, and control elements defined to enable the receiver to correctly parse the data). These components include clarifying the meaning of the data (key / tag), dividing the structure (delimiter / container), controlling transmission (command / check digit), carrying meta-information (header / parameters), and values. Unlike the "sentence components" of natural language, these components focus more on "machine parsability" rather than "semantic coherence."
[0014] In this embodiment, the split sub-data includes a number of consecutive characters, and the sub-data are numbered according to the position of the characters in the string of the entire scrambled data packet, so that the receiving end can reassemble the data according to the numbers after receiving the sub-data to obtain a scrambled data packet. In this embodiment, the transposition parameter is a parameter representing the positional deviation of characters in the array. The transposition parameter is sent to the receiving end, and the receiving end can reversely transpose the characters in the scrambled data packet based on the transposition parameter, thereby restoring the scrambled data packet to the original data packet (i.e., a data packet representing the true semantics). Moreover, since the receiving end does not know the arrangement of the data packets by the computer device (i.e., the first array), the arrangement of the data packets by the computer device and the arrangement of the data packets by the receiving end (i.e., the second array) are often different. Therefore, the computer device needs to "communicate" with the receiving end so that the receiving end can correct the transposition parameter and then reversely transpose the data packet to obtain the correct data packet. This method further enhances data confidentiality (even if the transposition parameter is intercepted, the hacker cannot accurately complete the reverse transposition).
[0015] In the present application, by swapping the characters of the data packets in the data packet group across data packets, the semantic changes of the data packets can be achieved. Therefore, when sending sub-data, even if the sub-data is intercepted by the thief, the data packet obtained by the thief after reassembling the sub-data according to the number is also a scrambled data packet, and its semantics have also changed, which will mislead the thief and prevent him from knowing the true data content, thereby ensuring the security of the data.
[0016] like Figure 2 As shown, as a preferred embodiment, aligning the data packets includes: Arrange the characters in each data packet into a line; Align the first characters of each row of characters to obtain a character array as the first array.
[0017] After step S2, the method further includes: Establish a coordinate system with the first character in the upper left corner of the first array as the origin; The first coordinate of each character in the first array is determined in the coordinate system.
[0018] In this embodiment, after the first characters of each line of characters are aligned, the subsequent characters are also aligned in sequence; the coordinate scale of the coordinate system is set so that the horizontal coordinate and the vertical coordinate of each character are both positive integers.
[0019] As a preferred embodiment, each sentence component includes at least one character; and swapping the characters in the first array across data packets according to the sentence components of each data packet includes: S31: Select the type of sentence component to be replaced as the target type; S32: Determine the sentence component corresponding to the target category for each row in the first array; S33: swapping characters corresponding to the determined sentence components across lines, so that at least one character corresponding to a sentence component in each line of characters changes, and the semantics corresponding to each line of characters changes, wherein characters in a sentence component are swapped only with characters in sentence components of the same type; S34: After the swap, determine the semantic rationality of each row of characters in the first array, and judge whether the semantic rationality of at least one row of characters is less than a preset value. If not, complete the swap; if so, execute steps S31 to S34 until the swap is completed.
[0020] Determining the semantic plausibility of each row of characters in the first array includes: S341: Retrieve a synonym database for the meaning of each sentence component represented by the characters in the row; S342: Retrieve historical data packets generated within a set time period whose sentence components are consistent with the sentence components in the line of characters; S343: Select a historical data packet and determine whether the meaning represented by each sentence component in the historical data packet is in the synonym database corresponding to the corresponding sentence component in the line of characters. If not, the semantic rationality is 0; S344: If yes, then the semantic similarity between the characters in the row and the characters in the historical data packet is calculated based on a preset semantic similarity; S345: Repeat steps S343 to S344 until the semantic similarity corresponding to each historical data packet is obtained; S346: Take the largest semantic similarity as the semantic rationality of the characters in the row.
[0021] The semantic similarity is calculated using the following formula: ; in, is the semantic similarity, m is the number of sentence components in the historical data package, It is the similarity between the meaning of the word represented by the character corresponding to the kth sentence component in the historical data packet and the meaning of the word represented by the character corresponding to the corresponding sentence component in the line of characters.
[0022] In this embodiment, the type of sentence component to be replaced is selected as the target type. One sentence component type can be selected for replacement first. If the replacement cannot be completed under all replacement methods up to the replacement of one sentence component, two sentence components are selected for replacement at the same time. If the replacement still cannot be completed, three sentence components are selected for replacement at the same time, and this cycle is repeated until the replacement is completed. Furthermore, when replacing, the characters of each semantic component are replaced separately, that is, the characters belonging to one semantic component in one row can only be replaced with the characters belonging to the same semantic component in other rows. The replacement method can be to replace one by one. For example, in the case of three rows of characters, replace the characters in the first row with the characters in the second row. Swap the characters in the first and second rows, swap the characters in the second row with the characters in the third row, and swap the characters in the third row with the characters in the first row; or for each target category, randomly shuffle the characters in the three rows belonging to the target category; as long as at least one character corresponding to a sentence component in each row of characters is changed in the end; in addition, since the lengths of the character strings belonging to the same sentence component in each row of characters may be inconsistent, during the adjustment process, for each row of characters, if the space left by the characters to be moved in the row is not enough to place the new exchanged character string, then the following characters will be adaptively moved backwards; if there is enough space, then the following characters will be moved forwards to keep no gaps in the characters in each row; In this embodiment, the types of sentence components in the historical data packet and the order of each type of sentence components in the data packet are consistent with the characters in the row, so that each sentence component in the row of characters can be matched with a sentence component in the historical data packet to perform synonym comparison, thereby determining semantic similarity; the characters corresponding to the sentence components in the data packet are equivalent to a vocabulary with corresponding meanings. For example, for the sentence component 'Tag', the character string corresponding to the sentence component in a data packet is 'Mountain' (i.e., a label belonging to the landform category). A synonym library is pre-set for each type of label. For example, the synonym library for the landform category label includes multiple character strings representing landforms 'Mountain, Hill, River, Lake, Sea, etc.', wherein any two words in the synonym library 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; In this embodiment, the preset value can be set to 0.8 or other values. The historical data packet is a data packet generated in the past. Since it is an actual data packet, it can be determined that the generation of the data is reasonable. The higher the semantic rationality, the closer the semantics of the scrambled data packet are to the semantics of the historical data packet, and the more reasonable its semantics are. Through this embodiment, the data meaning of the finally obtained scrambled data packet can be made more reasonable, thereby confusing the eavesdropper, causing the eavesdropper to believe that it is real data, thereby misleading the eavesdropper. In this embodiment, after the swap is completed, the semantic similarity between each row of scrambled data packets and the original data packets in the 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 degree of scrambling is insufficient and scrambling can be continued.
[0023] In this embodiment, the data packets in the first array become scrambled data packets after the character swapping is completed.
[0024] As a preferred embodiment, determining the transposition parameters during the character transposition process includes: For each transposed character, record the first coordinate of the character , and the second coordinate to which it is transferred , get a swap parameter ; The exchange parameters are sent to the receiving end, that is, each exchange parameter obtained is sent to the receiving end.
[0025] The characteristic parameters of the second array of the query receiving end include: For each scrambled data packet in the first array, identifying the shortest characteristic character segment of the scrambled data packet, wherein the shortest characteristic character segment is a continuous character segment containing the fewest characters that does not exist in any other scrambled data packets; The shortest characteristic character segment is sent to the receiving end, so that the receiving end identifies the row number of the shortest characteristic character segment in the second array and transmits it back.
[0026] Determining the change parameters of the first array and the second array, sending the change parameters to the receiving end, and causing the receiving end to modify the swap parameters according to the change parameters includes: For each scrambled data packet corresponding to the first array, determine the row number p of the character of the scrambled data packet 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 can modify the corresponding exchange parameters to .
[0027] In this embodiment, ' is the conversion symbol, Indicates the coordinates from 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 play the role of identifying the scrambled data packet, so that the receiving end can determine which row number of the scrambled data packet the computer device is querying; In this embodiment, the difference between the first array and the second array is that the number of rows of the scrambled data packets is different. Therefore, the correction of the swap parameter is to correct the vertical coordinate in the swap parameter, thereby obtaining the corrected swap parameter. The receiving end can restore the scrambled data packet to the original data packet by reversely swapping the characters in the second array according to the parameter; reverse swapping is to restore the scrambled data packet to the original data packet according to the parameter. Make an exchange.
[0028] like Figure 3 As shown, in one embodiment, a game data encryption transmission device is provided, the device comprising: a classification module for classifying each data packet after generating a plurality of data packets to be transmitted, to obtain a plurality of data packet groups, wherein each data packet belonging to the same data packet group has the same type of sentence components and the sentence components are arranged in the same order; A first processing module is configured to align each data packet in each data packet group to obtain a first array; a second processing module, configured to swap characters in the first array across data packets according to sentence components of each data packet, so as to change the semantics of each data packet and obtain corresponding scrambled data packets; A first sending module, configured to determine a transposition parameter during a character transposition process and send the transposition parameter to a receiving end; a second sending module, configured to split each scrambled data packet into sub-data, number each sub-data, and send the sub-data to a receiving end, so that after receiving the sub-data, the receiving end re-combines the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain a second array; The third sending module is used to query the characteristic parameters of the second array of the receiving end to determine the change parameters of the first array and the second array, and send the change parameters to the receiving end, so that the receiving end corrects the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters.
[0029] The process of each module in the game data encryption transmission device provided in the embodiment of the present application realizing its own function can be specifically referred to the aforementioned Figure 1 The description of the illustrated embodiment will not be repeated here.
[0030] like Figure 4As shown, in one embodiment, a game data encryption transmission system is provided, the system comprising: Receiver; The computer device communicates with the receiving end and is used to execute the game data encryption transmission method.
[0031] In this embodiment, the computer device cooperates with the receiving end to achieve semantic changes in the data packets by swapping the characters of the data packets in the data packet group across data packets. Therefore, when sending sub-data, even if the sub-data is intercepted by the thief, the data packet obtained by the thief after reassembling the sub-data according to the number is also a scrambled data packet, and its semantics has also changed, which will mislead the thief and prevent him from knowing the true data content, thereby ensuring the security of the data.
[0032] Figure 5 FIG. 1 shows an internal structure diagram of a computer device in one embodiment. Figure 5 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement the game data encryption transmission method provided in the embodiment of the present invention. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may implement the game data encryption transmission method provided in the embodiment of the present invention. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0033] Those skilled in the art will understand that Figure 5 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0034] In one embodiment, the game data encryption transmission device provided by the embodiment of the present invention can be implemented in the form of a computer program. The computer program can be used in the following ways: Figure 5 The computer device shown in FIG. 1 is run on the computer device shown in FIG. The memory of the computer device can store various program modules that constitute the game data encryption transmission device, such as, Figure 3The computer program composed of the classification module, the first processing module, the second processing module, the first sending module, the second sending module, and the third sending module shown in the figure enables the processor to execute the steps of the game data encryption transmission method of each embodiment of the present invention described in this specification.
[0035] For example, Figure 5 The computer device shown can be Figure 3 The classification module in the game data encryption and 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; the computer device can execute step S6 through the third sending module.
[0036] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are performed: S1: After generating a plurality of data packets to be transmitted, classify each data packet to obtain a plurality of data packet groups, wherein each data packet belonging to the same data packet group has the same type of sentence components and the arrangement order of the sentence components is consistent; S2: For each data packet group, align the data packets to obtain a first array; S3: swapping characters in the first array across data packets based on the sentence components of each data packet, so that the semantics of each data packet changes, and obtaining corresponding scrambled data packets; S4: Determine the transposition parameters during the character transposition process and send the transposition parameters to the receiving end; S5: Splitting each scrambled data packet into sub-data, numbering each sub-data, and sending the sub-data to a receiving end, so that after receiving the sub-data, the receiving end recombines the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain a second array; S6: querying the characteristic parameters of the second array at the receiving end to determine the change parameters of the first array and the second array, and sending the change parameters to the receiving end so that the receiving end modifies the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters.
[0037] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor performs the following steps: S1: After generating a plurality of data packets to be transmitted, classify each data packet to obtain a plurality of data packet groups, wherein each data packet belonging to the same data packet group has the same type of sentence components and the arrangement order of the sentence components is consistent; S2: For each data packet group, align the data packets to obtain a first array; S3: swapping characters in the first array across data packets based on the sentence components of each data packet, so that the semantics of each data packet changes, and obtaining corresponding scrambled data packets; S4: Determine the transposition parameters during the character transposition process and send the transposition parameters to the receiving end; S5: Splitting each scrambled data packet into sub-data, numbering each sub-data, and sending the sub-data to a receiving end, so that after receiving the sub-data, the receiving end recombines the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain a second array; S6: querying the characteristic parameters of the second array at the receiving end to determine the change parameters of the first array and the second array, and sending the change parameters to the receiving end so that the receiving end modifies the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters.
[0038] It should be understood that, although the various steps in the flow chart of each embodiment of the present invention are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps. Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When executed, the program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may 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), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0039] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned 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.
[0040] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A method for encrypting and transmitting game data, characterized in that: The method comprises: S1: After generating a plurality of data packets to be transmitted, classify each data packet to obtain a plurality of data packet groups, wherein each data packet belonging to the same data packet group has the same type of sentence components and the arrangement order of the sentence components is consistent; S2: For each data packet group, align the data packets to obtain a first array; S3: swapping characters in the first array across data packets based on the sentence components of each data packet, so that the semantics of each data packet changes, and obtaining corresponding scrambled data packets; S4: Determine the transposition parameters during the character transposition process and send the transposition parameters to the receiving end; S5: Splitting each scrambled data packet into sub-data, numbering each sub-data, and sending the sub-data to a receiving end, so that after receiving the sub-data, the receiving end recombines the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain a second array; S6: querying the characteristic parameters of the second array at the receiving end to determine the change parameters of the first array and the second array, and sending the change parameters to the receiving end so that the receiving end modifies the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters.
2. The method according to claim 1, characterized in that Aligning the packets involves: Arrange the characters in each data packet into a line; Align the first characters of each row of characters to obtain a character array as the first array; After step S2, the method further includes: Establish a coordinate system with the first character in the upper left corner of the first array as the origin; The first coordinate of each character in the first array is determined in the coordinate system.
3. The method according to claim 2, characterized in that Each sentence component includes at least one character; and swapping the characters in the first array across data packets according to the sentence components of each data packet includes: S31: Select the type of sentence component to be replaced as the target type; S32: Determine the sentence component corresponding to the target category for each row in the first array; S33: swapping characters corresponding to the determined sentence components across lines, so that at least one character corresponding to a sentence component in each line of characters changes, and the semantics corresponding to each line of characters changes, wherein characters in a sentence component are swapped only with characters in sentence components of the same type; S34: After the swap, determine the semantic rationality of each row of characters in the first array, and judge whether the semantic rationality of at least one row of characters is less than a preset value. If not, complete the swap; 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 plausibility of each row of characters in the first array includes: S341: Retrieve a synonym database of the meanings of the words represented by the characters of each sentence component of the line of characters; S342: Retrieve historical data packets generated within a set time period whose sentence components are consistent with the sentence components in the line of characters; 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 synonym database corresponding to the corresponding sentence component in the row of characters. If not, the semantic rationality is 0; S344: If yes, then the semantic similarity between the characters in the row and the characters in the historical data packet is calculated based on a preset semantic similarity; S345: Repeat steps S343 to S344 until the semantic similarity corresponding to each historical data packet is obtained; S346: Take the largest semantic similarity as the semantic rationality of the characters in the row.
5. The method according to claim 4, characterized in that The semantic similarity is calculated using the following formula: ; in, is the semantic similarity, m is the number of sentence components in the historical data package, It is the similarity between the meaning of the word represented by the character corresponding to the kth sentence component in the historical data packet and the meaning of the word represented by the character corresponding to the corresponding sentence component in the line of characters.
6. The method according to claim 3, characterized in that Determining the transposition parameters during character transposition includes: For each transposed character, record the first coordinate of the character , and the second coordinate to which it is transferred , get a swap parameter ; The exchange parameters are sent to the receiving end, that is, each exchange parameter obtained is sent to the receiving end.
7. The method according to claim 6, characterized in that The characteristic parameters of the second array of the query receiving end include: For each scrambled data packet in the first array, identifying the shortest characteristic character segment of the scrambled data packet, wherein the shortest characteristic character segment is a continuous character segment containing the fewest characters that does not exist in any other scrambled data packets; The shortest characteristic character segment is sent to the receiving end, so that the receiving end identifies the row number of the shortest characteristic character segment in the second array and transmits it back.
8. The method according to claim 7, characterized in that Determining the change parameters of the first array and the second array, sending the change parameters to the receiving end, and causing the receiving end to modify the swap parameters according to the change parameters includes: For each scrambled data packet corresponding to the first array, determine the row number p of the character of the scrambled data packet 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 can modify the corresponding exchange parameters to .
9. A game data encryption transmission device, characterized in that: The device comprises: a classification module for classifying each data packet after generating a plurality of data packets to be transmitted, to obtain a plurality of data packet groups, wherein each data packet belonging to the same data packet group has the same type of sentence components and the sentence components are arranged in the same order; A first processing module is configured to align each data packet in each data packet group to obtain a first array; a second processing module, configured to swap characters in the first array across data packets according to sentence components of each data packet, so as to change the semantics of each data packet and obtain corresponding scrambled data packets; A first sending module, configured to determine a transposition parameter during a character transposition process and send the transposition parameter to a receiving end; a second sending module, configured to split each scrambled data packet into sub-data, number each sub-data, and send the sub-data to a receiving end, so that after receiving the sub-data, the receiving end re-combines the data packets into scrambled data packets according to the sub-data numbers, and aligns the scrambled data packets to obtain a second array; The third sending module is used to query the characteristic parameters of the second array of the receiving end to determine the change parameters of the first array and the second array, and send the change parameters to the receiving end, so that the receiving end corrects the swap parameters according to the change parameters, and restores the scrambled data packets to the original data packets according to the swap parameters.
10. A game data encryption transmission system, characterized in that: The system comprises: Receiver; A computer device, communicating with a receiving end, is used to execute the game data encryption transmission method according to any one of claims 1 to 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
Content distribution method, transmission device, and reception device
JP2017220886A
Data transmission method, device and communication device
WO2020051745A1
