Anti-counterfeiting authentication method, medium and equipment based on twin network technology

By constructing a Res-DnNet model based on twin networks, combined with a random forest classifier, the global and local features of the image are extracted, and the shortcomings of QR code anti-counterfeiting technology are solved in identifying subtle artifacts, and efficient and accurate anti-counterfeiting authentication is achieved.

CN120471081APending Publication Date: 2025-08-12NANCHANG INST OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510542525.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing QR code anti-counterfeiting technology has shortcomings in identifying subtle artifacts and applicability, and it is difficult to effectively identify subtle artifacts such as printing defects and ink diffusion with specific anti-counterfeiting images.

Method used

The anti-counterfeiting authentication method based on twin network technology is adopted, and the twin network Res-DnNet model including ResNet-18 and Dn4 networks is constructed, combined with a random forest classifier, the global overall texture and local detail characteristics of the image are extracted, and adaptive weighted fusion is carried out to improve the recognition ability of subtle artifacts.

Benefits of technology

It improves the robustness and applicability of anti-counterfeiting certification, reduces the misjudgment rate, and realizes the rapid identification of the authenticity of the anti-counterfeiting image to be tested. It is simple and easy to operate, and is suitable for mobile phone photography identification, improving the identification speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471081A_ABST
    Figure CN120471081A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-counterfeiting authentication method, medium and equipment based on a twin network technology, and relates to the technical field of anti-counterfeiting and information security, and the anti-counterfeiting authentication method based on the twin network technology mainly comprises the steps: obtaining a true and false sample image set according to an anti-counterfeiting label, and constructing a twin network Res-DnNet containing ResNet-18 and Dn4 networks as an anti-counterfeiting authentication model, training the anti-counterfeiting authentication model by using the true and false sample image set to obtain a trained anti-counterfeiting authentication model, and performing identification authentication on the to-be-tested image by using the trained anti-counterfeiting authentication model to obtain an authentication result. By implementing the twin network technology-based anti-counterfeiting authentication method, the medium and the equipment provided by the invention, the robustness and applicability of anti-counterfeiting authentication can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of anti-counterfeiting and information security technology, and more specifically, to an anti-counterfeiting authentication method, medium and device based on twin network technology. Background Art

[0002] Driven by rapid global economic growth, the scale of commodity circulation has grown rapidly, but the resulting problem of counterfeit and shoddy goods has become a global challenge threatening the health of the business ecosystem. Counterfeit and shoddy goods severely damage consumers' economic interests, disrupt resource allocation, and reduce the quality and efficiency of economic operations. Against this backdrop, anti-counterfeiting technology can effectively combat the phenomenon. Existing traditional anti-counterfeiting technologies, such as barcodes and laser anti-counterfeiting, remain susceptible to duplication or require high technical and cost requirements, making them unsuitable for mobile devices.

[0003] QR code anti-counterfeiting technology uses QR codes and anti-counterfeiting patterns as information carriers, combined with anti-counterfeiting algorithms and designs, to ensure product authenticity and prevent counterfeit products from entering the market. By scanning the QR code, consumers can obtain information such as the product's production date, place of origin, batch, and inspection agency, allowing them to quickly verify the product's authenticity and effectively prevent counterfeit and substandard products from entering the market. The advantages of QR code anti-counterfeiting technology include its low cost, comprehensive technology, easy verification of anti-counterfeiting information, and effective anti-counterfeiting effectiveness. Furthermore, QR code anti-counterfeiting technology can track the product's production process, ensuring consumer safety. With the continuous development of technology, QR code anti-counterfeiting technology is constantly innovating and improving, providing consumers with safer and more reliable products.

[0004] However, the applicability of existing QR code anti-counterfeiting technology and its ability to identify subtle artifacts still need to be improved.

[0005] The above content is only used to assist in understanding the technical solution of the present invention and does not constitute an admission that the above content is prior art. Summary of the Invention

