A method and device for generating and extracting steganographic information, equipment and storage medium
By combining Gozi game behavior and attraction matrix optimization methods, the problem of inconsistent move selection in the existing technology is solved. The generated Gozi chess score is consistent with the behavior of professional chess players in spatial distribution, achieving efficient and safe hidden information transmission.
Patent Information
- Application Number
- CN202510655158.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-05-21
AI Technical Summary
The existing steganography scheme based on reinforcement learning has obvious flaws in the distribution of action space. The generated move selection is significantly different from the gathered move model of professional chess players, increasing the risk of hidden communication being identified and the threat of strategy being cracked.
By combining Gochi game behavior and attraction matrix optimization methods, a new steganography channel is constructed, a convolutional neural network and Monte Carlo tree search algorithm is used to generate candidate drop positions, and spatial distribution optimization is used to optimize the attraction matrix, and secret information is embedded in Gochi's chess score through dynamic encoding.
The generated secret chess score is highly consistent with the behavior of professional chess players in spatial distribution, maintaining the naturalness and logic of the game, reducing the recognition risk of steganography analysis, enhancing the ability to detect resistance, and realizing the hidden transmission of large-capacity information.
Smart Images

Figure CN120180479B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information hiding, and more specifically, to a method and apparatus for generating and extracting stego information, a device, and a storage medium. Background Art
[0002] Steganography, a core technology for covert information communication, aims to conceal secret information by exploiting the characteristics of the medium, while ensuring that the communication itself remains undetectable. The theoretical basis of this technology can be traced back to the classic "prisoner model" proposed by Simmons in 1983. In this model, communicating parties Alice and Bob use a pre-shared key to embed a secret message into a cover object, creating a secret object called Stego-object. This object is then transmitted over a public channel. During this process, a potential eavesdropper, Wendy, can monitor the communication but will be unable to detect the existence of the hidden information.
[0003] Among the many steganographic media, images have become a key research topic in the field of information hiding due to their abundant redundancy and convenient transmission characteristics. Traditional image modification steganography techniques, including least significant bit embedding (LSB), discrete cosine transform (DCT), and discrete wavelet transform (DWT), primarily embed information by directly modifying pixel values or frequency domain coefficients. However, these methods have significant drawbacks: their modifications leave detectable statistical signatures in the media, making them easily detectable by steganalysis tools.
[0004] In recent years, the rise of generative steganography has brought new breakthroughs in the field of information hiding. This type of technology uses secret information to directly drive the generation of a secret carrier, significantly improving concealment performance. Existing generative steganography techniques can be divided into two categories based on how the information is expressed. Pixel-based methods embed information by generating images with specific pixel values. While they can effectively circumvent traditional statistical analysis, their dependence on pixel values makes them less robust against modification attacks. Latent space mapping-based methods map the secret information into the latent space of a generative network, achieving greater robustness. However, both methods share a common limitation: the generated secret carriers often only conform to the distribution characteristics of the training dataset and lack true semantic content. Frequent use in real-world applications can easily arouse suspicion, thus limiting their practicality.
[0005] To overcome this technical bottleneck, behavioral construction steganography has emerged. As a key branch of generative steganography, this method innovatively simulates human interactions (such as gaming and social activities) to construct a new type of steganographic channel. This behavioral simulation approach enhances the plausibility and authenticity of the communication process, effectively circumventing traditional statistical detection mechanisms. With the rapid development of artificial intelligence (AI), reinforcement learning-based game behavior generation models offer a new technical approach for behavioral construction steganography. These models can be trained to automatically generate game behaviors for information hiding, significantly reducing labor costs and improving communication efficiency.
[0006] However, existing reinforcement learning-based steganography schemes have significant flaws in the distribution of action spaces: while the model's generated initial moves are generally reasonable, after excluding these priority moves, the suboptimal moves often exhibit a randomly dispersed distribution, significantly different from the clustered move patterns exhibited by professional Go players in actual games. This anomalous move distribution not only increases the risk of covert communications being detected but can also lead to strategy decryption, posing a potential threat to the security of the entire system. Summary of the Invention
[0007] In order to overcome at least one technical problem existing in the above-mentioned prior art, the present invention provides a method and apparatus, a device and a storage medium for generating and extracting stego information. The present invention combines Gobang game behavior with an attraction matrix optimization method to construct a new stego channel to achieve efficient embedding and secure transmission of secret information.
[0008] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0009] A method for generating stego information, applied to a sending end, comprising:
[0010] Encode the secret information to be hidden into a binary bit stream and add protocol control characters at the beginning and end to form a transmission data unit;
[0011] A set of candidate placement positions is generated using a reinforcement learning-driven Gobang game model that extracts board state features using a convolutional neural network and uses a Monte Carlo tree search algorithm to calculate the probability distribution of winning rates for each position.
[0012] Construct an attraction matrix with the same dimensions as the chessboard, calculate the weighted spatial influence of the placed pieces on the blank area based on the Manhattan distance, and optimize the spatial distribution of the candidate action set;
[0013] Dynamically encode the optimized candidate placement positions into binary segments according to the region type, where the middle region of the chessboard is encoded with 4 bits of azimuth, the boundary region is encoded with 2 bits of axial direction, and the four corner vertices are encoded with 1 bit of direction;
[0014] Map the binary sequence of the transmission data unit to the encoded placement position through an iterative matching algorithm, select the position with the longest prefix match to perform the actual placement, and generate a Gobang score sheet carrying hidden information.
[0015] Furthermore, the method for constructing the attraction matrix includes:
[0016] Establish a binary state matrix T corresponding to a 13×13 chessboard, where the placed positions are marked as 1 and the blank positions are marked as 0;
[0017] Define a spatial attraction attenuation function W(d), where the weight is w1 when the Manhattan distance d = 1, w2 when 1 < d ≤ 3, and 0 when d > 3;
[0018] For each blank position (x, y), calculate its total attraction value which is obtained by weighted summing the influence of all placed positions on it:
[0019]
[0020] where, is the binary matrix of the chessboard, marking the occupied positions; is the Manhattan distance calculation formula, ; W ( d ) is the distance attenuation weight function, which assigns weights according to the Manhattan distance.
[0021] Furthermore, the optimization process of the candidate action set includes:
[0022] Perform spatial rationality screening to exclude candidates (occupied positions);
[0023] Perform attraction weighted adjustment on the candidates passing the screening:
[0024]
[0025] In the formula, is the adjustment parameter, used to control the balance strength between the original winning rate and the spatial attraction, is the original winning rate, is the adjusted winning rate.
[0026] Furthermore, the dynamic encoding rule specifically includes:
[0027] The middle area is divided into 8 directions, and each direction area is coded using 4 bits of binary code;
[0028] The non-vertex positions of the boundaries are coded using 2 bits according to the orthogonal axial relationship;
[0029] The positions of the four corner vertices along the edge of the chessboard are encoded using 1 bit.
[0030] A stego information generating device, comprising:
[0031] An information preprocessing module, used for converting secret information into a binary transmission sequence with control characters;
[0032] The game decision module, which includes a convolutional neural network and a Monte Carlo tree search algorithm, is used to generate candidate placement positions that conform to the rules of Gobang;
[0033] The spatial optimization module rationalizes the spatial distribution of candidate actions by calculating the attraction matrix;
[0034] The encoding mapping module performs the regional differentiation conversion of chessboard positions to binary codes;
[0035] The iterative embedding module realizes the dynamic mapping of secret information to move positions through prefix matching algorithm.
[0036] A method for extracting steganalytic information, applied to a receiving end, comprising:
[0037] The received encrypted chess image is converted into color space and morphologically processed. The chess piece coordinates are located through Hough circle detection. The number recognition network is combined to analyze the move sequence and generate a time-series chess piece position sequence.
[0038] The players are distinguished by the odd or even number of the move sequence, and the relative position coordinate difference between two consecutive moves is calculated;
[0039] Based on the preset encoding rule library, the relative position coordinates are reversely decoded into binary data segments, where the coordinate difference of the middle area is mapped to 4 bits according to the azimuth angle, the coordinate difference of the boundary area is mapped to 2 bits according to the axial relationship, and the coordinate difference of the vertex area is mapped to 1 bit according to the direction;
[0040] All decoded binary data fragments are spliced together according to the order of the moves, and after removing the first and last protocol control characters, the inverse encoding operation is performed to restore the original secret information embedded by the sender.
[0041] Furthermore, the digital processing of chess records specifically includes:
[0042] Using HSV color space analysis, set the hue threshold H∈[16,22], saturation threshold S∈[50,255], and lightness threshold V∈[128,255] for chess piece segmentation;
[0043] Use the improved Hough circle detection algorithm with a dynamic radius of 20-35 pixels to locate the center coordinates of the chess piece;
[0044] The sequence number of the chess piece is recognized through a convolutional neural network with multi-scale feature fusion. The network structure includes a resolution compression path from 32×32 to 16×16 to 4×4.
[0045] A stego information extraction device, comprising:
[0046] Image analysis module, used to achieve color space conversion, chess piece positioning and sequence number recognition of chess image;
[0047] The sequence reconstruction module converts the visual data into a time-series sequence of chess position coordinates;
[0048] The reverse decoding module performs reverse parsing of binary data segments based on region type differences;
[0049] The information integration module splices binary data streams and removes control characters to restore the original information.
[0050] An electronic device comprises: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the program implements the aforementioned method for generating stego information or the aforementioned method for extracting stego information.
[0051] A readable storage medium, characterized in that a program is stored on the readable storage medium, and when the program is executed by a processor, the program implements the aforementioned stego information generation method or the aforementioned stego information extraction method.
[0052] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0053] The present invention provides a method and apparatus, device, and storage medium for generating and extracting steganographic information. The method utilizes the vast strategic space and high hidden capacity of Gobang (495 bits can be embedded per carrier) to achieve the covert transmission of large amounts of information. By introducing an attraction matrix to optimize move selection, the generated steganographic records are highly consistent in spatial distribution with the behavior of professional players, which not only maintains the naturalness and logic of the game but also effectively reduces the risk of being identified by steganalysis technology and enhances anti-detection capabilities. Relying on the universal rules and low technical threshold of Gobang, the method does not require complex electronic equipment or digital media, avoids electronic traces that are easily tracked by technical means, and is low-cost and easy to implement. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0055] Figure 1 Schematic diagram of the overall framework of a generative steganography method based on Gobang game behavior provided in one embodiment of the present application;
[0056] Figure 2 This is a schematic diagram of a steganographic chess record generation process provided in one embodiment of the present application;
[0057] Figure 3 is a schematic diagram of a process for optimizing a candidate action set using an attraction matrix provided in one embodiment of the present application;
[0058] Figure 4 Schematic diagram of the process of extracting steganographic chess game information provided in one embodiment of the present application;
[0059] Figure 5 This is a schematic diagram of a digital identification network structure provided in one embodiment of the present application. DETAILED DESCRIPTION
[0060] The purpose of this invention is to propose a generative steganographic technique for Gomoku positional relationships based on an attraction matrix enhancement. By introducing a novel attraction matrix to optimize steganographic behavior, this technique overcomes the limitations of traditional generative steganography, such as a single carrier distribution, unnatural behavior patterns, and insufficient robustness, thereby achieving more secure and natural covert communication. This method aims to leverage the strategic space and high concealment capacity of Gomoku games to generate encrypted game records that are highly similar to real-world games, ensuring efficient and confidential information transmission. This method is applicable to practical needs in military, intelligence, and privacy protection fields.
[0061] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0062] Example 1
[0063] like Figure 1 As shown, the present invention provides a technical solution:
[0064] A method for generating stego information, applied to a sending end, comprising:
[0065] Encode the secret information to be hidden into a binary bit stream, and add protocol control characters at the beginning and end to form a transmission data unit;
[0066] Generate a set of candidate move positions through a Gomoku game model driven by reinforcement learning. The Gomoku game model extracts the board state features based on a convolutional neural network and uses the Monte Carlo tree search algorithm to calculate the winning rate probability distribution of each position;
[0067] Construct an attraction matrix with the same dimension as the board, calculate the weighted spatial influence of the occupied positions on the blank areas according to the Manhattan distance, and optimize the spatial distribution of the candidate action set;<>
[0068] Dynamically encode the optimized candidate move positions into binary segments according to the region type. Among them, the middle area of the board is encoded with 4 bits of azimuth, the boundary area is encoded with 2 bits of axis, and the four corner vertices are encoded with 1 bit of direction;
[0069] Map the binary sequence of the transmission data unit to the encoded move positions through an iterative matching algorithm, select the position with the longest prefix match to perform the actual move, and generate a Gomoku game record carrying the hidden information.
[0070] Embodiment 2
[0071] Based on Embodiment 1, the method for constructing the attraction matrix includes:
[0072] Establish a binary state matrix T corresponding to a 13×13 board, where the occupied positions are marked as 1 and the blank positions are marked as 0;
[0073] Define a spatial attraction attenuation function W(d). When the Manhattan distance d = 1, the weight is w1; when 1 < d ≤ 3, the weight is w2; when d > 3, the weight is 0;
[0074] For each blank position (x, y), calculate its total attraction value which is obtained by weighted summation of the influence of all occupied positions on it:
[0075]
[0076] where, is the binary matrix of the board, marking the occupied positions; is the Manhattan distance calculation formula, ;<> W ( d ) is the distance attenuation weight function, which assigns weights according to the Manhattan distance.
[0077] Furthermore, the optimization process of the candidate action set includes:
[0078] Perform space rationality screening and exclude full Candidate actions for (occupied positions);
[0079] Adjust the attractiveness weight of candidate actions that pass the screening:
[0080]
[0081] Where, It is a parameter to adjust the balance between the original winning rate and the spatial attractiveness. is the original winning rate, is the adjusted win rate.
[0082] Furthermore, the dynamic coding rules specifically include:
[0083] The middle area is divided into 8 directions, and each direction area is coded using 4 bits of binary code;
[0084] The non-vertex positions of the boundaries are coded using 2 bits according to the orthogonal axial relationship;
[0085] The positions of the four corner vertices along the edge of the chessboard are encoded using 1 bit.
[0086] Example 3
[0087] The present invention provides a technical solution:
[0088] A stego information generating device, comprising:
[0089] An information preprocessing module, used for converting secret information into a binary transmission sequence with control characters;
[0090] The game decision module, which includes a convolutional neural network and a Monte Carlo tree search algorithm, is used to generate candidate placement positions that conform to the rules of Gobang;
[0091] The spatial optimization module rationalizes the spatial distribution of candidate actions by calculating the attraction matrix;
[0092] The encoding mapping module performs the regional differentiation conversion of chessboard positions to binary codes;
[0093] The iterative embedding module realizes the dynamic mapping of secret information to move positions through prefix matching algorithm.
[0094] Example 4
[0095] like Figure 1 As shown, the present invention provides a technical solution:
[0096] A method for extracting steganalytic information, applied to a receiving end, comprising:
[0097] The received encrypted chess image is converted into color space and morphologically processed. The chess piece coordinates are located through Hough circle detection. The number recognition network is combined to analyze the move sequence and generate a time-series chess piece position sequence.
[0098] The players are distinguished by the odd or even number of the move sequence, and the relative position coordinate difference between two consecutive moves is calculated;
[0099] Based on the preset encoding rule library, the relative position coordinates are reversely decoded into binary data segments, where the coordinate difference of the middle area is mapped to 4 bits according to the azimuth angle, the coordinate difference of the boundary area is mapped to 2 bits according to the axial relationship, and the coordinate difference of the vertex area is mapped to 1 bit according to the direction;
[0100] All decoded binary data fragments are spliced together according to the order of the moves, and after removing the first and last protocol control characters, the inverse encoding operation is performed to restore the original secret information embedded by the sender.
[0101] Example 5
[0102] Based on Example 4, the chess record digitization processing specifically includes:
[0103] Using HSV color space analysis, set the hue threshold H∈[16,22], saturation threshold S∈[50,255], and lightness threshold V∈[128,255] for chess piece segmentation;
[0104] Use the improved Hough circle detection algorithm with a dynamic radius of 20-35 pixels to locate the center coordinates of the chess piece;
[0105] The sequence number of the chess piece is recognized through a convolutional neural network with multi-scale feature fusion. The network structure includes a resolution compression path from 32×32 to 16×16 to 4×4.
[0106] Example 6
[0107] The present invention provides a technical solution:
[0108] A stego information extraction device, comprising:
[0109] Image analysis module, used to achieve color space conversion, chess piece positioning and sequence number recognition of chess image;
[0110] The sequence reconstruction module converts the visual data into a time-series sequence of chess position coordinates;
[0111] The reverse decoding module performs reverse parsing of binary data segments based on region type differences;
[0112] The information integration module splices binary data streams and removes control characters to restore the original information.
[0113] Example 7
[0114] The present invention provides a technical solution:
[0115] An electronic device comprises: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the program implements the aforementioned method for generating stego information or the aforementioned method for extracting stego information.
[0116] Example 8
[0117] The present invention provides a technical solution:
[0118] A readable storage medium, characterized in that a program is stored on the readable storage medium, and when the program is executed by a processor, the program implements the aforementioned stego information generation method or the aforementioned stego information extraction method.
[0119] The stego information generation method and stego information extraction method of this application include the following four parts:
[0120] 1. Construction of Gobang game model:
[0121] This paper first constructs a Gomoku game model based on reinforcement learning to support the generation of game records for covert communication. The chessboard is represented by a 13×13 two-dimensional matrix, and the chess piece states are categorized as empty, black, and white. The core of the model utilizes a convolutional neural network (CNN), comprising multiple convolutional layers, batch normalization layers, and ReLU activation functions. This extracts local features of the board and outputs the probability distribution of moves through a fully connected layer. To improve performance, residual connections are introduced to optimize generalization and mitigate the vanishing gradient problem. The training process combines self-play reinforcement learning methods with policy gradients and Monte Carlo Tree Search (MCTS) algorithms to optimize move strategies through multiple simulated games. The value network and policy network are used to predict win and loss probabilities, ensuring that the generated moves conform to the rules of Gomoku and are reasonable, laying the foundation for subsequent information embedding.
[0122] 2. Attraction Matrix Optimization of Move Selection:
[0123] To enhance the rationality of the spatial distribution of candidate moves, this paper introduces an attraction matrix to optimize the move selection process. First, a binary matrix T with the same dimensions as the chessboard is established to represent the chess game state, and a spatial attraction decay law W(d) is defined, assigning different weights based on distance (e.g., w1 when d=1, 0 when d>3). For each blank position (x, y), its total attraction value is calculated. , which is obtained by summing the weighted influence of all the positions that have been played, and by the Manhattan distance After candidate actions are generated, a two-stage optimization is implemented: first, to exclude already occupied positions, and second, to adjust the probability of the remaining actions by weighted attractiveness. This optimization makes the move strategy closer to the behavior of professional chess players, improving the security of covert communication and the logical consistency of the chess game.
[0124] 3. Information Hiding in Confidential Chess Game Generation:
[0125] The information hiding process embeds secret information into the Gomoku game action sequence through dynamic encoding to achieve high-capacity steganography. The initial information I is converted into binary B by the encoding function g, and control characters (such as SOH and EOT) are added to encapsulate it into In each state, the game model generates a set of candidate actions , after filtering low-probability actions, using the position encoding function (divided into 3-4 bits in the middle area, 2 bits in the boundary area, and 1 bit in the vertex area) Map the position of the chess piece into a binary bit stream. Through the iterative embedding algorithm, select The prefix matching action is executed until the information is embedded or the board is full, generating a secret game record. Each carrier can embed up to 495 bits of information, and the game record looks the same as a normal game, ensuring confidentiality.
[0126] 4. Digitization of chess records and information extraction:
[0127] The receiver recovers the secret information through chess record digitization and information extraction technology. The digitization process combines HSV color space analysis (threshold H: 16-22, S: 50-255, V: 128-255) and an improved Hough circle detection algorithm (dynamic radius 20-35 pixels) to accurately segment and locate the chess pieces. A deep learning network (including multi-scale feature fusion and regularization strategies) is then used to identify the order of the chess pieces and generate a structured sequence. When extracting information, the black and white squares are distinguished according to the odd and even index (for example, the odd number is the black square), and the relative position (dx, dy) and the agreed coding rules are used. Decoding binary bit stream , remove the control characters after splicing and pass the inverse encoding function Restore the original information I.
[0128] Gobang is a typical two-player zero-sum game: two players play with black and white pieces, alternating between the vertical and horizontal intersections of a 15×15122-way board. The first player to form a continuous line of five pieces horizontally, vertically, or diagonally wins. Black moves first, and the two players follow a turn-based system of placing pieces alternately at vacant intersections. The strategy space, calculated by the complexity of the game tree, can reach [a value] of [amount]. This value significantly exceeds the complexity of traditional chess games but is lower than that of Go. This makes it have two key characteristics: first, the huge state space provides sufficient redundancy for strategy hiding; second, the simple basic rules greatly reduce the complexity of technical implementation. Based on the above dual advantages, this study chooses Gobang as the carrier platform for information hiding technology. The overall process is as follows Figure 1 As shown in Figure 2, this paper constructs Gobang game behavior as a high-capacity steganographic carrier, which mainly consists of three core modules: (1) constructing a Gobang game model; (2) generating Gobang game records containing steganographic information; and (3) extracting secret information from Gobang game records.
[0129] 1. Gobang game module:
[0130] The local correlation characteristics of Gobang game strategies indicate that effective moves tend to cluster around existing pieces in their spatial distribution. Empirical analysis reveals that when generating suboptimal candidate moves, the spatial distribution pattern of an unoptimized initial Gobang game model deviates significantly from the strategic patterns of professional players. Specifically, after prioritizing moves, the spatial distribution of the remaining candidate positions tends to deviate from the reasonable gaming region, exhibiting anomalous distribution characteristics. This deviation directly increases the detectability risk of covert communication behaviors. To address this issue, this study proposes a Gobang game model that incorporates an attraction matrix to optimize the spatial distribution characteristics of candidate moves.
[0131] The process of generating steganographic chess records is mainly divided into two steps: first, a basic Gobang game network is established to preliminarily construct the candidate move set of Gobang; second, an attraction matrix is introduced to further optimize the selection of candidate moves to enhance the rationality of spatial distribution. Specifically, the model generates steganographic chess records by combining the attraction matrix. The detailed process is as follows: Figure 2 shown.
[0132] To achieve covert communication, this paper constructs a Gomoku-based game network based on reinforcement learning. By simulating Gomoku games, the network generates a move strategy that conforms to the rules of the game. The board is represented by a 13x13 two-dimensional matrix, with each position classified as empty, black, or white. The network architecture, based on a convolutional neural network (CNN), comprises multiple convolutional layers, batch normalization layers, and ReLU activation functions. These layers extract local features of the board and map them to move probability distributions through fully connected layers. To improve model performance, residual connections are introduced to enhance generalization and mitigate the vanishing gradient problem. The training process utilizes a self-play reinforcement learning approach, combined with policy gradients and the Monte Carlo Tree Search (MCTS) algorithm. The move strategy is optimized by simulating multiple games. The value network and policy network are used to collaboratively predict the probability of winning or losing a game.
[0133] At each move, the underlying game network generates a set of candidate positions and assigns each a corresponding predicted win rate as a potential option for covert communication. However, these candidate moves exhibit certain limitations in their spatial distribution. While preferred moves are generally highly plausible, when these are eliminated, suboptimal moves often exhibit unreasonably random or overly dispersed behavior, deviating from the clustered nature of moves typically observed by professional players. This spatial distribution anomaly not only increases the risk of covert communication being detected but also makes move strategies more easily identified or deciphered, posing a potential threat to system security.
[0134] To overcome the above problems, this paper introduces an attraction matrix to optimize the spatial distribution characteristics of candidate actions. The process of applying the attraction matrix to optimize the candidate action set is as follows: Figure 3 First, create a binary matrix T with the same dimensions as the chessboard to describe the current state of the chess game:
[0135]
[0136] Secondly, the attenuation law of spatial attraction is introduced , to assign different influence weights to different influence areas of the same chess piece:
[0137]
[0138] in, represents the weight assigned according to the distance d from the location to the reference point. Specifically, 、 and is a positive number corresponding to different regions: when When it indicates the direct area, when When it indicates a secondary region, When , it indicates the outer area. The location is beyond the scope of influence. .
[0139] Then, for each blank position , calculate its total attraction value , which is the value of all the positions that have been placed The weighted sum of their impacts yields:
[0140]
[0141] in, is a checkerboard binary matrix, marking the occupied positions; The Manhattan distance calculation formula is: ; W ( d) is the distance decay weight function, which assigns weights according to Manhattan distance.
[0142] For the candidate action set output by the reinforcement learning model, a two-stage optimization process is implemented. First, a spatial rationality screening is performed to exclude full (occupied position) candidate actions. Then the attractiveness weighted adjustment is performed on the candidate actions that pass the screening:
[0143]
[0144] Where, It is a parameter to adjust the balance between the original winning rate and the spatial attractiveness. is the original winning rate, is the adjusted win rate.
[0145] Through the above optimization, the attraction matrix effectively improves the rationality of the spatial distribution of candidate actions, making the move strategy more in line with the model of professional chess players. It not only enhances the security of covert communication, but also maintains the logical consistency of the game process.
[0146] 2. Information hiding module:
[0147] This method achieves information hiding by dynamically encoding the game position. Its core process includes four stages: information preprocessing, action space generation, encoding mapping, and iterative embedding. Each stage uses reinforcement learning strategies to maintain the naturalness and efficiency of the game. The hidden information in the overall environment is set to , its binary form is , and the entire information hiding is in a sequential process middle.
[0148] Information preprocessing:
[0149] First, the original binary stream Perform security encapsulation. Introduce control character set To achieve protocol identification and error isolation, the coding rules are as follows:
[0150]
[0151]
[0152]
[0153] The encapsulation process uses cascade operations || to construct the final transmission sequence:
[0154]
[0155] The transfer function Replace the control character sequence in the original data to prevent protocol conflicts.
[0156] Action space generation:
[0157] In every game state Next, based on the deep reinforcement learning policy network Generate candidate action sets:
[0158]
[0159] in, represents the i-th candidate action; For action The selection probability of Calculated;
[0160] By setting policy coverage thresholds Filter low-quality actions:
[0161]
[0162] This mechanism ensures that the candidate action set At the same time, it meets the following requirements: high winning probability ensures the rationality of the game and sufficient action diversity supports information encoding.
[0163] Encoding mapping:
[0164] Define position encoding function , according to the position of the drop Differentiated encoding is performed for the type, and the specific rules are as follows:
[0165] a. Middle area coding: Divide the middle area of the chessboard into 8 azimuth areas, namely top, upper left, left, lower left, bottom, lower right, right, and top right, and define the area coding function
[0166] in Indicates the target location Relative to the current piece If the target position and the current piece Satisfaction on the chessboard , it can be encoded using 4-bit binary To express.
[0167] b. Boundary area encoding: for non-vertex positions at the edge of the chessboard ,definition With axial encoding rules:
[0168]
[0169] c. Vertex area coding: for the four corner vertices , along the original edge direction (such as vertex The right and top of the edge are encoded as 0, and other non-edge directions are encoded as 1, that is:
[0170]
[0171] Iterative embedding:
[0172] Initial stage, setting ,The dynamic mapping of information flow to action coding is achieved through the prefix matching algorithm. ,The iterative process is described as follows:
[0173]
[0174]
[0175] in, represents the optimal action selected at time step t, i.e., the chessboard position; Indicates a binary prefix matching relationship, This process continues until Or the board runs out of space.
[0176] 3. Information extraction module:
[0177] To address the shortcomings of traditional chess record digitization methods in adapting to complex lighting conditions and diverse chessboard materials, this paper proposes a hybrid solution that combines color space analysis and deep learning. The technical process consists of three stages. First, a chessboard positioning mechanism is constructed through HSV color model conversion. The feature thresholds (H: 16-22, S: 50-255, V: 128-255) are determined based on experimental optimization. This parameter combination effectively suppresses the reflective effect of wooden chessboards and the color cast interference of plastic chessboards. Second, an improved Hough circle detection algorithm is used to set a dynamic radius detection range (20-35 pixels) at a resolution of 800 dpi. Morphological closing operation preprocessing is combined to eliminate chessboard grid line noise, thereby achieving accurate segmentation and positioning of chess pieces. Finally, a chess image recognition network with multi-scale feature fusion capabilities is designed. Its architecture uses progressive resolution compression (32×32 → 16×16 → 4×4) and a composite regularization strategy (combining dropout, batch normalization, and weight decay) to effectively overcome the impact of shooting perspective distortion on character recognition while improving the model's regularization performance.
[0178] Extract information from the chess record sent by the sender to obtain information about each chess piece . Since the game is played by two parties, and one party does not include the information hiding task while the other party includes the corresponding task, and combined with the Gobang rules, the odd index is selected as the black party and the even index is selected as the white party. For the move numbered i, the move numbered i-1 is selected and its position together constitutes the relative position. According to the agreed steganographic rules, it is selected whether the black party or the white party performs steganography. The corresponding binary coded information is extracted through the previous information hiding rules, and it is continuously iterated to form a total binary information string. The terminator is found, it is truncated, and all the secret information is extracted. The process of extracting steganographic chess records is as follows: Figure 4 The specific operation process is as follows:
[0179] A. Establish a parsing engine based on the chessboard coordinate system:
[0180] The structured conversion of chess record information is the foundation of constructing instrument sequence analysis. This system combines Hough circle detection and digital recognition network to complete the extraction of all elements of chess game status. The digital recognition network structure is as follows: Figure 5 As shown. Get the position of the chess piece and the serial number on the corresponding chess piece
[0181] Specifically, after obtaining the structured information of the chess record, it needs to be processed to achieve accurate conversion from the image pixel space to the logical chessboard space. The numerical value can automatically determine the type of chess player (The cardinal number is black, the even number is white), at the same time, the chess piece position is mapped by the coordinate mapping algorithm Convert to row and column positions in the chessboard coordinate system Through this process, the original chess record data is systematically converted into a structured chess piece sequence. , where each three-dimensional tuple accurately represents the spatial position, time sequence number and player information of a single move.
[0182] B. Determine the secret information based on the relationship between the encrypted information and the relative position:
[0183] According to the above information encoding rules, if you want to get the corresponding secret information, you only need to use the corresponding encryption rules and differential geometry information It can be concluded that first determine whether the current move belongs to the middle area code , boundary area coding Vertex Region Encoding , and then use different conversion rules in different classes Convert to get the corresponding binary code .
[0184]
[0185] C. Confidential information integration and processing:
[0186] First, the encoding information obtained from all relative positions on the chessboard is superimposed and integrated:
[0187]
[0188] Get the concatenated binary sequence . Then, the complete binary code received Remove the leading and trailing control characters (i.e. and ), and the decoded binary secret information is obtained by reversing the function:
[0189]
[0190] Finally, the original secret information is converted by the inverse encoding function \( g^{-1} \) :
[0191]
[0192] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
[0193] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0194] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0195] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely illustrative and are not intended to limit the scope of the present application. Various changes and modifications may be made therein by those skilled in the art without departing from the scope and spirit of the present application. All such changes and modifications are intended to be included within the scope of the present application as required by the appended claims.
[0196] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various application aspects, in the description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this approach of the present application should not be interpreted as reflecting the intention that the claimed application requires more features than those explicitly recited in each claim. More precisely, as reflected in the corresponding claims, the point of the application is that the corresponding technical problem can be solved with fewer features than all the features of a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present application.
[0197] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of this application and to form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
[0198] It should be noted that the above embodiments are illustrative rather than limiting of the present application, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The use of the words first, second, and third, etc., does not denote any order. These words may be interpreted as designations.
Claims
1. A method for generating stego information, characterized in that: Applied to the sender, the generation method includes: Encoding the secret information to be hidden into a binary bit stream, and adding protocol control characters at the beginning and end to form a transmission data unit; Generating a set of candidate move positions through a Go game model driven by reinforcement learning. The Go game model extracts the board state features based on a convolutional neural network and calculates the winning probability distribution of each position using the Monte Carlo tree search algorithm; Constructing an attraction matrix with the same dimension as the board, calculating the weighted spatial influence of the occupied positions on the blank areas according to the Manhattan distance, and optimizing the spatial distribution of the candidate action set; Dynamically encoding the optimized candidate move positions into binary segments according to the region type. Among them, the middle region of the board is encoded with 4 bits of azimuth angle, the boundary region is encoded with 2 bits of axis, and the four corner vertices are encoded with 1 bit of direction; Mapping the binary sequence of the transmission data unit to the encoded move positions through an iterative matching algorithm, and selecting the position with the longest prefix match to perform the actual move, generating a Go game score sheet carrying hidden information; Among them, the construction method of the attraction matrix includes: Establishing a binary state matrix T corresponding to a 13×13 board, where the occupied positions are marked as 1 and the blank positions are marked as 0; Defining a spatial attraction attenuation function W(d), where the weight is w1 when the Manhattan distance d = 1, the weight is w2 when 1 < d ≤ 3, and the weight is 0 when d > 3; For each blank position (x, y), calculate its total attraction value A x,y , which is obtained by the weighted sum of the influence of all the positions (i, j) on it: Among them, T i,j is a chessboard binary matrix, marking the occupied position; D M ((x,y),(i,j)) is the Manhattan distance calculation formula, D M ((x,y),(i,j))=|ix|+|jy|; The optimization process of the candidate action set includes: Perform space rationality screening and exclude those that meet A x,y =∞ candidate actions; Performing attraction weighting adjustment on the candidate actions passed through screening: p′ k =p k ·exp(λA x,y ) Where λ is the adjustment parameter used to control the balance between the original winning rate and the spatial attractiveness, p k is the original winning rate, p′ k is the adjusted win rate.
2. The method for generating stego information according to claim 1, wherein: The dynamic encoding rule specifically includes: The middle region positions are divided into 8 azimuths, and each azimuth region is encoded with 4-bit binary; The non-vertex positions on the boundary are encoded with 2 bits according to the orthogonal axis relationship; The four corner vertex positions are encoded with 1 bit along the board edge direction.
3. A stego information generating device, characterized in that: The steganographic information generation device includes: An information preprocessing module for converting the secret information into a binary transmission sequence with control characters; A game decision module, including a convolutional neural network and a Monte Carlo tree search algorithm, for generating candidate move positions that conform to the Go game rules; A spatial optimization module for reasonably adjusting the spatial distribution of candidate actions through calculation of the attraction matrix; An encoding mapping module for performing region-differentiated conversion from board positions to binary encoding; An iterative embedding module for dynamically mapping the secret information to the move positions through a prefix matching algorithm; Among them, the construction method of the attraction matrix includes: Establishing a binary state matrix T corresponding to a 13×13 board, where the occupied positions are marked as 1 and the blank positions are marked as 0; Defining a spatial attraction attenuation function W(d), where the weight is w1 when the Manhattan distance d = 1, the weight is w2 when 1 < d ≤ 3, and the weight is 0 when d > 3; For each blank position (x, y), calculate its total attraction value A x,y , which is obtained by the weighted sum of the influence of all the positions (i, j) on it: Among them, T i,j is a chessboard binary matrix, marking the occupied position; D M ((x,y),(i,j)) is the Manhattan distance calculation formula, D M ((x,y),(i,j))=|ix|+|jy|; The reasonable adjustment of the spatial distribution of the candidate actions includes: Perform space rationality screening and exclude those that meet A x,y =∞ candidate actions; Performing attraction weighting adjustment on the candidate actions passed through screening: p′ k =p k ·exp(λA x,y ) Where λ is the adjustment parameter used to control the balance between the original winning rate and the spatial attractiveness, p k is the original winning rate, p′ k is the adjusted win rate.
4. An electronic device, characterized in that: Including: A processor, a memory, and a program stored on the memory and executable on the processor. When the program is executed by the processor, it implements the steganographic information generation method according to any one of claims 1 to 2.
5. A readable storage medium, characterized in that: The readable storage medium stores a program, and when the program is executed by a processor, the method for generating stego information according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Constructive steganography method and system based on spatial relative position of continuous game behavior
CN116962591A
Generative steganography method and system based on chess manual structure
CN117745507A
Cited By
Neural-symbolic-based gomoku game method
CN122768669A