Dynamic generation method for product anti-counterfeiting encryption digital identity ID
By obtaining the product's production attribute bit code, classifying it, and adjusting the encoding disorder and storage space, the problem of duplicate product digital identity IDs is solved, and the uniqueness and collision resistance are improved.
Patent Information
- Application Number
- CN202511358712.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-09-23
AI Technical Summary
In existing technologies, allocating fixed storage space to products makes it easy for digital identity IDs to be duplicated, which reduces the effectiveness of generating product digital identity IDs.
By obtaining the attribute bit codes of different production attributes of the product, the product categories are divided, the encoding disorder and storage space length are adjusted, and a hash algorithm is used to generate a unique digital identity ID.
It improves the uniqueness and collision resistance of product digital identity IDs, avoids the phenomenon of duplicate identity IDs, and enhances anti-counterfeiting and traceability capabilities.
Smart Images

Figure CN120851910B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of digital identity generation, in particular to a dynamic generation method for product anti-counterfeiting encryption digital identity ID. BACKGROUND
[0002] The digital identity ID can generate a unique and unpredictable identifier for each product based on real-time data and encryption algorithms, giving the product a unique "identity card" in the digital world. The purpose is to ensure the uniqueness and unforgeability of the identity ID of each product by dynamically generating a unique product digital identity ID, which plays an important role in efficient anti-counterfeiting and traceability of products.
[0003] In related technologies, a fixed storage space is usually allocated for product production date, production batch, product number and other production attribute information, and then based on the attribute information of the product, a digital identity ID generation algorithm is used to generate a corresponding digital identity ID for each product. However, in the case of a large number of products, some attributes of the products are the same, resulting in a large amount of repeated information in some attributes of the products. The existing method of allocating a fixed storage space for product production attribute information will cause the generated digital identity ID of each product to be highly likely to be repeated, reducing the effect of product digital identity ID generation. SUMMARY
[0004] In order to solve the technical problem that the existing method of allocating a fixed storage space for product production attribute information will cause the generated digital identity ID of each product to be highly likely to be repeated, reducing the effect of product digital identity ID generation, the purpose of the present application is to provide a dynamic generation method for product anti-counterfeiting encryption digital identity ID, and the technical solution adopted is as follows:
[0005] The present application provides a dynamic generation method for product anti-counterfeiting encryption digital identity ID, which comprises:
[0006] Obtaining attribute bit codes of different production attributes of each product in the production process;
[0007] Taking any one production attribute as a target production attribute, classifying all products according to the differences in attribute bit codes of the target production attribute of each product to obtain multiple product categories; obtaining the coding disorder degree of the target production attribute according to the distribution of the number of products in each product category; extracting the longest common substring of the attribute bit codes of the target production attribute of all products, and adjusting the coding disorder degree of the target production attribute according to the difference between the length of the longest common substring and the length of the attribute bit code of the target production attribute to obtain the adjusted coding disorder degree of the target production attribute;
[0008] According to the number of attribute bit codes of the target production attribute and the length of the attribute bit code of the target production attribute, an idle proportion of the target production attribute is obtained; and based on the adjusted encoding disorder degree of the target production attribute and the idle proportion, a length of a storage space of the target production attribute is adjusted to obtain an optimized space length of the target production attribute.
[0009] Based on the attribute bit code of each production attribute of each product and the optimized space length of each production attribute, a digital identity ID of each product is generated.
[0010] Further, the obtaining of the encoding disorder degree of the target production attribute comprises:
[0011] Taking the number of products in each product category as a numerator and the number of all products as a denominator, a ratio is taken as a quantity proportion of each product category;
[0012] Taking an information entropy of the quantity proportion of all product categories as the encoding disorder degree of the target production attribute.
[0013] Further, the obtaining of the adjusted encoding disorder degree of the target production attribute comprises:
[0014] Taking the length of the longest common substring as a numerator and a difference between the length of the attribute bit code of the target production attribute and the length of the longest common substring as a denominator, a ratio is normalized to obtain an adjustment coefficient of the target production attribute;
[0015] Based on the adjustment coefficient of the target production attribute, the encoding disorder degree of the target production attribute is adjusted to obtain an adjusted encoding disorder degree of the target production attribute.
[0016] Further, the adjusting of the encoding disorder degree of the target production attribute based on the adjustment coefficient of the target production attribute to obtain the adjusted encoding disorder degree of the target production attribute comprises:
[0017] Taking a product of the adjustment coefficient of the target production attribute and the encoding disorder degree as a disorder adjustment amount of the target production attribute;
[0018] Taking a difference between the encoding disorder degree of the target production attribute and the disorder adjustment amount as the adjusted encoding disorder degree of the target production attribute.
[0019] Further, the obtaining of the idle proportion of the target production attribute comprises:
[0020] Based on a calculation formula of the idle proportion, the idle proportion of the target production attribute is obtained, and the calculation formula of the idle proportion is:
[0021]
[0022] wherein, an idle ratio of the target production attribute; a number of different attribute bit codes of the target production attribute; a length of the attribute bit code of the target production attribute.
[0023] Further, the obtaining of the optimized space length of the target production attribute comprises:
[0024] performing a negative correlation mapping on the idle ratio of the target production attribute to obtain a bit code emergency evaluation value of the target production attribute;
[0025] comprehensively processing the bit code emergency evaluation value of the target production attribute and the adjusted encoding disorder degree, and performing a normalization processing to obtain a length adjustment weight of the target production attribute;
[0026] based on the length adjustment weight of the target production attribute, expanding the length of the storage space of the target production attribute to obtain an optimized space length of the target production attribute.
[0027] Further, the expanding of the length of the storage space of the target production attribute based on the length adjustment weight of the target production attribute to obtain the optimized space length of the target production attribute comprises:
[0028] multiplying the length adjustment weight of the target production attribute and the length of the attribute bit code of the target production attribute to obtain a storage length adjustment amount of the target production attribute;
[0029] adding the length of the attribute bit code of the target production attribute and the storage length adjustment amount to obtain the optimized space length of the target production attribute.
[0030] Further, the generating of the digital identity ID of each product comprises:
[0031] taking any one product as a target product, expanding the length of the storage space of each production attribute of the target product to the optimized space length, writing the attribute bit code of each production attribute of the target product into the expanded storage space of each production attribute, processing the attribute bit code in the expanded storage space of all production attributes of the target product using a digital identity ID generation algorithm, and generating the digital identity ID of the target product.
[0032] Further, the digital identity ID generation algorithm is a hash algorithm.
[0033] Further, the obtaining of the plurality of product categories comprises:
[0034] The products with the same attribute bit code of the target production attribute are classified into the same category, and a plurality of product categories are obtained.
[0035] The present application has the following advantages:
[0036] The present application first acquires the attribute bit code of each product in the production process, and considers that in the case of a large number of products, some production attributes of the products have a large amount of the same information, for example, the production dates of some products are the same. Therefore, the present application first classifies all the products into a plurality of product categories, and preliminarily reflects the confusion degree of the attribute bit code distribution of the target production attribute of each product through the acquired coding confusion degree. Meanwhile, it is considered that although the attribute bit code of the target production attribute of some products is different, the attribute bit code of the target production attribute of these products has the same substring, and these same substrings will lead to a smaller actual confusion degree of the attribute bit code of the target production attribute of the products. Therefore, the longest common substring is extracted, and the coding confusion degree of the target production attribute is adjusted to obtain the adjusted coding confusion degree of the target production attribute, so as to improve the accuracy of the confusion degree analysis of the attribute bit code of the target production attribute of each product. Meanwhile, in order to ensure the uniqueness of the digital identity ID and avoid conflicts, the acquired idle proportion reflects the degree of the storage space of the target production attribute of the products that can still record different information quantities, and the storage space of the target production attribute is adjusted. Combined with the attribute bit code of each production attribute of each product, the digital identity ID of each product is generated, the uniqueness of the digital identity ID is ensured, and the effect of the generation of the digital identity ID of the product is improved. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, and the advantages thereof, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor based on these drawings.
[0038] Figure 1 A flow chart of a dynamic generation method of a product anti-counterfeiting encryption digital identity ID provided by an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to further clarify the technical means and effects taken by the present application to achieve the predetermined inventive purpose, the following describes in detail the specific implementation, structure, features and effects of a dynamic generation method for product anti-counterfeiting encrypted digital identity ID according to the present application, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0041] The specific scheme of the dynamic generation method for product anti-counterfeiting encrypted digital identity ID provided by the present application is described in detail below in combination with the accompanying drawings.
[0042] Please refer to Figure 1 which shows a flow chart of a dynamic generation method for product anti-counterfeiting encrypted digital identity ID provided by an embodiment of the present application, which method comprises:
[0043] Step S1: Obtain attribute bit codes of different production attributes of each product in the production process.
[0044] In the production process of the product, multiple production attributes need to be assigned to the product to record the production information of each product, for example, including the production date, production batch, product number, equipment name, operator number, etc. of the product, and the specific values (for example, the specific production date of a product) corresponding to these production attributes of the product are usually saved in the database in the form of binary code. Therefore, the attribute bit codes of different production attributes of each product are extracted from the database in the embodiment of the present application, wherein the attribute bit code of a certain production attribute is the bit code or binary code corresponding to the specific value of the production attribute, for example, the production date of a certain product is January 2024, and the attribute bit code of the production date of the product is the binary code corresponding to January 2024.
[0045] It should be noted that for a certain specific production attribute, for example, the production date, there may be multiple products with the same production date, that is, there are multiple products with the same attribute bit code of a certain specific production attribute, and each production attribute has a specific storage space length, the length of the storage space of a certain production attribute is equal to the length of the attribute bit code of the production attribute, and the length of the attribute bit code of a certain specific production attribute of each product is the same.
[0046] Step S2: taking any one production attribute as a target production attribute, classifying all products according to the differences of the attribute bit codes of the target production attributes of the products, obtaining a plurality of product categories; obtaining the coding chaos degree of the target production attribute according to the distribution of the number of products in each product category; extracting the longest common substring of the attribute bit codes of the target production attributes of all products, and adjusting the coding chaos degree of the target production attribute according to the difference between the length of the longest common substring and the length of the attribute bit code of the target production attribute, to obtain the adjusted coding chaos degree of the target production attribute.
[0047] In the case of a large number of products, the information of some production attributes of each product is the same or similar, resulting in a large amount of repeated information in the attribute bit codes of part of the production attributes of each product, and further resulting in the subsequent generated digital identity ID. Therefore, the embodiment of the present application first analyzes any one production attribute, takes any one production attribute as a target production attribute, and classifies all products according to the differences of the attribute bit codes of the target production attributes of the products, to obtain a plurality of product categories. In each product category, the attribute bit codes of the target production attributes of the products are the same, and the distribution characteristics of the attribute bit codes of the target production attributes of the products in each product category can be further analyzed based on the number distribution of the products in each product category.
[0048] The more inconsistent the number distribution of the products in each product category is, the more chaotic the distribution of the attribute bit codes of the target production attributes of the products is, and the more the storage space of the target production attribute needs to be expanded in the subsequent to enhance the uniqueness and anti-collision property of the digital identity ID generation. Therefore, the coding chaos degree of the target production attribute can be obtained according to the number distribution of the products in each product category, and the coding chaos degree can preliminarily reflect the chaotic degree of the distribution of the attribute bit codes of the target production attributes of the products.
[0049] Preferably, in one embodiment of the present application, the method for obtaining the coding chaos degree of the target production attribute specifically comprises:
[0050] The number of products in each product category is taken as the numerator, the number of all products is taken as the denominator, the ratio value is taken as the number proportion of each product category, and the information entropy of the number proportions of all product categories is taken as the coding chaos degree of the target production attribute. The calculation of the information entropy is a technical means well known to those skilled in the art, and will not be described here.
[0051] Considering that attribute bit codes of target production attributes of partial products are different, but there are same sub-strings in the attribute bit codes of target production attributes of the products, for example, production dates of a product and another product are January, 2024 and February, 2024 respectively, the months of the two products are different, but the years are same, that is, the sub-string representing the year in the attribute bit codes of the production dates of the two products is same, and the same sub-string will cause the actual confusion degree of the attribute bit codes of target production attributes of the products to be relatively small, therefore, the embodiment of the present application needs to extract the longest common sub-string of the attribute bit codes of target production attributes of all products, and subsequently, based on the difference between the length of the longest common sub-string and the length of the storage space of the target production attribute, the coding confusion degree of the target production attribute calculated above can be further adjusted, wherein the extraction method of the longest common sub-string can be selected from the existing dynamic programming algorithm or generalized suffix tree algorithm, which is not limited here.
[0052] The longer the length of the longest common sub-string is relative to the length of the attribute bit code of the target production attribute (that is, the length of the storage space of the target production attribute), the lower the confusion degree of the distribution of the attribute bit codes of target production attributes of the products is, and then the coding confusion degree of the target production attribute calculated above needs to be adjusted to a greater extent, therefore, the coding confusion degree of the target production attribute can be adjusted according to the difference between the length of the longest common sub-string and the length of the attribute bit code of the target production attribute, to obtain the adjusted coding confusion degree of the target production attribute, to improve the accuracy of the analysis of the confusion degree of the distribution of the attribute bit codes of target production attributes of the products, and subsequently, based on the adjusted coding confusion degree, the storage space of the target production attribute can be expanded to enhance the uniqueness of the generation of the digital identity ID of the product, thereby improving the effect of the generation of the digital identity ID of the product.
[0053] Preferably, in one embodiment of the present application, the method for obtaining the adjusted coding confusion degree of the target production attribute specifically comprises:
[0054] The length of the longest common sub-string is taken as the numerator, the difference between the length of the attribute bit code of the target production attribute and the length of the longest common sub-string is taken as the denominator, and the ratio is normalized to limit the calculation result in the range of 0 to 1, thereby obtaining the adjustment coefficient of the target production attribute. Since the coding confusion degree of the target production attribute calculated above is larger than the actual situation, the larger the adjustment coefficient is, the more the coding confusion degree of the target production attribute needs to be adjusted.
[0055] In other embodiments of the present application, the length of the longest common sub-string can also be taken as the numerator, the length of the attribute bit code of the target production attribute can be taken as the denominator, and the ratio can be normalized, thereby obtaining the adjustment coefficient of the target production attribute, which is not limited here.
[0056] In an embodiment of the present application, the normalization processing can be specifically, for example, max-min normalization processing, and the normalization in the subsequent steps can all adopt max-min normalization processing, and in other embodiments of the present application, other normalization methods can be selected according to the specific range of values or the normalization processing can be implemented using an activation function and a hyperbolic tangent function, which will not be described and limited again.
[0057] As an example, in an embodiment of the present application, the expression of the adjustment coefficient of the target production attribute can be specifically, for example:
[0058]
[0059] wherein, represents the adjustment coefficient of the target production attribute; represents the length of the longest common substring; represents the length of the attribute bit code of the target production attribute; represents a normalization function, used for normalization processing.
[0060] Further, based on the adjustment coefficient of the target production attribute, the encoding disorder degree of the target production attribute is adjusted to obtain an adjusted encoding disorder degree of the target production attribute.
[0061] Preferably, in an embodiment of the present application, the method for obtaining the adjusted encoding disorder degree of the target production attribute further comprises:
[0062] The product value of the adjustment coefficient of the target production attribute and the encoding disorder degree is taken as the disorder adjustment amount of the target production attribute, and the difference between the encoding disorder degree of the target production attribute and the disorder adjustment amount is taken as the adjusted encoding disorder degree of the target production attribute.
[0063] As an example, in an embodiment of the present application, the expression of the adjusted encoding disorder degree of the target production attribute can be specifically, for example:
[0064]
[0065] wherein, represents the adjusted encoding disorder degree of the target production attribute; represents the encoding disorder degree of the target production attribute; represents the adjustment coefficient of the target production attribute.
[0066] Step S3: obtaining the idle proportion of the target production attribute according to the number of different attribute bit codes of the target production attribute and the length of the attribute bit code of the target production attribute; adjusting the length of the storage space of the target production attribute based on the adjusted encoding disorder degree and the idle proportion of the target production attribute, and obtaining the optimized space length of the target production attribute.
[0067] Due to the limited storage space of the target production attribute, the number of attribute bit codes that can be recorded by the target production attribute is also limited. When the number of products is too large, the digital identity ID of the product may be repeated. Therefore, in order to ensure the uniqueness of the digital identity ID and avoid conflicts, the idle proportion of the target production attribute is obtained according to the number of different attribute bit codes of the target production attribute and the length of the attribute bit code of the target production attribute in the embodiment of the application. The idle proportion reflects the degree to which the storage space of the target production attribute of the product can record different attribute bit codes. The idle proportion of the target production attribute and the adjusted encoding disorder degree can be combined to effectively expand the storage space of the target production attribute, avoid the attribute bit code of the target production attribute of each product from being repeated, and thus enhance the uniqueness of the digital identity ID of each product.
[0068] Preferably, in one embodiment of the application, the method for obtaining the idle proportion of the target production attribute specifically comprises:
[0069] Based on the calculation formula of the idle proportion, the idle proportion of the target production attribute is obtained. The calculation formula of the idle proportion is:
[0070]
[0071] wherein, represents the idle proportion of the target production attribute; represents the number of different attribute bit codes of the target production attribute; represents the length of the attribute bit code of the target production attribute.
[0072] Since the attribute bit code is binary coding, the number of different attribute bit codes of the target production attribute is represented by the number of bits of the attribute bit code. represents the number of all different attribute bit codes that can be represented by the target production attribute with the storage space length L, and represents the number of different attribute bit codes of the target production attribute of the existing product.
[0073] The more chaotic the distribution of the attribute bit code of the target production attribute of each product is, and the smaller the idle proportion of the target production attribute is, the greater the expansion of the storage space of the target production attribute needs to be, so as to avoid the repetition of the attribute bit code of the target production attribute of each product, thereby ensuring the uniqueness of the digital identity ID of each product and improving the generation effect of the digital identity ID. Therefore, the length of the storage space of the target production attribute can be adjusted based on the adjustment of the coding chaos degree and the idle proportion of the target production attribute, so as to obtain the optimized space length of the target production attribute.
[0074] Preferably, in an embodiment of the present application, the method for obtaining the optimized space length of the target production attribute specifically comprises:
[0075] The idle proportion of the target production attribute is negatively correlated, and the bit code emergency evaluation value of the target production attribute is obtained. The greater the bit code emergency evaluation value of the target production attribute is, the greater the expansion of the storage space of the target production attribute needs to be. Therefore, the bit code emergency evaluation value of the target production attribute and the adjustment of the coding chaos degree are comprehensively processed and normalized, and the calculation result is limited to , so as to obtain the length adjustment weight of the target production attribute.
[0076] In an embodiment of the present application, the sum or product of the bit code emergency evaluation value of the target production attribute and the adjustment of the coding chaos degree can be calculated to realize the comprehensive processing of the two, which is not limited herein.
[0077] As an example, in an embodiment of the present application, the expression of the length adjustment weight of the target production attribute can be specifically, for example:
[0078]
[0079] Wherein, represents the length adjustment weight of the target production attribute; represents the adjustment of the coding chaos degree of the target production attribute; represents the idle proportion of the target production attribute; represents the bit code emergency evaluation value of the target production attribute; represents a normalization function for normalization processing; represents a preset first adjustment parameter for preventing the denominator from being 0, The value range of , in an embodiment of the present application, is set to 0.01, The specific value of may also be set by the implementer according to the specific implementation scene, which is not limited herein.
[0080] It should be noted that in other embodiments of the present application, the negative correlation mapping can also be realized by other basic mathematical operations, which are not described here.
[0081] Further, the length of the storage space of the target production attribute is extended based on the length adjustment weight of the target production attribute, to obtain an optimized space length of the target production attribute.
[0082] Preferably, in an embodiment of the present application, the method for obtaining the optimized space length of the target production attribute further comprises:
[0083] The product of the length adjustment weight of the target production attribute and the length of the attribute bit code of the target production attribute is taken as the storage length adjustment amount of the target production attribute, and the sum of the length of the attribute bit code of the target production attribute and the storage length adjustment amount is taken as the optimized space length of the target production attribute.
[0084] As an example, in an embodiment of the present application, the expression of the optimized space length of the target production attribute can be specifically, for example:
[0085]
[0086] wherein, represents the optimized space length of the target production attribute; represents the length of the attribute bit code of the target production attribute, that is, the length of the storage space of the target production attribute before adjustment; represents the length adjustment weight of the target production attribute.
[0087] The storage space of each production attribute can be extended by the same method, to obtain the optimized space length of each production attribute.
[0088] Step S4: generating the digital identity ID of each product based on the attribute bit code of each production attribute of each product and the optimized space length of each production attribute.
[0089] After the storage space of each production attribute of the product is extended, the digital identity ID of each product can be generated based on the attribute bit code of each production attribute of each product and the optimized space length of each production attribute, so as to enhance the uniqueness and anti-collision property of the generation of the digital identity ID of each product, thereby improving the generation effect of the digital identity ID.
[0090] Preferably, in an embodiment of the present application, the method for generating the digital identity ID of each product specifically comprises:
[0091] Taking any product as a target product, extending the length of the storage space of each production attribute of the target product to an optimization space length, and writing the attribute bit code of each production attribute of the target product into the extended storage space of each production attribute, using a digital identity ID generation algorithm to process the attribute bit code in the extended storage space of all production attributes of the target product, and generating the digital identity ID of the target product, wherein in an embodiment of the present application, the digital identity ID generation algorithm can be selected from existing hash algorithms, and in other embodiments of the present application, snowflake algorithms or other methods can also be selected, which are not limited herein.
[0092] The digital identity ID of each product can be generated by the same method as described above, and the uniqueness of the digital identity ID of each product is ensured.
[0093] It should be noted that the above-mentioned embodiment sequence of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.
[0094] Each embodiment in the specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other, and each embodiment mainly describes the difference from other embodiments.
Claims
1. A dynamic generation method for product anti-counterfeit encryption digital identity (ID), characterized in that, The method comprises: acquiring attribute bit codes of different production attributes of each product in a production process; taking any one production attribute as a target production attribute, classifying all products according to differences in the attribute bit codes of the target production attribute of each product to obtain multiple product categories, and obtaining an encoding disorder degree of the target production attribute according to a distribution of the number of products in each product category; extracting a longest common substring of the attribute bit codes of the target production attribute of all products, and adjusting the encoding disorder degree of the target production attribute according to a difference between the length of the longest common substring and the length of the attribute bit code of the target production attribute to obtain an adjusted encoding disorder degree of the target production attribute; obtaining an idle proportion of the target production attribute according to the number of different attribute bit codes of the target production attribute and the length of the attribute bit code of the target production attribute, and adjusting the length of the storage space of the target production attribute based on the adjusted encoding disorder degree and the idle proportion of the target production attribute to obtain an optimized space length of the target production attribute; generating a digital identity ID of each product based on the attribute bit codes of each production attribute of each product and the optimized space length of each production attribute; the obtaining of the encoding disorder degree of the target production attribute comprises: taking the number of products in each product category as a numerator and the number of all products as a denominator, and taking a ratio value as a quantity proportion of each product category; taking an information entropy of the quantity proportion of all product categories as the encoding disorder degree of the target production attribute; the obtaining of the adjusted encoding disorder degree of the target production attribute comprises: taking the length of the longest common substring as a numerator and a difference between the length of the attribute bit code of the target production attribute and the length of the longest common substring as a denominator, and performing normalization processing on a ratio value to obtain an adjustment coefficient of the target production attribute; adjusting the encoding disorder degree of the target production attribute based on the adjustment coefficient of the target production attribute to obtain the adjusted encoding disorder degree of the target production attribute; the obtaining of the idle proportion of the target production attribute comprises: obtaining the idle proportion of the target production attribute based on an idle proportion calculation formula, and the idle proportion calculation formula is: wherein, represents an idle occupancy ratio of the target production attribute; represents a number of attribute bit codes different from each other of the target production attribute; represents a length of the attribute bit code of the target production attribute; the obtaining of the optimized space length of the target production attribute comprises: performing negative correlation mapping on the idle proportion of the target production attribute to obtain a bit code emergency evaluation value of the target production attribute; performing comprehensive processing on the bit code emergency evaluation value and the adjusted encoding disorder degree of the target production attribute and performing normalization processing to obtain a length adjustment weight of the target production attribute; and expanding the length of the storage space of the target production attribute based on the length adjustment weight of the target production attribute to obtain the optimized space length of the target production attribute.
2. A dynamic generation method for product anti-fake encryption digital identity ID according to claim 1, characterized in that, the adjusting of the encoding disorder degree of the target production attribute based on the adjustment coefficient of the target production attribute to obtain the adjusted encoding disorder degree of the target production attribute comprises: taking a product value of the adjustment coefficient of the target production attribute and the encoding disorder degree as a disorder degree adjustment amount of the target production attribute. The difference between the encoding disorder degree of the target production attribute and the disorder adjustment amount is taken as an adjusted encoding disorder degree of the target production attribute.
3. The dynamic generation method for product anti-fake encryption digital ID according to claim 1, characterized in that, The length adjustment weight based on the target production attribute is used to expand the length of the storage space of the target production attribute, to obtain an optimized space length of the target production attribute, which includes: The product of the length adjustment weight of the target production attribute and the length of the attribute bit code of the target production attribute is taken as a storage length adjustment amount of the target production attribute. The sum of the length of the attribute bit code of the target production attribute and the storage length adjustment amount is taken as the optimized space length of the target production attribute.
4. The dynamic generation method for product anti-fake encryption digital ID according to claim 1, characterized in that, The generation of the digital identity ID of each product includes: Any one product is taken as a target product, the length of the storage space of each production attribute of the target product is expanded to the optimized space length, the attribute bit code of each production attribute of the target product is written into the expanded storage space of each production attribute, the attribute bit code in the expanded storage space of all production attributes of the target product is processed using a digital identity ID generation algorithm, and the digital identity ID of the target product is generated.
5. A dynamic generation method for product anti-counterfeit encryption digital identity ID according to claim 4, characterized in that, The digital identity ID generation algorithm is a hash algorithm.
6. The dynamic generation method for product anti-fake encryption digital ID according to claim 1, characterized in that, The obtaining of the multiple product categories includes: Products with the same attribute bit code of the target production attribute are divided into the same category, and the multiple product categories are obtained. The difference between the encoding disorder degree of the target production attribute and the disorder adjustment amount is taken as an adjusted encoding disorder degree of the target production attribute. The length adjustment weight based on the target production attribute is used to expand the length of the storage space of the target production attribute, to obtain an optimized space length of the target production attribute, which includes: The product of the length adjustment weight of the target production attribute and the length of the attribute bit code of the target production attribute is taken as a storage length adjustment amount of the target production attribute. The sum of the length of the attribute bit code of the target production attribute and the storage length adjustment amount is taken as the optimized space length of the target production attribute. The generation of the digital identity ID of each product includes: Any one product is taken as a target product, the length of the storage space of each production attribute of the target product is expanded to the optimized space length, the attribute bit code of each production attribute of the target product is written into the expanded storage space of each production attribute, the attribute bit code in the expanded storage space of all production attributes of the target product is processed using a digital identity ID generation algorithm, and the digital identity ID of the target product is generated. The digital identity ID generation algorithm is a hash algorithm. The obtaining of the multiple product categories includes: Products with the same attribute bit code of the target production attribute are divided into the same category, and the multiple product categories are obtained.
Citation Information
Patent Citations
Commodity anti-counterfeiting code batch generation method
CN104680220A
Dynamic generation method and system of device ID, computer device and storage medium
CN112565479A