[0006] The purpose of the present invention is to provide an anti-counterfeiting authentication method, medium and device based on twin network technology, which can improve the robustness and applicability of anti-counterfeiting authentication.

[0007] The present invention provides an anti-counterfeiting authentication method based on twin network technology, comprising the following steps:

[0008] S01: Obtain an anti-counterfeiting label, and obtain a set of true and false sample images based on the anti-counterfeiting label;

[0009] S02: Constructing an anti-counterfeiting authentication model, the anti-counterfeiting authentication model comprising a first network module, a second network module, and a random forest classifier; the first network module is used to extract global texture features of the sample image; the second network module is used to extract local detail features of the sample image; the random forest classifier is used to perform adaptive weighted fusion on the global texture features and local detail features of the sample image output by the first network module and the second network module to obtain a discrimination result;

[0010] S03: training the anti-counterfeiting authentication model using the true and false sample image set to obtain a trained anti-counterfeiting authentication model;

[0011] S04: Use the trained anti-counterfeiting authentication model to identify and authenticate the image to be tested, and obtain an authentication result.

[0012] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the anti-counterfeiting authentication method based on the twin network technology.

[0013] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, the steps of the anti-counterfeiting authentication method based on twin network technology are implemented.

[0014] The anti-counterfeiting authentication method, medium, and device based on twin network technology provided by the present invention have the following beneficial effects:

[0015] The present invention utilizes twin network technology, that is, an improved ResNet-18 network module is used to extract the global overall texture features of the anti-counterfeiting image, and the feature extraction capability of coping with local detail perception of small sample data sets is enhanced by designing a Dn4 network module. At the same time, the principal component analysis module is used for dimensionality reduction to ensure that the feature dimensions extracted by the two networks are aligned. Finally, a random forest classifier is used to perform adaptive weighted fusion on the multi-level features output by the twin network, which effectively improves the Res-DnNet model's ability to recognize subtle artifacts such as printing defects and ink diffusion with specific anti-counterfeiting images, realizes the function of quickly identifying the authenticity of the anti-counterfeiting image to be tested, improves the performance of the anti-counterfeiting query and authentication system based on image technology, improves the identification robustness, reduces the error rate, and provides a reliable basis for further distinguishing the authenticity of the anti-counterfeiting pattern. The operation method of the present invention is simple and easy, and there is no need to learn identification knowledge or use specific equipment. The identification operation can be performed by taking pictures with a mobile phone carried with you. It is efficient and convenient, improves the identification speed, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0017] Figure 1 It is a flow chart of the anti-counterfeiting authentication method based on twin network technology provided by the present invention;

[0018] Figure 2 This is a flowchart of the operation flow of the anti-counterfeiting authentication method based on the twin network technology provided by the present invention;

[0019] Figure 3 is a flow chart of the Res-DnNet model provided by the present invention;

[0020] Figure 4 It is a structural block diagram of the computer device provided by the present invention. DETAILED DESCRIPTION

[0021] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.

[0022] Figure 1 A schematic diagram of the anti-counterfeiting authentication method based on the twin network technology of this embodiment is shown. In this embodiment, the anti-counterfeiting authentication method based on the twin network technology includes the following steps:

[0023] S01: Obtain an anti-counterfeiting label, and obtain a set of true and false sample images based on the anti-counterfeiting label;

[0024] In an exemplary embodiment, the true and false sample image set includes true anti-counterfeiting labels and forged anti-counterfeiting labels;

[0025] S02: Constructing an anti-counterfeiting authentication model, the anti-counterfeiting authentication model comprising a first network module, a second network module, and a random forest classifier; the first network module is used to extract global texture features of the sample image; the second network module is used to extract local detail features of the sample image; the random forest classifier is used to perform adaptive weighted fusion on the global texture features and local detail features of the sample image output by the first network module and the second network module to obtain a discrimination result;

