Information processing method and electronic equipment
By constructing dual-domain feature vectors and location embedding vectors, combined with attention masks and three-layer decoders, the problem of recognition failure of damaged coded tags was solved, the coded information was accurately recovered, and the efficiency of goods circulation and supply chain stability were improved.
Patent Information
- Application Number
- CN202511415276.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-02-10
AI Technical Summary
Existing coded labels are prone to identification failure due to physical damage such as dirt, wrinkles, and scratches, which affects the receipt and delivery of goods and the stability of the supply chain.
By constructing a dual-domain feature vector of incomplete encoded information, combining position embedding vectors and attention masks, an information processing model is used to identify and recover encoded information, including the splicing of physical signal features and logical verification features, and a three-layer decoder is used to complete and reconstruct encoded information.
It improves the ability to identify and recover damaged tags, accurately recovers the complete coding information of the target object, and enhances business flow efficiency and supply chain stability.
Smart Images

Figure CN121503513A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to an information processing method and an electronic device. Background Technology
[0002] Nowadays, information about many items is commonly encoded using QR codes or barcodes, such as commodity codes in the logistics and transportation sector and drug codes in the medical field. However, these codes are easily damaged by physical damage such as dirt, wrinkles, and scratches, which can lead to recognition failures. In particular, structural defects in key areas of the codes (such as partial obstruction, torn labels, or blurred areas) can directly cause problems such as delays in receiving and shipping goods, customs clearance disruptions, and chaotic inventory management, seriously affecting business efficiency and the stability of the supply chain. Summary of the Invention
[0003] This disclosure provides an information processing method and an electronic device to at least solve the above-mentioned technical problems existing in the prior art.
[0004] According to a first aspect of this disclosure, an information processing method is provided, comprising: receiving incomplete encoded information obtained based on a damaged label of a target object; wherein some features of the damaged label are missing; constructing a dual-domain feature vector of the incomplete encoded information based on physical signal features and logical verification features of the incomplete encoded information; determining an enhanced feature vector of the incomplete encoded information based on a position embedding vector corresponding to a target position in the incomplete encoded information and the dual-domain feature vector; wherein the enhanced feature vector characterizes feature information of the damaged label in at least one dimension; constructing an attention mask based on a verification matrix and construction rules; and identifying the enhanced feature vector based on the attention mask and an information processing model to obtain complete encoded information corresponding to the target object.
[0005] In one embodiment, constructing a dual-domain feature vector of the incomplete coding information based on the physical signal features and logical check features of the incomplete coding information includes: determining the physical signal features of the incomplete coding information based on the absolute value of the incomplete coding information; determining the logical check features of the incomplete coding information based on the binarized incomplete coding information and the check matrix; and concatenating the physical signal features and the logical check features to obtain the dual-domain feature vector.
[0006] In one possible implementation, determining the enhanced feature vector of the incomplete coding information based on the position embedding vector corresponding to the target position in the incomplete coding information and the dual-domain feature vector includes: generating the position embedding vector corresponding to the target position based on the position coding function; the target position is the position of the structural anchor point embedded in the incomplete coding information; and concatenating the position embedding vector and the dual-domain feature vector to obtain the enhanced feature vector.
[0007] In one possible implementation, the construction rule includes at least one of the following: if the row or column information of an element in the attention mask belongs to the target position, then the value of the element is determined to be 0; if the row information of an element in the attention mask is equal to the column information, then the value of the element is determined to be 0; if both the row and column information of an element in the attention mask belong to the information bit of the same check equation in the check matrix, then the value of the element is determined to be 0; if one of the row or column information of an element in the attention mask belongs to the information bit of the target check equation in the check matrix, and the other is the check bit corresponding to the information bit in the target check equation, and the value corresponding to the row information in the target check equation is 1, then the value of the element is determined to be 0.
[0008] In one possible implementation, the construction rule further includes: in response to the fact that the value of an element in the attention mask is not 0, determining that the value of the element is negative infinity.
[0009] In one possible implementation, the step of identifying the enhanced feature vector based on the attention mask and information processing model to obtain the complete encoded information corresponding to the target object includes: a three-layer decoder based on the information processing model to identify the enhanced feature vector and obtain the complete encoded information corresponding to the target object; wherein, the first layer decoder of the three-layer decoder adopts a normalized residual multi-head attention mechanism based on the attention mask; the second layer decoder adopts a normalization and feedforward feature mapping mechanism; and the third layer decoder adopts a normalization and output mapping mechanism.
[0010] In one embodiment, the first layer decoder uses a normalized residual multi-head attention mechanism based on the attention mask to process the enhanced feature vector as follows: normalize the enhanced feature vector to obtain normalized features; determine the weighted features of the enhanced feature vector based on the normalized features, the attention mask, and the weight matrix; concatenate the weighted features and the enhanced feature vector, and output the concatenated residual fusion result to the second layer decoder.
[0011] In one embodiment, the information processing model is trained using the following method: a dual loss function is constructed based on cross-entropy loss and structural verification consistency loss; the network parameters of the information processing model are iteratively updated based on the dual loss function.
[0012] In one possible implementation, constructing a dual loss function based on cross-entropy loss and structural verification consistency loss includes: determining the cross-entropy loss based on the prediction results and true labels output by the information processing model; determining the adjoint checksum based on the prediction results and the verification matrix output by the information processing model; determining the structural verification consistency loss based on the sum of squares of the adjoint checksum; and weighting the cross-entropy loss and the structural verification consistency loss to obtain the dual loss function.
[0013] According to a third aspect of this disclosure, an electronic device is provided, comprising:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described in this disclosure.
[0017] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described in this disclosure.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0019] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which:
[0020] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0021] Figure 1 A flowchart illustrating an information processing method according to an embodiment of this disclosure is shown. Figure 1 ;
[0022] Figure 2A flowchart illustrating an information processing method according to an embodiment of this disclosure is shown. Figure 2 ;
[0023] Figure 3 A schematic diagram of the network framework of the information processing model according to an embodiment of this disclosure is shown;
[0024] Figure 4 A schematic diagram of the attention mechanism framework of the information processing model according to an embodiment of the present disclosure is shown;
[0025] Figure 5 The diagram illustrates the recovery performance of embodiments of this disclosure at different damage rates.
[0026] Figure 6 A schematic diagram comparing the recovery accuracy of embodiments of this disclosure with related technologies is shown;
[0027] Figure 7 A schematic diagram of the composition structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0028] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0029] Figure 1 A flowchart illustrating an information processing method according to an embodiment of this disclosure is shown. Figure 1 ,like Figure 1 As shown, an information processing method includes:
[0030] Step S101: Receive incomplete coding information obtained based on the damaged label of the target object.
[0031] In this embodiment, the incomplete coding information obtained based on the damaged label of the target object is first received. A damaged label is characterized by missing features; that is, the label of the target object is physically damaged (such as tearing, soiling, scratching, etc.), resulting in some parts being unreadable or missing. The coding information obtained based on the damaged label is the incomplete coding information. For example, a QR code label on an item may be partially torn during transportation, causing some areas of the QR code label to be unrecognizable by the scanning device, thus only the incomplete coding information corresponding to that QR code label is obtained.
[0032] Step S102: Based on the physical signal features and logical verification features of the incomplete coding information, construct a dual-domain feature vector of the incomplete coding information.
[0033] In this embodiment, a dual-domain feature vector needs to be constructed based on the physical signal characteristics and logical verification characteristics of the incomplete coding information. The physical signal characteristics refer to the detectable signal strength or amplitude in the incomplete coding information, reflecting its physical state; the logical verification characteristics reflect whether the coding information meets specific coding rules. Combining the physical signal characteristics and the logical verification characteristics allows for the construction of a dual-domain feature vector.
[0034] Step S103: Based on the position embedding vector and dual-domain feature vector corresponding to the target position in the incomplete coding information, determine the enhanced feature vector of the incomplete coding information.
[0035] In this embodiment, it is also necessary to determine the enhanced feature vector based on the position embedding vector and the dual-domain feature vector corresponding to the target position in the incomplete encoding information. When generating the label of the target object, structural anchors (such as specific markers or reference points) are inserted at the target position in the label. After obtaining the incomplete encoding information, the position embedding vector corresponding to the target position can be combined with the dual-domain feature vector to obtain the enhanced feature vector. The enhanced feature vector not only contains the physical and logical features of the encoded information, but also contains positional information, thereby characterizing the feature information of the damaged label in at least one dimension.
[0036] Step S104: Construct an attention mask based on the verification matrix and construction rules.
[0037] In this embodiment, an attention mask also needs to be constructed based on the parity-check matrix and the construction rules. The parity-check matrix is a matrix used in linear codes to define the encoding rules; it specifies the parity relationship between each bit in the encoded information. The construction rules, defined based on the parity-check matrix, are used to determine the values of each element in the attention mask. The attention mask is a matrix used to guide the operation of the attention mechanism in the information processing model. The attention mask determines which interactions between information bits are allowed during the processing of the information processing model. The parity-check matrix can be a low-density parity-check (LDPC) parity-check matrix H, meaning the label of the target object is generated based on LDPC encoding.
[0038] Step S105: Based on attention masking and information processing model, the enhanced feature vector is identified to obtain the complete encoded information corresponding to the target object.
[0039] In this embodiment, it is also necessary to identify the enhanced feature vector based on attention masks and an information processing model to obtain the complete encoded information corresponding to the target object. The information processing model is a neural network model that uses attention masks to guide the model to focus on key parts of the enhanced feature vector and to complete and reconstruct the information. Thus, the information processing model can identify the complete encoded information of the damaged label.
[0040] Current related technologies mainly employ traditional fault-tolerant coding mechanisms and image enhancement-based deep learning methods for the identification and recovery of damaged coded labels. However, traditional fault-tolerant coding mechanisms are only effective for random errors and have limited ability to recover structural defects such as occlusion and blurring; image enhancement-based deep learning methods have low accuracy. To address the problems in the aforementioned related technologies, this disclosure constructs dual-domain feature vectors and enhanced feature vectors, and utilizes attention masks and information processing models to effectively process incomplete coded information in damaged labels. The processing considers not only the physical characteristics of the coded information but also its logical verification characteristics, thereby improving the ability to identify and recover damaged labels. Therefore, even when some coded information is missing, the complete coded information of the target object can be accurately recovered.
[0041] In another embodiment, step S102, "constructing a dual-domain feature vector of the incomplete coding information based on the physical signal features and logical verification features of the incomplete coding information," includes:
[0042] Based on the absolute value of the incomplete coding information, determine the physical signal characteristics of the incomplete coding information;
[0043] Based on the binary incomplete coding information and the check matrix, the logical check features of the incomplete coding information are determined.
[0044] The physical signal features and logic verification features are concatenated to obtain a dual-domain feature vector.
[0045] In this embodiment, the absolute value of the incomplete coding information can be used as the physical signal feature of the incomplete coding information. For example, if the incomplete coding information is y∈R n The absolute value of the incomplete encoded information |y|∈R n This can serve as the physical signal feature of the incomplete encoded information. Here, R represents the set of real numbers, and n represents the dimension of the vector y.
[0046] In this embodiment, logical verification features can be determined based on the binary incomplete coding information and the check matrix. First, the incomplete coding information needs to be converted into binary form, and then the binary incomplete coding information is multiplied by the check matrix to obtain the logical verification features.
[0047] In one possible implementation, the incomplete encoded information can be converted into a binary form using the following formula:
[0048] y b =0.5(1+sign(y))
[0049] Among them, y b The binary incomplete coding information is represented by sign(y), which is the sign function. Here, y does not contain the coding information corresponding to the target position.
[0050] In another possible implementation, the logic verification feature can be calculated using the following formula:
[0051] s(y)=H×y b ∈{0,1} n-k
[0052] Where s(y) is the logical check feature, H is the check matrix, and y b The binary incomplete encoding information is represented by n, where n is the length of the encoding information before the tag was damaged, and k is the length of the information bits of the encoding information before the tag was damaged.
[0053] In this embodiment, the physical signal features and logic verification features also need to be concatenated to construct a dual-domain feature vector. In one example, the dual-domain feature vector h(y) = [|y|, 1-2×s(y)] ∈ R 2n-k Subsequently, using the trainable parameter matrix W, the bi-domain feature vector h(y) is mapped to the d-dimensional embedding space using bitwise Hadamard multiplication (⊙): φ=h(y)⊙W,W∈R (2n-k)×d This mapping enables the decoder to simultaneously perceive signal strength and coding structure, improving its ability to identify and recover missing information.
[0054] In this disclosure, by constructing a dual-domain feature vector, the physical signal features and logical check features of the incomplete encoded information are effectively integrated. This method not only considers the physical representation of the encoded information but also whether it meets specific encoding rules, thus providing a comprehensive feature representation for subsequent determination of enhanced feature vectors and recovery of encoded information.
[0055] In another embodiment, step S103, "determining the enhanced feature vector of the incomplete coding information based on the position embedding vector and the dual-domain feature vector corresponding to the target position in the incomplete coding information," includes:
[0056] A position embedding vector corresponding to the target position is generated based on the position encoding function; the target position is the position of the structural anchor point embedded in the incomplete encoded information.
[0057] The enhanced feature vector is obtained by concatenating the position embedding vector with the dual-domain feature vector.
[0058] In this embodiment, a position embedding vector corresponding to the target position is first generated based on the position encoding function. In the incomplete encoded information, the structural anchor point is a pre-defined key position that acts as a reference point in the encoded information. The position encoding function generates a position embedding vector based on the target position of the structural anchor point. The position embedding vector carries the position information of the structural anchor point, thus providing the information processing model with additional information about the structure of the encoded information. In one example, for the target position P∈{1,…,n} of the pre-defined structural anchor point in the incomplete encoded information, the position embedding vector can be generated using the position encoding function PosEmbed, that is, the position embedding vector MarkerEmbed(P)=PosEmbed(P)∈R n×d′ d ′ The dimension of the embedding vector is determined for the location of each structural anchor point.
[0059] In this embodiment, the location embedding vector also needs to be concatenated with the previously constructed dual-domain feature vector to generate an enhanced feature vector. In one example, the location embedding vector MarkerEmbed(P) can be mapped to R first. (2n-k)×d The vector MarkerFeature is then concatenated with the dual-domain feature vector to obtain the enhanced feature vector Input = Concat(φ, MarkerFeature) ∈ R. (2n -k)×(d+d ′ ), where Concat is the concatenation function.
[0060] In this disclosure, an enhanced feature vector is generated by combining the position embedding vector with the dual-domain feature vector. This not only utilizes the physical and logical features of the encoded information, but also enhances the information processing model's understanding of the encoded information structure by introducing the position information of the structural anchor points. The generated enhanced feature vector provides richer and more accurate data for subsequent identification and recovery work, thereby improving the accuracy and robustness of damaged label identification.
[0061] In another embodiment, the “construction rules” in step S104 include at least one of the following:
[0062] If the row or column information of an element in the attention mask belongs to the target location, then the value of the element is determined to be 0.
[0063] If the row information of an element in the attention mask is equal to the column information, then the value of the element is determined to be 0.
[0064] If the row and column information of an element in the attention mask both belong to the information bits of the same check equation in the check matrix, then the value of the element is determined to be 0.
[0065] If one of the row or column information of an element in the attention mask belongs to the information bit of the target check equation in the check matrix, and the other is the check bit corresponding to the information bit in the target check equation, and the value corresponding to the row information in the target check equation is 1, then the value of the element is determined to be 0.
[0066] In this embodiment, if the row or column information of an element in the attention mask corresponds to the target location (i.e., the location of the structural anchor), the value of that element is set to 0. This allows information exchange between these locations, as structural anchors are key reference points in the encoded information, and their information exchange is crucial for recovering the complete encoded information of the damaged label.
[0067] In one example, if the i-th or j-th bit in the attention mask is the embedding position of the structural anchor (i.e., i∈P or j∈P), it means that the structural anchor bit can interact with any position, therefore g(H) {i,j} = 0. Where i represents the row information of the attention mask, j represents the column information of the attention mask, and g(H) represents the attention mask.
[0068] In this embodiment, if the row information i and column information j of an element in the attention mask are the same, that is, the element is located on the diagonal of the attention mask, then the value of that element is also set to 0. This self-connection allows each position to interact with itself, which helps the information processing model maintain positional consistency when processing information.
[0069] In this embodiment, if the row and column information of an element in the attention mask both belong to the information bits of the same parity check equation in the parity check matrix, then the value of that element is set to 0. This is because there is a logical relationship between the information bits in the same parity check equation, and allowing information interaction between them helps the information processing model understand the parity check relationship of the encoded information. In one example, if the t-th row of the parity check matrix H has i≤n, j≤n, and H[t,i]=H[t,j]=1 (i.e., information bits of the same parity check equation), then g(H) {i,j} =0, where n represents the length of the encoded information before the tag was damaged, and t represents the row information of the check matrix H.
[0070] In this embodiment, if one of the row or column information of an element in the attention mask belongs to the information bit of a specific check equation in the check matrix, and the other belongs to the check bit of the corresponding information bit in the check equation, and the value of the row information in the check equation is 1, then the value of that element is set to 0. This rule helps the model consider the check relationship between the information bit and the check bit when processing information. In one example, if the t-th row of the check matrix H contains a value such that (i≤n and j=n+t) or (j≤n and i=n+t) and H[t,i]=1, then g(H) is set to 0. {i,j} =0.
[0071] In another embodiment, the "construction rules" in step S104 further include:
[0072] In response to the fact that the value of an element in the attention mask is not 0, the value of the element is determined to be negative infinity.
[0073] In this embodiment, if the value of an element in the attention mask is not 0, that is, the element does not satisfy all the preceding conditions, the value of the element is determined to be negative infinity (-∞), thereby blocking those not allowed information interactions and ensuring that the attention mechanism only focuses on those information bits that are truly important for recovering the complete encoded information of the damaged label.
[0074] To facilitate understanding of the construction rules in this disclosure, the construction rules are explained below based on a specific embodiment:
[0075] 1. Definition of key parameters:
[0076] 1) g(H): represents the attention mask, with dimensions of (2n-k)×(2n-k), where n represents the length of the encoded information before the label is damaged (including information bits + check bits), k is the length of the information bits, and (2n-k) is the dimension of the physical signal features (n-dimensional) + logical check features (nk-dimensional).
[0077] 2) H: The parity check matrix of the LDPC code, with dimensions (nk)×n. The element H[t,i]=1 indicates that the t-th parity check equation in the parity check matrix contains the i-th bit information, and H[t,i]=0 indicates that it does not contain the i-th bit information.
[0078] 3) P: The set of positions of the Marker (structural anchor point), for example, P = {2, 7} means that the 2nd and 7th positions are Marker positions.
[0079] 4) g(H) {i,j} : The element in the i-th row and j-th column of the attention mask, where 0 means that the i-th and j-th bits are allowed to interact, and -∞ means that the i-th and j-th bits are blocked from interacting.
[0080] 2. The parameter values are as follows:
[0081] 1) n = 4 (including k = 2 information bits and nk = 2 check bits), the dimension of the dual-domain feature vector is (2n-k = 2×4-2 = 6), that is, the mask matrix g(H) is 6×6.
[0082] 2) LDPC parity check matrix (The first line is check equation 1, containing the 1st, 2nd, and 3rd bits; the second line is check equation 2, containing the 1st and 4th bits).
[0083] 3) The position of the marker P = {3, 6}, that is, the 3rd and 6th positions are structural anchor points.
[0084] 3. Construct a rule-aware attention mask g(H)
[0085] Based on the four types of allowed interaction rules, g(H) is determined one by one. {i,j} The values of (i,j range from 1 to 6). The determination rules are shown in Table 1 below:
[0086] Table 1
[0087]
[0088]
[0089] The final 6×6 mask matrix g(H) is shown below (only key positions are shown, "-∞" is simplified to "×").
[0090]
[0091] In this disclosure, the construction rules ensure that the attention mechanism correctly focuses on and utilizes the structural relationships in the encoded information when processing enhanced feature vectors. By allowing information interaction between specific locations, the information processing model can better understand and recover the complete encoded information of the damaged label. Furthermore, the construction rules constrain the scope of information interaction in multi-head attention, allowing only the information bits and marker bits involved in the verification equation to interact. This significantly reduces ineffective attention computation and diffusion, lowers the model's computational load, and thus addresses the problems of high model complexity, high computational requirements, and difficulty in applying image enhancement deep learning methods to edge devices in related technologies.
[0092] In another embodiment, step S105, "based on attention masking and information processing models, identifying the enhanced feature vectors to obtain the complete encoded information corresponding to the target object," includes:
[0093] A three-layer decoder based on an information processing model identifies the enhanced feature vectors and obtains the complete encoded information corresponding to the target object.
[0094] The first layer of the three-layer decoder adopts a normalized residual multi-head attention mechanism based on attention mask; the second layer adopts a normalization and feedforward feature mapping mechanism; and the third layer adopts a normalization and output mapping mechanism.
[0095] In this embodiment, the information processing model includes a three-layer decoder specifically designed to process enhanced feature vectors and recover the complete encoded information of the target object. Each of the three layers of the decoder has its specific function and role, working together to achieve accurate recovery of the encoded information.
[0096] In one example, the structure and function of the three-layer decoder are as follows:
[0097] The first decoder layer employs a normalized residual multi-head attention mechanism based on attention masks. The main purpose of this layer is to use attention masks to guide the model to focus on key parts of the enhanced feature vector, and to complete and reconstruct the information. This normalized residual multi-head attention mechanism helps the information processing model maintain stability while processing information and can capture the complex relationships between different parts of the feature vector.
[0098] The second-layer decoder employs normalization and feedforward feature mapping. In this layer, the information processing model performs further nonlinear transformations and feature mappings on the feature vectors processed by the first-layer decoder. Normalization helps maintain the model's stability, while feedforward feature mapping helps the model learn more abstract and high-level feature representations.
[0099] The third decoder layer employs a normalization and output mapping mechanism. In this layer, the information processing model maps the feature vectors processed by the second decoder layer to the output space, generating the final prediction result. Normalization helps maintain the stability of the model, while output mapping ensures the accuracy and reliability of the prediction result.
[0100] In this disclosure, the design of the three-layer decoder structure enables the information processing model to gradually extract richer and more accurate information from the enhanced feature vector, thereby improving the accuracy and robustness of the coded information recovery.
[0101] In another embodiment, the first-layer decoder employs a normalized residual multi-head attention mechanism based on attention masks to process the enhanced feature vector as follows:
[0102] The enhanced feature vector is normalized to obtain normalized features;
[0103] Based on normalized features, attention mask, and weight matrix, the weighted features of the enhanced feature vector are determined;
[0104] The weighted features and enhanced feature vectors are concatenated, and the concatenated residual fusion result is output to the second layer decoder.
[0105] In this embodiment, the enhanced feature vector is first normalized in the first layer decoder. In one example, the enhanced feature vector can be normalized based on the following formula:
[0106] X = Norm(Input)
[0107] Where Input is the enhanced feature vector, Norm represents the normalization process, and X represents the normalized feature.
[0108] In this embodiment, normalized features, attention masks, and weight matrices are also needed to determine the weighted features of the enhanced feature vector. Specifically, the product of the normalized features and the weight matrix is first calculated to obtain the initial attention output. Then, an attention mask is applied to this output to filter out disallowed information interactions, thereby obtaining the weighted features. The weighted features reflect the importance of each part of the enhanced feature vector.
[0109] In one example, the weighted features of the enhanced feature vector can be calculated based on the following formula:
[0110]
[0111] Where Z represents the weighted feature, X represents the normalized feature, and W... Q W K and W V Let T denote the weight matrix, and T denote the matrix transpose.
[0112] In this embodiment, the weighted features are concatenated with the original enhanced feature vector to form a residual fusion result, i.e., the residual fusion result X1 = Z + Input. The concatenated residual fusion result will be passed as input to the second-layer decoder for further processing.
[0113] In this disclosure, a normalized residual multi-head attention mechanism based on attention masking provides high-quality input for subsequent decoder layers, thereby laying the foundation for improving the performance of the entire information processing model.
[0114] In another embodiment, the second-layer decoder (employing a normalization and feedforward feature mapping mechanism) can process its own input X1 based on the following steps:
[0115] 1) Perform a normalization:
[0116] 2) Perform nonlinear mapping (feedforward layer): σ is the ReLU function. Here, W1 is the weight matrix of the first fully connected layer of the feedforward layer, W2 is the weight matrix of the second fully connected layer of the feedforward layer, a1 is the bias vector of the first fully connected layer of the feedforward layer, and a2 is the bias vector of the second fully connected layer of the feedforward layer.
[0117] 3) Residual fusion output: X3 = X2 + X1.
[0118] In another embodiment, the third-layer decoder (using a normalization and output mapping mechanism) can process its own input X3 based on the following steps:
[0119] 1) Re-normalization:
[0120] 2) Dimensionality reduction mapping: The first layer reduces the dimension to 1: The second layer maps back from the codeword extension space to the original codeword space: Here, FC stands for fully connected layer, which is used for dimensionality reduction.
[0121] Figure 2 A flowchart illustrating an information processing method according to an embodiment of this disclosure is shown. Figure 2 ,like Figure 2 As shown, an information processing method includes:
[0122] Step S201: Receive incomplete encoding information obtained based on the damaged label of the target object.
[0123] Step S202: Based on the physical signal characteristics and logical verification characteristics of the incomplete coding information, construct a dual-domain feature vector of the incomplete coding information.
[0124] Step S203: Based on the position embedding vector and dual-domain feature vector corresponding to the target position in the incomplete coding information, determine the enhanced feature vector of the incomplete coding information.
[0125] Step S204: Construct an attention mask based on the verification matrix and construction rules.
[0126] The specific implementation details of steps S201-S204 are similar to those of steps S101-S104, and will not be repeated here.
[0127] Step S205: Construct a dual loss function based on cross-entropy loss and structural verification consistency loss.
[0128] In this embodiment, a dual loss function is used to train the information processing model, which combines cross-entropy loss and structural verification consistency loss.
[0129] Cross-entropy loss is a commonly used loss function to measure the difference between the model output and the true label. In this embodiment, cross-entropy loss is used to optimize bit recovery accuracy. Specifically, the model output is first converted into a probability value using a sigmoid function, then compared with the true label, and the binary cross-entropy loss is calculated. Structure check consistency loss improves the accuracy and robustness of recovering damaged product label codewords by constraining the consistency between the model output and the LDPC encoding rules. The final dual loss function is obtained by weighting and combining the cross-entropy loss and the structure check consistency loss.
[0130] Step S206: Iteratively update the network parameters of the information processing model based on the dual loss function.
[0131] In this embodiment, gradient descent or other optimization algorithms can be used to iteratively update the network parameters of the information processing model based on the gradient of the dual loss function. This process typically involves backpropagation, which calculates the gradient of the loss function with respect to the network parameters and then updates the parameters to reduce the loss.
[0132] Step S207: Based on attention masking and information processing model, the enhanced feature vector is identified to obtain the complete encoded information corresponding to the target object.
[0133] The specific implementation details of step S207 are similar to those of step S105, and will not be repeated here.
[0134] In another embodiment, step S205, "constructing a dual loss function based on cross-entropy loss and structural verification consistency loss," includes:
[0135] Based on the prediction results and true labels output by the information processing model, the cross-entropy loss is determined.
[0136] Based on the prediction results and verification matrix output by the information processing model, the accompanying checksum is determined.
[0137] The structural verification consistency loss is determined based on the sum of squares of the adjoint checksums.
[0138] By weighting and combining the cross-entropy loss and the structural verification consistency loss, a dual loss function is obtained.
[0139] In this embodiment, the prediction result is typically the encoded information output by the model, while the true label is the known correct encoded information. Cross-entropy loss measures the difference between the prediction result and the true label. With real label b i Calculate the binary cross-entropy loss function together.
[0140] In this embodiment, the prediction results of the information processing model and the verification matrix are also needed to determine the adjoint checksum. The adjoint checksum... And use the sum of squares to determine the structural verification consistency loss. The purpose of this structural consistency loss is to ensure that the prediction results meet the encoding rules, thereby improving the robustness of the model.
[0141] Finally, the cross-entropy loss and the structural validation consistency loss can be weighted and combined to obtain a dual loss function. This dual loss function... Taking into account both the accuracy of the prediction results and the consistency of the coding rules, its form is as follows: Here, λ is a hyperparameter used to balance the importance of the two losses.
[0142] In this disclosure, the dual loss function takes into account both the accuracy of the prediction results and the consistency of the encoding rules, which helps to improve the robustness of the model when facing structural damage.
[0143] Figure 3 A schematic diagram of the network framework of the information processing model according to an embodiment of this disclosure is shown, such as... Figure 3 As shown, the first layer is the input layer, which explicitly receives two types of key data: the damaged code sequence y and the marker bits. The damaged code sequence comes from the product label codes caused by physical damage such as dirt, wrinkles, and scratches during the logistics process, and contains some missing or distorted information. The marker bits are pre-set structural anchor point data, which provide the positioning and constraint basis for subsequent structural perception and information recovery.
[0144] Next, the feature processing and embedding stage is initiated, which revolves around dual-domain perception. On one hand, for the damaged code sequence and the LDPC syndrome s(y) obtained based on the damaged code sequence (i.e., the logical check feature in step S102), the signal strength features of the physical domain and the coding rule features of the logical domain are fused through Hadamard multiplication and dimension mapping operations to generate an intermediate feature vector of dimension 2n-k. This intermediate result is then fed into the coding embedding (dimension d) and check embedding to extract the dimensional embedding related to the damaged code sequence and check. On the other hand, the marker bit information (Markerbits) is position-embedded to obtain an intermediate representation of dimension 2n-k, which in turn generates a marker feature of dimension d′.
[0145] Then, the encoding embedding, checksum embedding, and marker features are integrated to obtain an input embedding of dimension d+d′. This input embedding is then fed into a decoder block with structure-aware attention masks. The output of the decoder block, after further processing, yields the complete LDPC code (Recovered LDPC code). This output not only numerically approximates the original product label codeword but also passes the Syndrome Consistency check, satisfying the structural rules of LDPC encoding.
[0146] Figure 4 A schematic diagram of the attention mechanism framework of the information processing model according to an embodiment of this disclosure is shown, such as... Figure 4 As shown, the first step is the input and preprocessing stage. The diagram starts with input embedding, which has a dimension of (2n-k)×(d+d'). It integrates the dual-domain features (physical signal features and logical verification features) of the damaged codewords of the product label and the position and feature information of the marker bit, providing comprehensive initial data support for subsequent attention modeling. At the same time, the original bit sequence (b_original) is clearly defined as the benchmark reference for model training and result verification.
[0147] Next, the core computational stage of the attention mechanism begins. The input embedding vector is first transformed into the query vector (Q), key vector (K), and value vector (V) required for attention calculation by passing through the Q-projector, K-projector, and V-projector respectively. During this process, the crucial rule-aware attention mask matrix (g(H)) plays a key constraint role. This matrix is constructed based on the parity check matrix (H) of the LDPC code, with elements taking values only {-∞, 0}, where 0 indicates that information bits at the corresponding position are allowed to interact, and -∞ indicates that information interaction at irrelevant positions is blocked. When calculating the attention weights, the transposes of Q and K are multiplied by matrix multiplication, then the mask matrix (g(H)) is superimposed, and then normalized using the softmax function. Simultaneously, the lower square root dimension is considered. The scaling operation ultimately yields attention weights that conform to the constraints of LDPC encoding rules. This process ensures that the model focuses only on effective information interactions, avoids ineffective attention diffusion, and improves the ability to perceive and recover from structured damage.
[0148] The next step is feature fusion and output mapping. The calculated attention weights and value vector (V) are weighted and fused, and then passed through a feedforward network (Feed Fwd) for nonlinear feature transformation. During this process, normalization is performed to stabilize the training process and prevent gradient vanishing or exploding. The feature vector processed by the feedforward network is then passed through two fully connected (FC) layers for dimension mapping. The first layer reduces the feature dimension from (2n-k)×(d+d') to (2n-k)×1, and the second layer further maps it back to the original codeword space dimension n, resulting in the final predicted log probability vector (logits).
[0149] Finally, in the loss calculation and result output stage, a dual loss function L = L_BCE + L_syn is used for backpropagation optimization of the model, continuously adjusting the parameters of the Q, K, and V projectors and the fully connected network. Ultimately, the predicted log probability vector (logits) is subjected to sign determination (sign) and binary conversion (bin) to obtain the recovered bit sequence (bin(sign(logits))), completing the rule-aware attention modeling and information recovery of the damaged product label codewords.
[0150] Figure 5 The diagram illustrates the recovery performance of embodiments of this disclosure at different damage rates. Figure 5 The changes in the recovery rate of continuous injury and the recovery rate of discontinuous injury are shown when the injury rates are 5%, 10%, 15%, 20%, 25%, and 30%, respectively. From... Figure 5As can be seen, the recovery accuracy for both damage types decreases with increasing damage rate, but remains consistently above 90%. Furthermore, at each damage rate node, the recovery rate for discontinuous damage is consistently higher than that for continuous damage, indicating that under the same damage rate conditions, this method is more effective at recovering discontinuous damage than continuous damage. Continuous damage involves the loss of a continuous segment of information, typically caused by physical compression or collision, while discontinuous damage involves randomly distributed information loss, typically caused by friction or localized damage.
[0151] Figure 6 A comparative diagram of the recovery accuracy of embodiments of this disclosure and related technologies is shown, such as... Figure 6 The diagram illustrates a comparison of the recovery accuracy of this invention and the recovery accuracy of the Vision-Language Model (VLM) for QR code restoration under three different impairment types: continuous loss (20% loss rate), discontinuous loss (20% loss rate), and fuzzy impairment. With continuous loss (20% loss rate), the recovery accuracy of this invention is approximately 91%, while the VLM restoration accuracy is approximately 72%. For discontinuous loss (20% loss rate), the recovery accuracy of this invention is close to 96%, while the VLM restoration accuracy is approximately 80%. In the case of fuzzy impairment, the recovery accuracy of this invention is approximately 95%, while the VLM restoration accuracy is approximately 81%. Overall, under all three impairment types, the recovery accuracy of this invention is significantly higher than that of the VLM restoration accuracy.
[0152] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.
[0153] Figure 7 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0154] like Figure 7As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0155] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0156] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as an information processing method. For example, in some embodiments, an information processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of an information processing method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform an information processing method by any other suitable means (e.g., by means of firmware).
[0157] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0158] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0159] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0160] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0161] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0162] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0163] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.
[0164] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0165] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. An information processing method, comprising: Receive incomplete encoded information obtained based on the damaged label of the target object; Some features are missing in the damaged label; Based on the physical signal characteristics and logical verification characteristics of the incomplete coding information, a dual-domain feature vector of the incomplete coding information is constructed. Based on the position embedding vector corresponding to the target position in the incomplete coding information and the dual-domain feature vector, the enhanced feature vector of the incomplete coding information is determined; The enhanced feature vector represents the feature information of the damaged label in at least one dimension; Construct an attention mask based on the check matrix and construction rules; Based on the attention mask and information processing model, the enhanced feature vector is identified to obtain the complete encoded information corresponding to the target object.
2. The method according to claim 1, wherein constructing a dual-domain feature vector of the incomplete coding information based on the physical signal features and logical verification features of the incomplete coding information comprises: Based on the absolute value of the incomplete coding information, the physical signal characteristics of the incomplete coding information are determined; Based on the binarized incomplete coding information and the check matrix, the logical check features of the incomplete coding information are determined; The physical signal features and logic verification features are concatenated to obtain the dual-domain feature vector.
3. The method according to claim 1, wherein determining the enhanced feature vector of the incomplete coding information based on the position embedding vector corresponding to the target position in the incomplete coding information and the dual-domain feature vector comprises: Generate a location embedding vector corresponding to the target location based on the location encoding function; The target location is the location of the structural anchor point embedded in the incomplete coded information; The enhanced feature vector is obtained by concatenating the position embedding vector with the dual-domain feature vector.
4. The method according to claim 1, wherein the construction rules include at least one of the following: If the row or column information of an element in the attention mask belongs to the target position, then the value of the element is determined to be 0. In response to the row information of an element in the attention mask being equal to the column information, the value of the element is determined to be 0; If the row and column information of an element in the attention mask both belong to the information bits of the same check equation in the check matrix, then the value of the element is determined to be 0. If one of the row information or column information of an element in the attention mask belongs to the information bit of the target check equation in the check matrix, and the other is the check bit corresponding to the information bit in the target check equation, and the value corresponding to the row information in the target check equation is 1, then the value of the element is determined to be 0.
5. The method according to claim 4, wherein the construction rule further comprises: In response to the fact that the value of an element in the attention mask is not 0, the value of the element is determined to be negative infinity.
6. The method according to claim 1, wherein identifying the enhanced feature vector based on the attention mask and information processing model to obtain the complete encoded information corresponding to the target object includes: Based on the three-layer decoder of the information processing model, the enhanced feature vector is identified to obtain the complete encoded information corresponding to the target object; The first layer of the three-layer decoder employs a normalized residual multi-head attention mechanism based on the attention mask; the second layer employs a normalization and feedforward feature mapping mechanism; and the third layer employs a normalization and output mapping mechanism.
7. The method according to claim 6, wherein the first layer decoder employs a normalized residual multi-head attention mechanism based on the attention mask to process the enhanced feature vector as follows: The enhanced feature vector is normalized to obtain normalized features; Based on the normalized features, the attention mask, and the weight matrix, the weighted features of the enhanced feature vector are determined; The weighted features and the enhanced feature vectors are concatenated, and the concatenated residual fusion result is output to the second layer decoder.
8. The information processing model is trained based on the following method according to claim 1: A dual loss function is constructed based on cross-entropy loss and structural verification consistency loss. Based on the aforementioned dual loss function, the network parameters of the information processing model are iteratively updated.
9. The method according to claim 8, wherein constructing a dual loss function based on cross-entropy loss and structural verification consistency loss includes: Based on the prediction results and true labels output by the information processing model, the cross-entropy loss is determined; Based on the prediction results output by the information processing model and the verification matrix, the accompanying checksum is determined; The structural verification consistency loss is determined based on the sum of squares of the accompanying checksums; The cross-entropy loss and the structural verification consistency loss are weighted and combined to obtain the dual loss function.
10. An electronic device, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform: Receive incomplete encoded information obtained from damaged labels of a target object; some features are missing in the damaged labels. Based on the physical signal characteristics and logical verification characteristics of the incomplete coding information, a dual-domain feature vector of the incomplete coding information is constructed. Based on the position embedding vector corresponding to the target position in the incomplete coding information and the dual-domain feature vector, an enhanced feature vector of the incomplete coding information is determined; the enhanced feature vector represents the feature information of the damaged label in at least one dimension. Construct an attention mask based on the check matrix and construction rules; Based on the attention mask and information processing model, the enhanced feature vector is identified to obtain the complete encoded information corresponding to the target object.