Game data encryption and decryption method and system
The Sudoku-based encryption method for game data maintains data length and security by using unique, random keys, addressing inefficiencies in existing encryption methods.
Patent Information
- Application Number
- CN202510283555.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-15
AI Technical Summary
In the prior art, the data after game data is encrypted is too long and the security is insufficient.
The game data is encrypted and decrypted using the missing sudoku matrix, the client receives the missing elements sent by the server to encrypt, and the server decrypts based on the missing elements, ensuring that the encrypted data length is consistent with the original data, and using the randomness and uniqueness of the missing sudoku matrix to improve security.
Isolated encryption is realized, avoiding the encrypted data being too long, and effectively guarantees the security of game data, increasing the randomness and uniqueness of keys, making it difficult to crack.
Smart Images

Figure CN120320973A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data encryption, and particularly relates to a method and system for encrypting and decrypting game data. Background Art
[0002] In order to protect game interfaces, the client usually encrypts game interface data so that the data intercepted during the interaction between the communication module and the server is in an encrypted state. In the prior art, data encryption is a technology for protecting data security. Commonly used existing data encryption algorithms include symmetric encryption algorithms, asymmetric encryption algorithms, irreversible encryption algorithms (for data integrity verification), and so on. In addition, data shelling is a technology for protecting software code and resources. By adding a layer of "protection shell" outside the original program, the difficulty of reverse engineering and cracking is increased, and anti-debugging and anti-cracking are carried out through the "shell".
[0003] However, data encryption will cause the encrypted data packet to be too bloated, and data shelling will cause the shelled data to be too large. Therefore, whether it is data encryption or data shelling, it will result in the encrypted data being too long. Summary of the Invention
[0004] The technical problem to be solved by the present invention is: to provide a method and system for encrypting and decrypting game data, which can avoid the encrypted game data from being too long and effectively ensure the security of game data.
[0005] In order to solve the above technical problem, a technical solution adopted by the present invention is: A method for encrypting and decrypting game data, comprising the steps of: The client receives the missing elements of the missing sudoku matrix corresponding to the game interface sent by the server; The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, and the length of the encrypted data is the same as the length of the game interface data; The client sends the encrypted data and the missing elements to the server; The server decrypts the encrypted data based on the missing elements to obtain the game interface data.
[0006] In order to solve the above technical problem, another technical solution adopted by the present invention is: A game data encryption and decryption system, including a client and a server. The client includes a first memory, a first processor, and a first computer program stored on the first memory and executable on the first processor. The server includes a second memory, a second processor, and a second computer program stored on the second memory and executable on the second processor. When the first processor executes the first computer program, the following steps are implemented: Receive the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server; Encrypt the game interface data of the game interface based on the missing elements to obtain encrypted data, and the length of the encrypted data is the same as the length of the game interface data; Send the encrypted data and the missing elements to the server; When the second processor executes the second computer program, the following steps are implemented: Decrypt the encrypted data based on the missing elements to obtain the game interface data.
[0007] The beneficial effects of the present invention are as follows: The client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server. The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, and its length is the same as the length of the original game interface data. The client sends the encrypted data and the missing elements to the server. The server decrypts the encrypted data based on the missing elements to obtain the game interface data. In this way, the elements in the Sudoku are used to encrypt the game interface data, realizing equal-length encryption, ensuring that the encrypted data will not be too long, and using the missing elements in the missing Sudoku matrix to make the encryption key random and uniquely solvable, not easily cracked, thus avoiding the encrypted game data from being too long and effectively ensuring the security of the game data. Description of the Drawings
[0008] Figure 1 It is a step flow chart of a game data encryption and decryption method according to an embodiment of the present invention; Figure 2 It is a structural schematic diagram of a game data encryption and decryption system according to an embodiment of the present invention; Figure 3 It is a schematic diagram of creating a missing Sudoku matrix in a game data encryption and decryption method according to an embodiment of the present invention; Figure 4 It is a schematic diagram of a missing Sudoku matrix in a game data encryption and decryption method according to an embodiment of the present invention; Figure 5 It is a schematic diagram of creating a temporary logical chain in a game data encryption and decryption method according to an embodiment of the present invention; Figure 6This is a schematic diagram of encryption and decryption in a game data encryption and decryption method according to an embodiment of the present invention. Detailed implementation manners
[0009] To describe in detail the technical content, achieved objectives and effects of the present invention, the following is described in conjunction with the implementation manners and accompanied by the drawings.
[0010] Please refer to Figure 1 , a game data encryption and decryption method, including the steps: The client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server; The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, and the length of the encrypted data is the same as the length of the game interface data; The client sends the encrypted data and the missing elements to the server; The server decrypts the encrypted data based on the missing elements to obtain the game interface data.
[0011] As can be seen from the above description, the beneficial effects of the present invention are as follows: The client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server. The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, and its length is the same as the length of the original game interface data. The client sends the encrypted data and the missing elements to the server. The server decrypts the encrypted data based on the missing elements to obtain the game interface data. In this way, the elements in the Sudoku are used to encrypt the game interface data, achieving equal-length encryption, ensuring that the encrypted data will not be too long, and using the missing elements in the missing Sudoku matrix to make the encryption key random and uniquely solvable, not easily cracked, thereby avoiding the encrypted game data from being too long and effectively ensuring the security of the game data.
[0012] Further, before the client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server, it further includes the steps: The server uses the dancing links algorithm to generate a Sudoku matrix; The server randomly deletes the elements in the Sudoku matrix to obtain a missing Sudoku matrix. The missing Sudoku matrix includes at least a preset number of remaining elements, and the preset number of remaining elements makes the missing Sudoku matrix have a unique solution; The server selects the missing elements of any row, column or diagonal corresponding to the game interface from the missing Sudoku matrix; The server sends the missing elements to the client.
[0013] As described above, the server randomly generates a Sudoku matrix, randomly deletes elements from it to obtain a missing Sudoku matrix, then randomly selects the missing elements in a row, column, or diagonal from the matrix, associates them with the game interface, and sends them to the client, making the randomness and uniqueness of the missing elements used for encryption strong, effectively improving the security of the game interface data.
[0014] Further, when the client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server, it further includes the steps of: The client returns a response message to the server, and the response message includes a timestamp; The client encrypts the game interface data of the game interface based on the missing elements, and the obtained encrypted data includes: The client performs an exclusive OR operation on the timestamp, the missing elements, and the game interface data to obtain the encrypted data.
[0015] As described above, after receiving the missing elements, the client returns a response message to the server, including a timestamp to prevent data retransmission. The client performs an exclusive OR operation on the timestamp, the missing elements, and the game interface data to obtain the encrypted data, achieving equal-length encryption and improving the security of the encrypted data.
[0016] Further, after the server selects the missing elements in any row, column, or diagonal corresponding to the game interface from the missing Sudoku matrix, it further includes the steps of: The server creates a temporary logical chain according to the missing elements in any row, column, or diagonal corresponding to the game interface selected from the missing Sudoku matrix; The server decrypts the encrypted data based on the missing elements, and the obtained game interface data includes: The server determines whether the elements in the temporary logical chain are the same as the missing elements sent by the client. If so, it performs an exclusive OR operation on the timestamp, the encrypted data, and the missing elements to obtain the game interface data, and processes the game interface data. If not, it does not process the encrypted data.
[0017] As described above, the server creates a temporary logical chain for each game interface, and the missing elements corresponding to the game interface are stored in the temporary logical chain. In the subsequent decryption stage, if the elements in the temporary logical chain are the same as the missing elements sent by the client, the server performs an exclusive OR operation on the timestamp, the encrypted data, and the missing elements to obtain the original game interface data and perform subsequent processing. If not, it means that the current game interface data is illegal and is not processed, thus ensuring the security of the game interface data.
[0018] Further, it further includes the steps of: The server determines whether the client is restarted. If so, it uses the dancing links algorithm to generate a new Sudoku matrix.
[0019] As can be seen from the above description, every time the client is restarted, the server regenerates the Sudoku matrix, increasing the divergence and randomness of the game interface data, making it impossible for illegal personnel to attempt to obtain the key through periodic data, and effectively improving the security of the game interface data.
[0020] Please refer to Figure 2 , a game data encryption and decryption system, including a client and a server. The client includes a first memory, a first processor, and a first computer program stored on the first memory and executable on the first processor. The server includes a second memory, a second processor, and a second computer program stored on the second memory and executable on the second processor. It is characterized in that when the first processor executes the first computer program, the following steps are implemented: Receiving the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server; Encrypting the game interface data of the game interface based on the missing elements to obtain encrypted data, and the length of the encrypted data is the same as the length of the game interface data; Sending the encrypted data and the missing elements to the server; When the second processor executes the second computer program, the following steps are implemented: Decrypting the encrypted data based on the missing elements to obtain the game interface data.
[0021] As can be seen from the above description, the beneficial effects of the present invention are as follows: The client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server. The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, and its length is the same as the length of the original game interface data. The client sends the encrypted data and the missing elements to the server. The server decrypts the encrypted data based on the missing elements to obtain the game interface data. In this way, the elements in the Sudoku are used to encrypt the game interface data, realizing equal-length encryption, ensuring that the encrypted data will not be too long, and using the missing elements in the missing Sudoku matrix to make the encryption key random and uniquely solvable, not easily cracked, thus avoiding the encrypted game data from being too long and effectively ensuring the security of the game data.
[0022] Further, when the second processor executes the second computer program, the following steps are further implemented: Using the dancing links algorithm to generate a Sudoku matrix; Randomly delete elements in the Sudoku matrix to obtain a missing Sudoku matrix. The missing Sudoku matrix includes at least a preset number of remaining elements, and the preset number of remaining elements enables the missing Sudoku matrix to have a unique solution; Select missing elements in any row, column, or diagonal corresponding to the game interface from the missing Sudoku matrix; Send the missing elements to the client.
[0023] As can be seen from the above description, the server will randomly generate a Sudoku matrix, randomly delete elements in it to obtain a missing Sudoku matrix, then randomly select missing elements in a row, column, or diagonal from the matrix, correspond them to the game interface, and send them to the client, making the randomness and uniqueness of the missing elements for subsequent encryption strong, effectively improving the security of the game interface data.
[0024] Further, when the first processor executes the first computer program, the following steps are also implemented: Return a response message to the server, and the response message includes a timestamp; Encrypt the game interface data of the game interface based on the missing elements, and the obtained encrypted data includes: Perform exclusive OR on the timestamp, the missing elements, and the game interface data to obtain the encrypted data.
[0025] As can be seen from the above description, after receiving the missing elements, the client returns a response message to the server, which includes a timestamp to prevent data resending. The client performs exclusive OR on the timestamp, the missing elements, and the game interface data to obtain the encrypted data, achieving equal-length encryption and improving the security of the encrypted data.
[0026] Further, when the second processor executes the second computer program, the following steps are also implemented: Create a temporary logical chain according to the missing elements in any row, column, or diagonal corresponding to the game interface selected from the missing Sudoku matrix; The decrypting the encrypted data based on the missing elements to obtain the game interface data includes: Judge whether the elements in the temporary logical chain are the same as the missing elements sent by the client. If so, perform exclusive OR on the timestamp, the encrypted data, and the missing elements to obtain the game interface data, and process the game interface data. If not, do not process the encrypted data.
[0027] As described above, the server creates a temporary logical chain for each game interface. The missing elements corresponding to the game interface are stored in the temporary logical chain. In the subsequent decryption stage, if the elements in the temporary logical chain are the same as the missing elements sent by the client, the server performs an exclusive OR operation on the timestamp, encrypted data, and missing elements to obtain the original game interface data and proceeds with subsequent processing. If not, it indicates that the current game interface data is illegal and no processing is performed, thus ensuring the security of the game interface data.
[0028] Further, when the second processor executes the second computer program, the following steps are also implemented: Determine whether the client has restarted. If so, use the dancing links algorithm to generate a new Sudoku matrix.
[0029] As described above, the server regenerates the Sudoku matrix every time the client restarts, increasing the divergence and randomness of the game interface data, making it impossible for illegal personnel to attempt to obtain the key through periodic data, and effectively improving the security of the game interface data.
[0030] The above game data encryption and decryption method and system of the present invention can be applied to the game data transmission scenario, which will be described below through specific embodiments: Please refer to Figure 1 、 Figures 3 to 6 For the first embodiment of the present invention: A game data encryption and decryption method includes the steps of: S1. The server uses the dancing links (Dancing Links X, DLX) algorithm to generate a Sudoku matrix.
[0031] Among them, the form of the Sudoku matrix can be flexibly set according to actual needs.
[0032] In an optional embodiment, the Sudoku matrix is in the form of a 9x9 grid, that is, 9x9 bytes, as Figure 3 shown.
[0033] In another optional embodiment, the Sudoku matrix is in the form of a 4x4 grid, that is, 4x4 bytes.
[0034] S2. The server randomly deletes elements in the Sudoku matrix to obtain a missing Sudoku matrix. The missing Sudoku matrix includes at least a preset number of remaining elements, and the preset number of remaining elements makes the missing Sudoku matrix have a unique solution, as Figure 3 and Figure 4 shown.
[0035] Specifically, the server traverses the Sudoku matrix in row units. For the target row traversed, elements in the target row are randomly deleted to obtain a missing Sudoku matrix.
[0036] For example, if the Sudoku matrix is in the form of a 9x9 grid, for each row in the Sudoku matrix, 0 to 9 elements can be randomly deleted, as long as it is ensured that there are at least 17 remaining elements in the final missing Sudoku matrix, because at least 17 elements are required to obtain the unique solution of a 9x9 Sudoku. And the space required for each row to solve the problem in the missing Sudoku matrix is: 9 - n, where n represents the number of remaining elements in the current row, that is, the client needs to submit 9 - n elements to the server later to decrypt the data. The space required by the client is: N - (9 - n1) - (9 - n2) - (9 - n3) - (9 - n4) - (9 - n5) - (9 - n6) - (9 - n7) - (9 - n8) - (9 - n9), where N represents the total number of all elements in the entire Sudoku matrix, that is, 9×9 = 81, and nr represents the number of remaining elements in the r-th row of the Sudoku matrix, and nr includes n1 to n9.
[0037] S3. The server selects missing elements in any row, column, or diagonal corresponding to the game interface from the missing Sudoku matrix.
[0038] Each row, column, and each diagonal in the missing Sudoku matrix can correspond to a game interface. That is to say, if the Sudoku matrix is in the 9x9 form, then the maximum number of interface encryptions it supports is: 9 + 9 + 2 = 20, that is, it can correspond to 20 game interfaces. For example, the server can select the missing elements in the first row from the missing Sudoku matrix to correspond to the game interface.
[0039] S4. The server creates a temporary logical chain based on the missing elements in any row, column, or diagonal corresponding to the game interface selected from the missing Sudoku matrix, as Figure 5 shown.
[0040] For example, assume that the missing elements in the first row corresponding to the game interface selected by the server from the missing Sudoku matrix are 2 3 6 5 7, then 2 3 6 5 7 is put into the created temporary logical chain.
[0041] S5. The server sends the missing elements to the client.
[0042] S6. The client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server, and at the same time the client returns a response message to the server, and the response message includes a timestamp.
[0043] S7. The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, asFigure 6 As shown, the length of the encrypted data is the same as the length of the game interface data.
[0044] Specifically, the client uses an encryption module to perform exclusive OR on the timestamp, the missing elements, and the game interface data to obtain the encrypted data.
[0045] For example, the game interface data is 09 0E 03 00 03 05 00 01 35, the timestamp is 0E 98 78 60, and the missing elements are five elements 9, 7, 3, 5, 1. Perform exclusive OR on the three, specifically: ; The obtained encrypted data is: 09 0E 03 00 0A 0C 9B 7D 55, and this encrypted data is of the same length as the game interface data.
[0046] S8. The client sends the encrypted data and the missing elements to the server through the communication module, as Figure 6 shown.
[0047] S9. The server decrypts the encrypted data based on the missing elements to obtain the game interface data.
[0048] Specifically, as Figure 5 shown, the server determines whether the elements in the temporary logic chain are the same as the missing elements sent by the client. If so, it uses a decryption module to perform exclusive OR on the timestamp, the encrypted data, and the missing elements to obtain the game interface data, and processes the game interface data. If not, it does not process the encrypted data.
[0049] For example, the complete elements in the first row of the missing Sudoku matrix are 1, 2, 6, 7, 4, 3, 9, 5, 8, and the missing elements are 2, 6, 7. The corresponding temporary logic chain is the remaining elements obtained by removing the missing elements from the complete elements. The server fills the missing elements obtained from the client into the temporary logic chain. If the elements in the temporary logic chain conform to the Sudoku rules, it means the data is legal, and exclusive OR is performed on the timestamp, the encrypted data, and the missing elements to obtain the game interface data. Otherwise, it means the data is illegal and the encrypted data is not processed.
[0050] In an alternative embodiment, it further includes: S10. The server determines whether the client restarts. If so, it uses the dancing links algorithm to generate a new Sudoku matrix.
[0051] Please refer to Figure 2 , the second embodiment of the present invention is: A game data encryption and decryption system includes a client and a server. The client includes a first memory, a first processor, and a first computer program stored on the first memory and executable on the first processor. The server includes a second memory, a second processor, and a second computer program stored on the second memory and executable on the second processor. When the first processor executes the first computer program, it implements each step executed by the client in the game data encryption and decryption method in Embodiment 1. When the second processor executes the second computer program, it implements each step executed by the server in the game data encryption and decryption method in Embodiment 1.
[0052] In summary, the present invention provides a game data encryption and decryption method and system. The client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server. The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, the length of which is the same as that of the original game interface data. The client sends the encrypted data and the missing elements to the server. The server decrypts the encrypted data based on the missing elements to obtain the game interface data. In this way, the elements in the Sudoku are used to encrypt the game interface data, achieving equal-length encryption, ensuring that the encrypted data will not be too long, and using the missing elements in the missing Sudoku matrix to make the encryption key random and uniquely solvable, which is not easily cracked, thus avoiding the encrypted game data from being too long and effectively ensuring the security of the game data. Moreover, the server creates a temporary logical chain for each game interface, and the missing elements corresponding to the game interface are stored in the temporary logical chain. In the subsequent decryption stage, if the elements in the temporary logical chain are the same as the missing elements sent by the client, the server performs an exclusive OR operation on the timestamp, the encrypted data, and the missing elements to obtain the original game interface data and performs subsequent processing. If not, it means that the current game interface data is illegal and no processing is performed on it, thus ensuring the security of the game interface data. In addition, after each restart of the client, the server regenerates the Sudoku matrix, increasing the divergence and randomness of the game interface data, making it impossible for illegal personnel to attempt to obtain the key through periodic data, and effectively improving the security of the game interface data.
[0053] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in the related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for encrypting and decrypting game data, characterized in that, Including the steps: The client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server; The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, and the length of the encrypted data is the same as the length of the game interface data; The client sends the encrypted data and the missing elements to the server; The server decrypts the encrypted data based on the missing elements to obtain the game interface data.
2. The method for encrypting and decrypting game data according to claim 1, wherein Before the client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server, it further includes the steps: The server uses the dancing links algorithm to generate a Sudoku matrix; The server randomly deletes elements in the Sudoku matrix to obtain a missing Sudoku matrix, and the missing Sudoku matrix includes at least a preset number of remaining elements, and the preset number of remaining elements makes the missing Sudoku matrix have a unique solution; The server selects the missing elements of any row, column or diagonal corresponding to the game interface from the missing Sudoku matrix; The server sends the missing elements to the client.
3. A game data encryption and decryption method according to claim 2, characterized in that, When the client receives the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server, it further includes the steps: The client returns a response message to the server, and the response message includes a timestamp; The client encrypts the game interface data of the game interface based on the missing elements to obtain encrypted data, including: The client performs exclusive OR on the timestamp, the missing elements and the game interface data to obtain encrypted data.
4. A game data encryption and decryption method according to claim 3, characterized in that After the server selects the missing elements of any row, column or diagonal corresponding to the game interface from the missing Sudoku matrix, it further includes the steps: The server creates a temporary logical chain according to the missing elements of any row, column or diagonal corresponding to the game interface selected from the missing Sudoku matrix; The server decrypts the encrypted data based on the missing elements to obtain the game interface data, including: The server determines whether the elements in the temporary logical chain are the same as the missing elements sent by the client. If so, it performs exclusive OR on the timestamp, the encrypted data and the missing elements to obtain the game interface data, and processes the game interface data. If not, it does not process the encrypted data.
5. A game data encryption and decryption method according to claim 1, characterized in that, It further includes the steps: The server determines whether the client restarts. If so, it uses the dancing links algorithm to generate a new Sudoku matrix.
6. A game data encryption and decryption system, comprising a client and a server. The client includes a first memory, a first processor, and a first computer program stored on the first memory and executable on the first processor. The server includes a second memory, a second processor, and a second computer program stored on the second memory and executable on the second processor, characterized in that, When the first processor executes the first computer program, it implements the following steps: Receiving the missing elements of the missing Sudoku matrix corresponding to the game interface sent by the server; Encrypting the game interface data of the game interface based on the missing elements to obtain encrypted data, and the length of the encrypted data is the same as the length of the game interface data; Sending the encrypted data and the missing elements to the server; When the second processor executes the second computer program, it implements the following steps: Decrypting the encrypted data based on the missing elements to obtain the game interface data.
7. A game data encryption and decryption system according to claim 6, characterized in that, When the second processor executes the second computer program, the following steps are also implemented: Generate a Sudoku matrix using the dancing links algorithm; Randomly delete elements from the Sudoku matrix to obtain a missing Sudoku matrix, where the missing Sudoku matrix includes at least a preset number of remaining elements, and the preset number of remaining elements makes the missing Sudoku matrix have a unique solution; Select missing elements in any row, column, or diagonal corresponding to the game interface from the missing Sudoku matrix; Send the missing elements to the client.
8. A game data encryption and decryption system according to claim 7, characterized in that, When the first processor executes the first computer program, the following steps are also implemented: Return a response message to the server, where the response message includes a timestamp; Encrypt the game interface data of the game interface based on the missing elements, and the obtained encrypted data includes: Perform an exclusive OR operation on the timestamp, the missing elements, and the game interface data to obtain the encrypted data.
9. A game data encryption and decryption system according to claim 8, wherein, When the second processor executes the second computer program, the following steps are also implemented: Create a temporary logical chain according to the missing elements in any row, column, or diagonal corresponding to the game interface selected from the missing Sudoku matrix; The decrypting the encrypted data based on the missing elements to obtain the game interface data includes: Judge whether the elements in the temporary logical chain are the same as the missing elements sent by the client. If so, perform an exclusive OR operation on the timestamp, the encrypted data, and the missing elements to obtain the game interface data, and process the game interface data. If not, do not process the encrypted data.
10. A game data encryption and decryption system according to claim 6, characterized in that, When the second processor executes the second computer program, the following steps are also implemented: Judge whether the client restarts. If so, generate a new Sudoku matrix using the dancing links algorithm.