[0026] In an exemplary embodiment, the first network module includes a low-order feature extraction module, a first residual block group, a second residual block group, a third residual block group, and a fourth residual block group. The low-order feature extraction module includes an initial convolution layer and a maximum pooling layer. The initial convolution layer is a 7×7 convolution kernel with a stride of 2, and the maximum pooling layer is a 3×3 window. The first residual block group, the second residual block group, the third residual block group, and the fourth residual block group each include two basic residual units, and each basic residual unit includes two 3×3 convolution layers with jump connections.

[0027] In an exemplary embodiment, the second network module includes a Dn4 network module and a dimensionality reduction module; the Dn4 network module is used to extract local detail features of the sample image, and the dimensionality reduction module is used to reduce the dimension of the output of the Dn4 network module so that the dimensions of the output features of the first network module and the Dn4 network module are aligned;

[0028] In an exemplary embodiment, the Dn4 network module includes three densely connected improved residual units, a leaky relu layer, an unfolding layer, and an L2 regularization layer; each improved residual unit includes four parallel convolution groups for capturing high-resolution regional features; each convolution group includes a 1×1 dilated convolution, a 3×3 standard convolution, a 5×5 dilated convolution with a dilation rate of 2, and a 3×3 depth-separable convolution, and generates a 256-dimensional multi-scale descriptor through channel splicing and fusion;

[0029] In an exemplary embodiment, the dimensionality reduction module uses a principal component analysis method to perform dimensionality reduction so that the dimensions of the output features of the first network module and the Dn4 network module are aligned;

[0030] In an exemplary embodiment, the dimensionality reduction using the principal component analysis method includes:

[0031] Normalize the output features of the DN4 network to obtain the normalized data. The formula is as follows:

[0032]

[0033] Among them, X is the standardized data, x is the original eigenvalue, μ is the mean of the feature, and σ is the standard deviation of the feature;

[0034] The covariance matrix is calculated based on the standardized data. The formula is as follows:

[0035]

[0036] Where ∑ is the covariance matrix, n is the sample size, X i is the eigenvector of the i-th sample, μ′ is the mean vector of all samples, and T represents the transposition of the matrix;

[0037] Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors. The formula is as follows:

[0038] ∑=λv,

[0039] Among them, λ is the eigenvalue and v is the corresponding eigenvector;

[0040] According to the size of the eigenvalue, the largest eigenvalue and its corresponding eigenvector are selected as the principal component to obtain the local detail features of the sample image;

[0041] In an exemplary embodiment, the preset number is 2;

[0042] In an exemplary embodiment, the random forest classifier performs adaptive weighted fusion of the global texture features and local detail features of the sample image output by the first network module and the second network module through a multi-tree voting mechanism to obtain a discrimination result, such as the formula:

[0043]

[0044] Among them, ΔG is the Gini gain after splitting, G is the Gini index of the current node, G l and G r are the Gini index of the left and right child nodes respectively, N is the total number of samples of the current node, N l and N r are the number of samples of the left and right child nodes after the node splits, K is the number of categories of the samples, and p k is the proportion of samples of category k of the current node, and The proportion of samples of category k of the left and right children of the current node, n k is the total number of samples of category k of the current node, and is the number of samples of category k of the left and right children of the current node; y represents the final classification result determined by the majority voting mechanism, x is the test sample, and h i (x) is the predicted category output by the i-th tree, c is the category with the maximum value, and C is the total category;

[0045] S03: training the anti-counterfeiting authentication model using the true and false sample image set to obtain a trained anti-counterfeiting authentication model;

[0046] As an exemplary embodiment, in step S03, the above-mentioned Res-DnNet model, i.e., the anti-counterfeiting authentication model, is used to train and optimize the sample image for multiple rounds, and finally various parameters required for the authentication model are generated; when encountering the image to be tested, the authentication model can accurately extract and analyze the various features of the image with the trained parameters, and accurately identify the authenticity of the image to be tested by comparing it with the learned random forest classifier.

[0047] S04: Use the trained anti-counterfeiting authentication model to identify and authenticate the image to be tested, and obtain an authentication result.

