QR code deduplication methods and systems for mass production
By encrypting preset text content and combining it with dynamic information to generate QR code materials, and utilizing the ZXing library and distributed storage strategy, the problems of QR code duplication and security in mass production are solved, achieving uniqueness and efficient management.
Patent Information
- Application Number
- CN202510296399.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-03-13
AI Technical Summary
Existing technologies suffer from severe duplication during the mass production of QR codes, resulting in insufficient uniqueness, poor information security, difficulty in dynamic updates, and impact on user experience and data management.
By encrypting the preset text content and generating QR code materials in conjunction with dynamic production information, the ZXing library is used to generate initial QR codes, which are then traversed and stored in a distributed storage database. A distributed storage strategy is adopted to optimize management.
It effectively avoids the repeated generation of QR codes, improves uniqueness and security, meets the needs of dynamic applications, and optimizes data storage and management processes.
Smart Images

Figure CN120218100B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of QR code technology, and in particular to a QR code deduplication method and system for mass production. Background Technology
[0002] In the widespread application of QR codes, especially in mass production scenarios, ensuring the uniqueness and information security of QR codes is crucial. However, existing technologies suffer from numerous problems during QR code mass production. Among these, QR code duplication is quite common, particularly in large-scale production, where an effective deduplication mechanism is lacking. Furthermore, QR code duplication leads to insufficient security of QR code information, making it susceptible to information leakage. In addition, existing technologies struggle to dynamically update QR code content, failing to meet real-time and personalized requirements. These issues not only affect the user experience of QR codes but may also lead to chaotic data management and security risks.
[0003] In summary, the current mass production process of QR codes suffers from the problem of duplicate QR codes, which seriously affects their uniqueness. Furthermore, since the QR code content is not encrypted, there are technical problems of information confusion and tampering. Summary of the Invention
[0004] The purpose of this application is to provide a QR code deduplication method and system for mass production, in order to solve the technical problems of QR code duplication in the existing mass production process, which seriously affects the uniqueness of the generated QR codes, and information confusion and tampering due to the lack of encryption of QR code content.
[0005] In view of the above problems, this application provides a QR code deduplication method and a QR code deduplication system for mass production.
[0006] In a first aspect, this application provides a method for reducing the duplication of QR codes in mass production. This method is implemented through a system for reducing the duplication of QR codes in mass production. The method includes: acquiring preset text content and encrypting the preset text content to obtain encrypted text content; acquiring dynamic production information and adding the dynamic production information to the encrypted text content to obtain QR code materials; activating a QR code generator and analyzing the QR code materials through the QR code generator to obtain an initial QR code; traversing the initial QR code in a distributed storage database to obtain a traversal result; when the traversal result meets predetermined constraints, recording the initial QR code as the target QR code of the preset text content; retrieving a predetermined distributed storage strategy and storing the target QR code in the distributed storage database according to the predetermined distributed storage strategy.
[0007] Secondly, this application also provides a QR code deduplication system for mass production, used to execute the QR code deduplication method for mass production as described in the first aspect, wherein the QR code deduplication system for mass production includes: a text encryption module, used to acquire preset text content and encrypt the preset text content to obtain encrypted text content; a material combination module, used to acquire dynamic production information and add the dynamic production information to the encrypted text content to obtain QR code materials; a QR code generation module, used to activate a QR code generator and analyze the QR code materials through the QR code generator to obtain an initial QR code; a duplication analysis module, used to traverse the initial QR code in a distributed storage database to obtain a traversal result; a duplication judgment module, used to record the initial QR code as the target QR code of the preset text content when the traversal result meets a predetermined condition constraint; and a QR code storage module, used to retrieve a predetermined distributed storage strategy and store the target QR code in the distributed storage database according to the predetermined distributed storage strategy.
[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0009] The process involves: first, acquiring and encrypting preset text content to obtain encrypted text content; then, acquiring dynamic production information and adding it to the encrypted text content to obtain QR code materials; activating a QR code generator and analyzing the QR code materials to obtain an initial QR code; traversing the initial QR code in a distributed storage database to obtain a traversal result; when the traversal result meets predetermined constraints, the initial QR code is designated as the target QR code for the preset text content; and finally, retrieving a predetermined distributed storage strategy and storing the target QR code in the distributed storage database according to the predetermined distributed storage strategy. In other words, the process begins by acquiring and encrypting preset text content, then adding dynamic production information to the encrypted text to form QR code materials. Next, the QR code generator is activated to analyze the materials, generate an initial QR code, and traverse it in the distributed storage database. If the traversal result meets predetermined constraints, the initial QR code is identified as the target QR code and stored in the database according to a predetermined distributed storage strategy. By combining encrypted preset text content with dynamic information, unique QR code materials are generated, effectively avoiding the generation of duplicate QR codes and significantly improving their uniqueness. Simultaneously, the preset text content is encrypted to ensure the security of QR code information during generation and storage, reducing the risk of information leakage. Furthermore, the addition of dynamic production information allows the QR codes to reflect the latest content in real time, meeting the application needs of dynamic scenarios. A distributed storage strategy optimizes the storage and management of QR code data, improving query efficiency, and simplifies the data management process and reduces management complexity through a unified storage strategy and condition constraints.
[0010] The above description is merely an overview of the technical solution of this application. To better understand the technical means of this application and to facilitate its implementation according to the description, and to make the above and other objects, features, and advantages of this application more apparent, specific embodiments of this application are described below. It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent through the following description. Attached Figure Description
[0011] Figure 1 This is a flowchart illustrating the QR code deduplication method for mass production in this application;
[0012] Figure 2 This is a schematic diagram of the QR code weight reduction system used in mass production according to this application.
[0013] Explanation of reference numerals in the attached figures:
[0014] 11. Text encryption module; 12. Material combination module; 13. QR code generation module; 14. Duplicate analysis module; 15. Duplicate judgment module; 16. QR code storage module. Detailed Implementation
[0015] This application provides a QR code deduplication method and system for mass production, solving the technical problems of QR code duplication severely affecting uniqueness and information confusion and tampering due to unencrypted QR code content in existing mass production QR code systems. By combining encrypted preset text content with dynamic information, unique QR code materials are generated, effectively avoiding the generation of duplicate QR codes and significantly improving their uniqueness. Simultaneously, encrypting the preset text content ensures the security of QR code information during generation and storage, reducing the risk of information leakage. Furthermore, the addition of dynamic production information allows the QR code to reflect the latest content in real time, meeting the application needs of dynamic scenarios. A distributed storage strategy optimizes the storage and management of QR code data, improving query efficiency, and simplifies the data management process and reduces management complexity through a unified storage strategy and condition constraints.
[0016] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. It should be understood that this application is not limited to the exemplary embodiments described herein. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application. It should also be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all of them.
[0017] Example 1, please refer to the appendix. Figure 1 This application provides a method for reducing the duplication of QR codes in mass production. The method is applied to a QR code reduction system for mass production, and specifically includes the following steps:
[0018] Step P10: Obtain preset text content and encrypt it to obtain encrypted text content; specifically, encrypting the preset text content ensures the security and uniqueness of the information. This processing method effectively prevents information from being tampered with or leaked during transmission and storage, while providing secure basic data for subsequent QR code generation.
[0019] First, preset text content is obtained, containing the core information to be transmitted via QR code. Then, this preset text content is encrypted using an encryption algorithm, converting the original text into encrypted text, making the information more secure during subsequent processing and transmission. It's important to note that encryption not only enhances information confidentiality but also provides a unique guarantee for subsequent QR code generation, as the encrypted text content is difficult to copy or tamper with. In this way, even during large-scale QR code generation, the risks of duplication and information leakage can be effectively avoided.
[0020] In summary, by encrypting the preset text content, information security and uniqueness are achieved, providing a reliable foundation for subsequent QR code generation and application. By encrypting the preset text content, this scheme can ensure the confidentiality and integrity of information, laying the foundation for the secure application of QR codes.
[0021] Step P20: Obtain dynamic production information and add the dynamic production information to the encrypted text content to obtain QR code materials;
[0022] Specifically, by combining dynamic production information with encrypted text content, materials for QR code generation are generated, aiming to endow QR codes with real-time and dynamic characteristics, enabling them to adapt to different production scenarios and personalized needs. First, dynamic production information is acquired, typically including production time, batch number, random sequence, or other data related to the production process. Then, this dynamic production information is added to the already encrypted text content. This process generates unique QR code materials by fusing static encrypted text and dynamic production information. The introduction of dynamic information is one of the key innovations of this solution, ensuring that each QR code has a unique identifier upon generation, guaranteeing uniqueness even if the encrypted text content is the same. Furthermore, this combination provides stronger anti-counterfeiting capabilities, as the unpredictability of dynamic information increases the difficulty of copying or tampering with the QR code. Clearly, QR code materials generated in this way not only possess information security but also a high degree of dynamism and uniqueness, providing a solid foundation for subsequent QR code generation and application.
[0023] In summary, by combining dynamic production information with encrypted text content, not only is the flexibility of QR codes enhanced, but also the generation of unique and dynamic QR code materials is ensured, thereby achieving personalization and security of QR codes in different production scenarios.
[0024] Step P30: Activate the QR code generator and analyze the QR code material through the QR code generator to obtain the initial QR code;
[0025] Furthermore, the QR code generator refers to the ZXing library.
[0026] Specifically, a QR code generator is used to analyze and process QR code materials that integrate dynamic production information and encrypted text content, thereby generating an initial QR code. This process not only realizes the conversion of information from text to QR code, but also ensures the efficiency and reliability of QR code generation by using the mature ZXing library as the generator.
[0027] First, the QR code generator is activated, and then the QR code materials are analyzed using the generator. This analysis involves parsing the encrypted text content and dynamic production information within the materials, ensuring that this information can be accurately converted into QR code format. The QR code generator uses the ZXing library, a widely used open-source library chosen for its efficiency and stability. The ZXing library can quickly process complex material information and generate standard-compliant QR codes. Thus, the generated initial QR code not only contains complete encrypted information and dynamic identifiers but also possesses excellent readability. Furthermore, using the ZXing library signifies the standardization and normalization of the generation process, further improving the quality and reliability of the QR codes. Clearly, the initial QR codes generated by the ZXing library not only meet the needs of subsequent storage and application but also provide strong guarantees for the uniqueness and security of the QR codes.
[0028] In summary, by activating and utilizing the ZXing library as a QR code generator, and analyzing and processing QR code materials, an initial QR code was generated. This process not only ensured the accurate conversion of information but also improved generation efficiency and QR code quality by employing the mature ZXing library, laying a solid foundation for the widespread application of QR codes.
[0029] Step P40: Traverse the initialized QR code in the distributed storage database to obtain the traversal results;
[0030] Specifically, by traversing the initial QR codes in a distributed storage database, the system aims to verify their uniqueness and compliance, effectively preventing the generation of duplicate QR codes. First, the generated initial QR codes are imported into the distributed storage database for traversal. By comparing each initial QR code in the database, duplicates or conflicts can be detected. During the traversal, the architecture of the distributed storage database fully leverages its efficiency and parallel processing capabilities, quickly completing the retrieval and comparison of massive amounts of data. The advantage of distributed storage lies in its ability to distribute data across multiple nodes, thereby improving data read / write speed and fault tolerance. Furthermore, this method allows the system to return traversal results quickly, providing timely feedback for subsequent QR code storage and applications. Clearly, this distributed storage-based traversal mechanism not only improves data processing efficiency but also provides strong assurance for the uniqueness of QR codes.
[0031] In summary, by traversing the initial QR code in the distributed storage database, the uniqueness verification of the QR code and the optimization of data management are achieved.
[0032] Step P50: When the traversal result meets the predetermined condition constraints, the initial QR code is recorded as the target QR code of the preset text content;
[0033] Specifically, the system ensures the uniqueness and accuracy of generated QR codes by traversing the initial QR codes in a distributed storage database and filtering them according to predetermined constraints. First, the initial QR codes are traversed in the distributed storage database to obtain the traversal results. Then, the traversal results are judged according to pre-set constraints. These constraints typically include QR code uniqueness verification and information integrity checks to ensure that the filtered QR codes meet established standards. When an initial QR code meets these predetermined conditions, the system recognizes it as the target QR code. This process is the key link in the entire technical solution; through strict constraints, the accuracy and uniqueness of the target QR code are ensured. By traversing the initial QR codes in the distributed storage database and filtering the target QR codes according to predetermined constraints, the uniqueness and accuracy of the QR codes are verified.
[0034] Step P60: Retrieve the predetermined distributed storage strategy and store the target QR code in the distributed storage database according to the predetermined distributed storage strategy.
[0035] Specifically, by invoking a pre-defined distributed storage strategy, verified target QR codes are stored in a distributed storage database, thereby achieving efficient management and optimized storage of QR code data. First, a pre-set distributed storage strategy is invoked, designed to optimize data storage efficiency and reliability. Then, the target QR code is stored in the distributed storage database. By distributing data across multiple nodes, not only is data fault tolerance improved, but also fast data read and write operations are enabled. The key to the distributed storage strategy lies in how to rationally allocate the location and method of data storage to ensure data consistency and efficient access. By invoking the pre-defined distributed storage strategy and storing the target QR code in the distributed storage database, efficient data management and optimized storage are achieved.
[0036] Furthermore, dynamic production information is obtained and added to the encrypted text content to obtain QR code materials, including:
[0037] Extract the first dynamic information from the dynamic production information;
[0038] Add the first dynamic information to the encrypted text content to obtain the first material;
[0039] The first material is designated as the QR code material;
[0040] The dynamic production information includes at least a dynamic timestamp, a dynamic random number, or a dynamic unique identifier.
[0041] Specifically, by extracting the first dynamic information from dynamic production information and combining it with encrypted text content, basic materials for QR code generation are generated. This not only enhances the dynamism and uniqueness of the QR code, but also ensures the personalization and security of the QR code in different production scenarios by introducing dynamic elements such as timestamps, random numbers, or unique identifiers, providing a high-quality data foundation for subsequent QR code generation and application.
[0042] First, initial dynamic information is extracted from the dynamic production information. This dynamic information typically includes key elements such as dynamic timestamps, dynamic random numbers, or dynamic unique identifiers, providing unique dynamic characteristics for the QR code. Then, the extracted initial dynamic information is added to the already encrypted text content to form the first material. This process, by combining static encrypted text and dynamic information, ensures the uniqueness and dynamism of the QR code material. The generated first material is then recorded as the QR code material, preparing for subsequent QR code generation. The dynamic timestamp records the generation time, the dynamic random number adds randomness, and the dynamic unique identifier further ensures the uniqueness of the QR code. Clearly, QR code materials generated in this way not only possess information security but also a high degree of dynamism and uniqueness, providing a solid foundation for subsequent QR code generation and application.
[0043] Furthermore, after traversing the initialized QR code in the distributed storage database and obtaining the traversal results, the process also includes:
[0044] If the traversal result does not meet the predetermined condition constraint, a re-production instruction is issued;
[0045] Based on the re-production instruction, extract the second dynamic information from the dynamic production information, wherein the second dynamic information refers to any dynamic information in the dynamic production information that is different from the first dynamic information;
[0046] The second dynamic information is added to the encrypted text content to obtain the second material;
[0047] The second material is referred to as the QR code material.
[0048] Specifically, by triggering a re-production instruction when the traversal result does not meet predetermined constraints, new dynamic information is introduced to generate new QR code materials, thereby ensuring the uniqueness and compliance of the QR codes. First, when the traversal result of initializing the QR code does not meet predetermined constraints, the system issues a re-production instruction. This instruction is based on a strict judgment of the traversal result, ensuring that only compliant QR codes are accepted. Next, based on the re-production instruction, second dynamic information is extracted from the dynamic production information. This second dynamic information refers to any dynamic information in the dynamic production information that differs from the first used dynamic information, such as a new timestamp, random number, or unique identifier. By introducing this new dynamic information, the system can regenerate unique QR code materials. Then, the extracted second dynamic information is added to the encrypted text content to obtain a new QR code material—the second material. Finally, the second material is recorded as the new QR code material for subsequent QR code generation and verification processes. Clearly, this process, through the dynamic information update and regeneration mechanism, effectively avoids QR code duplication and non-compliance, ensuring the uniqueness and reliability of the QR codes.
[0049] In summary, by issuing a re-production instruction when the traversal result does not meet the predetermined constraints, and by introducing new dynamic information to generate new QR code materials, the uniqueness and conformity verification of QR codes are achieved. This effectively solves the problem of potential duplication or non-compliance of QR codes during initialization. Furthermore, by updating dynamic information, the flexibility and adaptability of QR code generation are enhanced, ensuring the reliability and efficiency of QR codes in large-scale production.
[0050] Furthermore, the initial QR code is traversed in the distributed storage database to obtain the traversal results, including:
[0051] Get the predetermined unit block length;
[0052] The preset text content is segmented based on the predetermined unit block length and the preset text length of the preset text content to obtain the segmentation result;
[0053] Extract the first segmentation block from the segmentation result and generate the first QR code of the first segmentation block;
[0054] Extract the first database from the distributed storage database, wherein the first database includes multiple historical QR codes; compare and analyze the first historical QR code with the first QR code block to obtain a first comparison result, wherein the first historical QR code refers to any one of the multiple historical QR codes;
[0055] When the first comparison result satisfies the predetermined traversal constraint, the first database is used as the target database;
[0056] The initialization QR code is traversed in the target database to obtain the traversal result.
[0057] Specifically, by obtaining a predetermined unit block length and segmenting the preset text content based on that length, segmented QR code blocks are generated. At the same time, historical QR codes in a distributed storage database are compared and analyzed to ensure the uniqueness and conformity of the generated QR codes.
[0058] First, a predetermined unit block length is obtained. This length is pre-set based on the total length of the preset text content and is used to divide longer text content into multiple blocks that meet the QR code capacity limit. Next, based on the predetermined unit block length and the total length of the preset text content, the preset text content is segmented to obtain the segmentation result. Then, the first segmented block is extracted from the segmentation result, and the first QR code corresponding to this segmented block is generated. Furthermore, a first database containing multiple historical QR codes is extracted from a distributed storage database. To verify the uniqueness of the first QR code, a comparison analysis is performed between the first historical QR code and the first QR code to obtain a first comparison result. The first historical QR code is arbitrarily selected from multiple historical QR codes. When the first comparison result satisfies a predetermined traversal constraint, the first database is determined as the target database. Finally, the QR code is initialized and traversed in the target database to obtain the final traversal result.
[0059] In summary, by segmenting the preset text content using a predetermined unit block length and comparing it with historical QR codes in a distributed storage database, efficient QR code generation and uniqueness verification are achieved. This not only improves the efficiency of QR code generation but also effectively avoids the generation of duplicate QR codes by comparing them with historical data, providing reliable technical support for the mass production of QR codes.
[0060] Furthermore, a comparative analysis is performed between the first historical QR code and the first QR code to obtain the first comparison result, including:
[0061] Obtain the first historical block QR code set of the first historical QR code;
[0062] Randomly extract any historical block QR code from the first historical block QR code set;
[0063] The first comparison result is obtained by comparing the QR code of any historical block with the QR code of the first block.
[0064] Specifically, by obtaining the set of historical block QR codes corresponding to the first historical QR code, and randomly extracting any historical block QR code from it, a comparative analysis is performed with the first QR code to verify the uniqueness and conformity of the generated QR code block. First, the set of first historical block QR codes corresponding to the first historical QR code is obtained. This set contains all block QR codes after the first historical QR code is segmented, providing a comprehensive historical data foundation for subsequent comparative analysis. Next, any historical block QR code is randomly extracted from the first historical block QR code set. This random extraction process increases the randomness and coverage of the comparison, avoiding omissions caused by fixed selections and ensuring the comprehensiveness and reliability of the comparative analysis. Then, the extracted arbitrary historical block QR code is compared with the first QR code to obtain the first comparison result. This comparison process is a key step in verifying the uniqueness of the first QR code. Through detailed comparison with historical block QR codes, the uniqueness of the generated QR code block in the historical data is ensured. By obtaining the set of first historical block QR codes, randomly extracting any historical block QR code from it, and comparing it with the first QR code, accurate verification of the generated QR code block is achieved. This not only improves the efficiency of QR code block verification, but also provides strong protection for the uniqueness of QR codes.
[0065] Further, retrieving a predetermined distributed storage strategy and storing the target QR code in the distributed storage database according to the predetermined distributed storage strategy includes:
[0066] Extract the storage load evaluation function from the predetermined distributed storage strategy;
[0067] The distributed storage databases are evaluated and screened using the storage load evaluation function to obtain a candidate database set;
[0068] Extract the first candidate database from the candidate database set;
[0069] Obtain the first candidate block QR code set from the first candidate database;
[0070] The first candidate block QR code set is compared with the target block QR code set based on the preset text content to obtain the first candidate similarity.
[0071] When the similarity of the first candidate reaches a predetermined similarity threshold, the target QR code is stored in the first candidate database.
[0072] Specifically, by extracting the storage load evaluation function from the predetermined distributed storage strategy, the distributed storage databases are evaluated and screened, and suitable candidate databases are selected for QR code storage. By comparing the similarity between the QR code block sets in the candidate databases and the target QR code block set, duplicate and highly similar QR code blocks are avoided during storage, thereby optimizing storage efficiency and ensuring the uniqueness and security of the data.
[0073] First, the storage load assessment function is extracted from the predetermined distributed storage strategy. This function evaluates the current load of the distributed storage database to ensure the efficiency and stability of storage operations. Next, the distributed storage databases are evaluated and filtered using the storage load assessment function to obtain a candidate database set. Based on the results of the load assessment function, databases with lower load and better performance are selected as storage targets, thereby optimizing storage efficiency. Then, a first candidate database is extracted from the candidate database set, and the first candidate block QR code set of the first candidate QR code in this database is obtained. To verify the uniqueness of the target QR code, a similarity analysis is performed between the first candidate block QR code set and the target block QR code set constructed based on the first block QR code to obtain the first candidate similarity. This similarity analysis is a crucial step in ensuring the uniqueness of the QR code; by comparing the QR code block sets, it detects whether there are highly similar or duplicate cases. When the first candidate similarity reaches a predetermined similarity threshold, it indicates that the target QR code has sufficient differences from the QR codes in the candidate database, and the system stores the target QR code in the first candidate database.
[0074] In summary, by extracting a storage load evaluation function to assess and filter distributed storage databases, and combining this with similarity analysis to ensure the uniqueness of the target QR code, the target QR code is ultimately stored in a suitable candidate database. This not only improves the reliability of distributed storage but also provides technical support for the efficient management and application of QR codes.
[0075] Furthermore, the distributed storage databases are evaluated and screened using the storage load evaluation function to obtain a candidate database set, including:
[0076] Obtain any database from the distributed storage database;
[0077] The arbitrary load value of any database is obtained by evaluating the storage load evaluation function.
[0078] When any load value is at a predetermined load threshold, the arbitrary database is added to the candidate database set.
[0079] Specifically, by obtaining arbitrary databases from distributed storage databases and using storage load assessment functions to quantitatively evaluate the load of these databases, databases that meet the load requirements are selected to construct a candidate database set.
[0080] First, an arbitrary database is retrieved from the distributed storage database, providing the foundation for subsequent load assessment. Next, the retrieved arbitrary database is evaluated using a storage load assessment function to obtain its arbitrary load value. This storage load assessment function is the core tool of this process; it quantifies a load value by comprehensively considering multiple dimensions such as storage capacity, read / write speed, and current load, measuring the database's current load status. When the evaluated arbitrary load value falls within a predetermined load threshold, it indicates that the database's load meets the requirements, and the arbitrary database is added to the candidate database set. This selection mechanism, through the setting of load thresholds, ensures that each database in the candidate database set has sufficient storage capacity and performance, thus providing a reliable storage environment for subsequent QR code storage operations. By retrieving any database from the distributed storage database and quantifying it using the storage load assessment function, databases meeting the load requirements are selected to construct the candidate database set. This not only optimizes the utilization efficiency of distributed storage resources but also ensures the stability and reliability of the system through a load balancing mechanism, providing a solid technical guarantee for the efficient storage of QR codes.
[0081] Furthermore, the expression for the storage load evaluation function is as follows:
[0082]
[0083] Where L(x) is any load value of any database x, CPU(x), Mem(x) and I / O(x) are the CPU utilization, memory utilization and disk I / O of any database x, respectively, e is an adjustment factor, a, b and c are the weight coefficients corresponding to CPU utilization, memory utilization and disk I / O, respectively, and a+b+c=1.
[0084] Specifically, Where L(x) is any load value of any database x, CPU(x), Mem(x) and I / O(x) are the CPU utilization, memory utilization and disk I / O of any database x, respectively, e is an adjustment factor, a, b and c are the weight coefficients corresponding to CPU utilization, memory utilization and disk I / O, respectively, and a+b+c=1.
[0085] In summary, the QR code deduplication method for mass production provided in this application has the following technical effects:
[0086] The process involves: first, acquiring and encrypting preset text content to obtain encrypted text content; then, acquiring dynamic production information and adding it to the encrypted text content to obtain QR code materials; activating a QR code generator and analyzing the QR code materials to obtain an initial QR code; traversing the initial QR code in a distributed storage database to obtain a traversal result; when the traversal result meets predetermined constraints, the initial QR code is designated as the target QR code for the preset text content; and finally, retrieving a predetermined distributed storage strategy and storing the target QR code in the distributed storage database according to the predetermined distributed storage strategy. In other words, the process begins by acquiring and encrypting preset text content, then adding dynamic production information to the encrypted text to form QR code materials. Next, the QR code generator is activated to analyze the materials, generate an initial QR code, and traverse it in the distributed storage database. If the traversal result meets predetermined constraints, the initial QR code is identified as the target QR code and stored in the database according to a predetermined distributed storage strategy. By combining encrypted preset text content with dynamic information, unique QR code materials are generated, effectively avoiding the generation of duplicate QR codes and significantly improving their uniqueness. Simultaneously, the preset text content is encrypted to ensure the security of QR code information during generation and storage, reducing the risk of information leakage. Furthermore, the addition of dynamic production information allows the QR codes to reflect the latest content in real time, meeting the application needs of dynamic scenarios. A distributed storage strategy optimizes the storage and management of QR code data, improving query efficiency, and simplifies the data management process and reduces management complexity through a unified storage strategy and condition constraints.
[0087] Example 2: Based on the same inventive concept as the QR code deduplication method for mass production in the foregoing examples, this application also provides a QR code deduplication system for mass production. Please refer to the appendix. Figure 2 The QR code deduplication system for mass production includes:
[0088] The text encryption module 11 is used to obtain preset text content and encrypt the preset text content to obtain encrypted text content.
[0089] The material combination module 12 is used to acquire dynamic production information and add the dynamic production information to the encrypted text content to obtain QR code materials;
[0090] The QR code generation module 13 is used to activate the QR code generator and analyze the QR code material through the QR code generator to obtain an initial QR code.
[0091] The duplicate analysis module 14 is used to traverse the initial QR code in the distributed storage database to obtain the traversal result; the duplicate judgment module 15 is used to record the initial QR code as the target QR code of the preset text content when the traversal result meets the predetermined condition constraints.
[0092] The QR code storage module 16 is used to retrieve a predetermined distributed storage strategy and store the target QR code in the distributed storage database according to the predetermined distributed storage strategy.
[0093] Furthermore, the material combination module 12 in the QR code weight reduction system for mass production is also used to: extract the first dynamic information from the dynamic production information; add the first dynamic information to the encrypted text content to obtain the first material; and record the first material as the QR code material; wherein the dynamic production information includes at least a dynamic timestamp, a dynamic random number, or a dynamic unique identifier.
[0094] Furthermore, the QR code generation module 13 in the QR code deduplication system for mass production is also used for: the QR code generator refers to the ZXing library.
[0095] Furthermore, the QR code deduplication system for mass production also includes a re-production module, which is used for:
[0096] When the traversal result does not meet the predetermined condition constraints, a re-production instruction is issued; based on the re-production instruction, the second dynamic information in the dynamic production information is extracted, wherein the second dynamic information refers to any dynamic information in the dynamic production information that is different from the first dynamic information; the second dynamic information is added to the encrypted text content to obtain the second material; the second material is recorded as the QR code material.
[0097] Furthermore, the duplicate analysis module 14 in the QR code deduplication system for mass production is also used for: obtaining a predetermined unit block length; segmenting the preset text content based on the predetermined unit block length and the preset text length of the preset text content to obtain a segmentation result; extracting a first segmented block from the segmentation result and generating a first QR code from the first segmented block; extracting a first database from the distributed storage database, wherein the first database includes multiple historical QR codes; performing a comparative analysis between the first historical QR code and the first QR code to obtain a first comparison result, wherein the first historical QR code refers to any one of the multiple historical QR codes; when the first comparison result satisfies a predetermined traversal constraint, using the first database as the target database; and traversing the initialized QR code in the target database to obtain the traversal result.
[0098] Furthermore, the duplicate analysis module 14 in the QR code deduplication system for mass production is also used to: obtain a first historical block QR code set of the first historical QR code; randomly extract any historical block QR code from the first historical block QR code set; and compare the arbitrary historical block QR code with the first block QR code to obtain the first comparison result.
[0099] Furthermore, the QR code storage module 16 in the QR code deduplication system for mass production is also used to: extract the storage load evaluation function from the predetermined distributed storage strategy; evaluate and filter the distributed storage database using the storage load evaluation function to obtain a candidate database set; extract the first candidate database from the candidate database set; obtain the first candidate block QR code set of the first candidate QR code in the first candidate database; perform similarity analysis between the first candidate block QR code set and the target block QR code set of the preset text content constructed based on the first block QR code to obtain a first candidate similarity; when the first candidate similarity reaches a predetermined similarity threshold, store the target QR code in the first candidate database.
[0100] Furthermore, the QR code storage module 16 in the QR code deduplication system for mass production is also used to: obtain any database in the distributed storage database; evaluate any load value of the arbitrary database according to the storage load evaluation function; and add the arbitrary database to the candidate database set when the arbitrary load value is at a predetermined load threshold.
[0101] Furthermore, the QR code storage module 16 in the QR code deduplication system for mass production is also used for: the expression of the storage load evaluation function is as follows: Where L(x) is any load value of any database x, CPU(x), Mem(x) and I / O(x) are the CPU utilization, memory utilization and disk I / O of any database x, respectively, e is an adjustment factor, a, b and c are the weight coefficients corresponding to CPU utilization, memory utilization and disk I / O, respectively, and a+b+c=1.
[0102] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Figure 1The QR code deduplication method and specific examples for mass production in Embodiment 1 are also applicable to the QR code deduplication system for mass production in this embodiment. Through the foregoing detailed description of the QR code deduplication method for mass production, those skilled in the art can clearly understand the QR code deduplication system for mass production in this embodiment. Therefore, for the sake of brevity, it will not be described in detail here. As the system disclosed in the embodiments corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant details can be found in the method section.
[0103] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0104] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of this application and its equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for reducing the duplication of QR codes in mass production, characterized in that, include: Obtain preset text content and encrypt the preset text content to obtain encrypted text content; Obtain dynamic production information and add the dynamic production information to the encrypted text content to obtain QR code materials; Activate the QR code generator and analyze the QR code material through the QR code generator to obtain an initial QR code; The initial QR code is traversed in the distributed storage database to obtain the traversal results; When the traversal result meets the predetermined condition constraints, the initial QR code is recorded as the target QR code of the preset text content; A predetermined distributed storage strategy is retrieved, and the target QR code is stored in the distributed storage database according to the predetermined distributed storage strategy; The initial QR code is traversed in the distributed storage database to obtain the traversal results, including: Get the predetermined unit block length; The preset text content is segmented based on the predetermined unit block length and the preset text length of the preset text content to obtain the segmentation result; Extract the first segmentation block from the segmentation result and generate the first QR code of the first segmentation block; Extract the first database from the distributed storage database, wherein the first database includes multiple historical QR codes; A first comparison result is obtained by comparing and analyzing the first historical QR code with the first QR code, wherein the first historical QR code refers to any one of the plurality of historical QR codes; When the first comparison result satisfies the predetermined traversal constraint, the first database is used as the target database; The initialization QR code is traversed in the target database to obtain the traversal result.
2. The QR code deduplication method for mass production according to claim 1, characterized in that, Obtain dynamic production information and add the dynamic production information to the encrypted text content to obtain QR code materials, including: Extract the first dynamic information from the dynamic production information; Add the first dynamic information to the encrypted text content to obtain the first material; The first material is designated as the QR code material; The dynamic production information includes at least a dynamic timestamp, a dynamic random number, or a dynamic unique identifier.
3. The QR code deduplication method for mass production according to claim 1, characterized in that, The QR code generator refers to the ZXing library.
4. The QR code deduplication method for mass production according to claim 2, characterized in that, After traversing the initialized QR code in the distributed storage database and obtaining the traversal results, the process also includes: If the traversal result does not meet the predetermined condition constraint, a re-production instruction is issued; Based on the re-production instruction, extract the second dynamic information from the dynamic production information, wherein the second dynamic information refers to any dynamic information in the dynamic production information that is different from the first dynamic information; The second dynamic information is added to the encrypted text content to obtain the second material; The second material is referred to as the QR code material.
5. The QR code deduplication method for mass production according to claim 1, characterized in that, A comparative analysis is performed between the first historical QR code and the first QR code to obtain the first comparison result, including: Obtain the first historical block QR code set of the first historical QR code; Randomly extract any historical block QR code from the first historical block QR code set; The first comparison result is obtained by comparing the QR code of any historical block with the QR code of the first block.
6. The QR code deduplication method for mass production according to claim 1, characterized in that, Retrieving a predetermined distributed storage strategy and storing the target QR code in the distributed storage database according to the predetermined distributed storage strategy includes: Extract the storage load evaluation function from the predetermined distributed storage strategy; The distributed storage databases are evaluated and screened using the storage load evaluation function to obtain a candidate database set; Extract the first candidate database from the candidate database set; Obtain the first candidate block QR code set from the first candidate database; The first candidate block QR code set is compared with the target block QR code set based on the preset text content to obtain the first candidate similarity. When the similarity of the first candidate reaches a predetermined similarity threshold, the target QR code is stored in the first candidate database.
7. The QR code deduplication method for mass production according to claim 6, characterized in that, The distributed storage databases are evaluated and screened using the storage load evaluation function to obtain a candidate database set, including: Obtain any database from the distributed storage database; The arbitrary load value of any database is obtained by evaluating the storage load evaluation function. When any load value is at a predetermined load threshold, the arbitrary database is added to the candidate database set.
8. The QR code deduplication method for mass production according to claim 7, characterized in that, The expression for the storage load evaluation function is as follows: Where L(x) is any load value of any database x, CPU(x), Mem(x) and I / O(x) are the CPU utilization, memory utilization and disk I / O of any database x, respectively, e is an adjustment factor, a, b and c are the weight coefficients corresponding to CPU utilization, memory utilization and disk I / O, respectively, and a+b+c=1.
9. A QR code deduplication system for mass production, characterized in that, The QR code deduplication system for mass production can execute the QR code deduplication method for mass production as described in any one of claims 1-8, and the QR code deduplication system for mass production includes: A text encryption module is used to obtain preset text content and encrypt the preset text content to obtain encrypted text content. The material combination module is used to acquire dynamic production information and add the dynamic production information to the encrypted text content to obtain QR code materials; A QR code generation module is used to activate the QR code generator and analyze the QR code material through the QR code generator to obtain an initial QR code. The duplicate analysis module is used to traverse the initialized QR code in the distributed storage database to obtain the traversal result; The duplicate detection module is used to record the initial QR code as the target QR code of the preset text content when the traversal result meets the predetermined condition constraints. A QR code storage module is used to retrieve a predetermined distributed storage strategy and store the target QR code in the distributed storage database according to the predetermined distributed storage strategy.
Citation Information
Patent Citations
Two-dimensional code manufacture method and system
CN109272065A
Packaging two-dimensional code processing method and system and storage medium
CN114154998A