[0048] In some embodiments, the above-mentioned anti-counterfeiting authentication method based on twin network technology can also be implemented in the following manner.

[0049] The technical solution adopted in this embodiment is: first, an anti-counterfeiting label with specific random texture features is pasted or printed on the product, and different printing or copying devices are used to forge the anti-counterfeiting label. Then, various acquisition devices are used to collect images as samples. The samples are trained through the Res-DnNet model to obtain model parameters capable of distinguishing authenticity, thus realizing the function of quickly identifying the authenticity of the anti-counterfeiting images uploaded by customers. Figure 2 The anti-counterfeiting authentication method based on the twin network technology of this embodiment includes the following steps:

[0050] S1: Attach or print a QR code security label with a specific random texture onto the product. Each security label's texture is random and finely structured, ensuring the specificity of the ink during the printing process. For example, using an HP Indigo 7600 printer to print security patterns creates a security label based on the random flow of ink within the printer.

[0051] S2: Use different printing or copying devices to forge the anti-counterfeiting label, and use different acquisition devices to capture the product's anti-counterfeiting label and the forged anti-counterfeiting label as sample images.

[0052] First, use real anti-counterfeiting labels to print out fake anti-counterfeiting labels using high-precision copiers such as Epson, Canon, and HP. Use Huawei series, iPhone series, Xiaomi series and other mobile phones and industrial cameras of brands such as Hikvision and Keyence, as well as collection equipment of brand scanners such as Deli, Canon, and HP to collect the real and fake anti-counterfeiting labels of the products as a set of true and false sample images.

[0053] S3: The improved ResNet-18 network module is used to extract the global texture features of the sample image, and the Dn4 network module is designed to enhance the feature extraction capability of the local detail perception of the sample image. At the same time, the principal component analysis module is used for dimensionality reduction to ensure that the feature dimensions extracted by the two networks are aligned, such as Figure 3 shown.

[0054] First, ResNet-18 uses a standard 5-layer residual module to form a complete feature extraction system, which includes: a low-order feature extraction module consisting of an initial convolutional layer (7×7 convolution kernel, stride 2) and a maximum pooling layer (3×3 window); 4 cascaded residual block groups, each containing 2 basic residual units, each unit consisting of two 3×3 convolutional layers to extract global texture features, and its jump connection mechanism can effectively retain shallow edge information.

[0055] DN4, on the other hand, uses a densely connected module to focus on local details. It consists of three densely connected improved residual units, one leaky relu layer, one unfolding layer, and one L2 normalize layer. Each unit contains four parallel convolution groups: a 1×1 dilated convolution, a 3×3 standard convolution, a 5×5 dilated convolution (with dilation = 2), and a 3×3 depthwise separable convolution. Channel concatenation and fusion generate a 256-dimensional multi-scale descriptor. This multi-scale convolution group specifically captures high-resolution regional features.

[0056] At the same time, the principal component analysis module is used for dimensionality reduction to ensure that the feature dimensions extracted by the two networks are aligned. Since the DN4 network output feature dimension is 40, which is much higher than the result obtained by the output layer of the ResNet-18 network, this embodiment uses PCA to reduce the dimensionality of the DN4 network output features. The output features of the DN4 network are first normalized using the following formula:

[0057]

[0058] Where x is the original eigenvalue, μ is the mean of the feature, and σ is the standard deviation of the feature;

[0059] Then calculate the covariance matrix based on the standardized data, the formula is as follows:

[0060]

[0061] Where n is the sample size, X i is the eigenvector of the i-th sample, μ is the mean vector of all samples;

[0062] Then perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors, and based on this, obtain the principal components of the data; the formula is as follows:

[0063] ∑=λυ

[0064] Among them, λ is the eigenvalue and υ is the corresponding eigenvector;

[0065] According to the size of the eigenvalue, select the first two largest eigenvalues and their corresponding eigenvectors as the principal components;

[0066] Based on the above process, this embodiment reduces the output of the DN4 network to the same dimension as the output layer of the ResNet network.

[0067] S4: A random forest classifier is used to adaptively weight the multi-level features output by the twin network;

[0068] The feature vectors output by the DN4 network after PCA dimensionality reduction are channel-concatenated with the feature vectors output by ResNet18 to construct a joint feature space. Through a multi-tree voting mechanism, the model can not only utilize the abstract semantic features extracted by the deep network, but also combine the discriminative information of local details, thereby reducing the risk of overfitting while improving the ability to learn classification boundaries, achieving the final feature fusion to output the true or false result. Each decision tree is trained as follows:

[0069] First, after the training data is input, two-dimensional features are randomly selected when the node is split to alleviate the risk of overfitting caused by the difference in the distribution of the two network features. Then, the optimal split point is selected based on the Gini impurity minimization criterion. For the candidate feature f and the split threshold θ, the Gini gain after the split is calculated based on the following formula:

[0070]

[0071] in is the Gini index of the current node, p k is the proportion of samples of type k, D L and D R are the left and right subsets after segmentation;

[0072] Finally, for the test sample F (i) , each tree outputs the predicted category h t (F (i) )∈{1,...,K}, and finally the final classification result y is determined by the majority voting mechanism, and the formula is as follows:

[0073]

[0074] According to the above training process, each tree is trained and the final two parts of the output features are fused according to the final training model to obtain the final authentication model.

[0075] S5: By training the sample images with the Res-DnNet model, the generated authentication model can identify the authenticity of the image to be tested;

[0076] Through multiple rounds of training and optimization of sample images using the Res-DnNet model, the various parameters required for the authentication model are ultimately generated. When encountering a test image, the authentication model can accurately extract and analyze the image's features using the trained parameters, and accurately identify the authenticity of the test image by comparing it with the learned random forest classifier.

[0077] This embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the anti-counterfeiting authentication method based on twin network technology. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the storage medium may also include a combination of the aforementioned types of memory.

[0078] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the anti-counterfeiting authentication method based on the twin network technology are implemented.

[0079] like Figure 4 As shown, the computer device 120 may include: at least one processor 121, such as a central processing unit (CPU), at least one communication interface 123, a memory 124, and at least one communication bus 122. The communication bus 122 is used to implement connection and communication between these components. The communication interface 123 may include a display screen and a keyboard. Optionally, the communication interface 123 may also include a standard wired interface or a wireless interface. The memory 124 may be a high-speed random access memory (RAM) or a non-volatile memory, such as at least one disk storage. The memory 124 may optionally be at least one storage device located away from the processor 121. The memory 124 stores application programs, and the processor 121 calls the program code stored in the memory 124 to execute any of the above-mentioned method steps. The communication bus 122 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 122 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4Only one line is used to represent it, but it does not mean that there is only one bus or one type of bus. The memory 124 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 124 may also include a combination of the above types of memory. The processor 121 may be a central processing unit (CPU), a network processor (NP) or a combination of a CPU and an NP. The processor 121 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. Optionally, the memory 124 is further configured to store program instructions. The processor 121 may call the program instructions to implement the anti-counterfeiting authentication method based on the twin network technology of this embodiment.

[0080] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.

Claims

1. An anti-counterfeiting authentication method based on twin network technology, characterized in that: The following steps are involved: S01: Obtain an anti-counterfeiting label, and obtain a set of true and false sample images based on the anti-counterfeiting label; S02: Constructing an anti-counterfeiting authentication model, the anti-counterfeiting authentication model comprising a first network module, a second network module, and a random forest classifier; the first network module is used to extract global texture features of the sample image; the second network module is used to extract local detail features of the sample image; the random forest classifier is used to perform adaptive weighted fusion on the global texture features and local detail features of the sample image output by the first network module and the second network module to obtain a discrimination result; S03: training the anti-counterfeiting authentication model using the true and false sample image set to obtain a trained anti-counterfeiting authentication model; S04: Use the trained anti-counterfeiting authentication model to identify and authenticate the image to be tested, and obtain an authentication result.

2. The anti-counterfeiting authentication method based on twin network technology according to claim 1 is characterized in that: The true and false sample image set includes true anti-counterfeiting labels and forged anti-counterfeiting labels.

3. The anti-counterfeiting authentication method based on twin network technology according to claim 1 is characterized in that: The first network module includes a low-order feature extraction module, a first residual block group, a second residual block group, a third residual block group, and a fourth residual block group. The low-order feature extraction module includes an initial convolution layer and a maximum pooling layer. The initial convolution layer is a 7×7 convolution kernel with a step size of 2, and the maximum pooling layer is a 3×3 window; the first residual block group, the second residual block group, the third residual block group, and the fourth residual block group each include 2 basic residual units, and each basic residual unit includes 2 jump-connected 3×3 convolution layers.

4. The anti-counterfeiting authentication method based on twin network technology according to claim 1 is characterized in that: The second network module includes a Dn4 network module and a dimensionality reduction module; the Dn4 network module is used to extract local detail features of the sample image, and the dimensionality reduction module is used to reduce the dimension of the output of the Dn4 network module so that the dimensions of the output features of the first network module and the Dn4 network module are aligned.

5. The anti-counterfeiting authentication method based on twin network technology according to claim 4 is characterized in that: The Dn4 network module includes three densely connected improved residual units, a leaky relu layer, an unfolding layer, and an L2 regularization layer; each improved residual unit includes four parallel convolution groups for capturing high-resolution regional features; each convolution group includes a 1×1 dilated convolution, a 3×3 standard convolution, a 5×5 dilated convolution with a dilation rate of 2, and a 3×3 depth-separable convolution, generating a 256-dimensional multi-scale descriptor through channel splicing and fusion.

6. The anti-counterfeiting authentication method based on twin network technology according to claim 4 is characterized in that: The dimensionality reduction module uses the principal component analysis method to perform dimensionality reduction so that the dimensions of the output features of the first network module and the Dn4 network module are aligned.

7. The anti-counterfeiting authentication method based on twin network technology according to claim 6 is characterized in that: The dimensionality reduction using the principal component analysis method includes: The output features of the Dn4 network are standardized to obtain the standardized data. The formula is as follows: Among them, X is the standardized data, x is the original eigenvalue, μ is the mean of the feature, and σ is the standard deviation of the feature; The covariance matrix is calculated based on the standardized data. The formula is as follows: Where ∑ is the covariance matrix, n is the sample size, X i is the eigenvector of the i-th sample, μ′ is the mean vector of all samples, and T represents the transposition of the matrix; Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues and eigenvectors. The formula is as follows: ∑=λv, Among them, λ is the eigenvalue and v is the corresponding eigenvector; According to the size of the eigenvalue, the largest eigenvalues and their corresponding eigenvectors are selected as principal components to obtain the local detail features of the sample image.

8. The anti-counterfeiting authentication method based on twin network technology according to claim 1 is characterized in that: The random forest classifier performs adaptive weighted fusion on the global texture features and local detail features of the sample image output by the first network module and the second network module through a multi-tree voting mechanism to obtain a discrimination result, as shown in the formula: Among them, ΔG is the Gini gain after splitting, G is the Gini index of the current node, G l and G r are the Gini index of the left and right child nodes respectively, N is the total number of samples of the current node, N l and N r are the number of samples of the left and right child nodes after the node splits, K is the number of categories of the samples, and p k is the proportion of samples of category k of the current node, and The proportion of samples of category k of the left and right children of the current node, n k is the total number of samples of category k of the current node, and is the number of samples of category k of the left and right children of the current node; y represents the final classification result determined by the majority voting mechanism, x is the test sample, and h i (x) is the predicted category output by the i-th tree, c is the category with the maximum value, and C is the total category.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the anti-counterfeiting authentication method based on twin network technology as described in any one of claims 1 to 8 are implemented.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the anti-counterfeiting authentication method based on twin network technology are implemented as described in any one of claims 1-8.