Two-dimensional code weight reduction method and two-dimensional code weight reduction system for batch production

By encrypting the preset text content and generating QR code materials with dynamic production information, the problems of duplication and information security in mass production of QR codes are solved, the uniqueness and information security of QR codes are realized, and data storage and management are optimized.

CN120218100AActive Publication Date: 2025-06-27北京蜂创科技有限公司
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202510296399.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-06-27
Estimated Expiration
2045-03-13

AI Technical Summary

Technical Problem

The prior art has duplication when mass production of QR codes, which affects its uniqueness, and the content of the QR code is not encrypted, which poses a risk of information confusion and tampering.

Method used

By obtaining the preset text content for encryption, combining dynamic production information to generate QR code materials, and analyzing and generating initial QR codes through the QR code generator, traversing in the distributed storage database, denoting as the target QR code when it meets the constraints of the predetermined conditions, and storage according to the predetermined distributed storage strategy.

Benefits of technology

It effectively avoids duplicate generation of QR codes, significantly improves the uniqueness of QR codes, ensures information security, reduces the risk of information leakage, and meets the needs of dynamic content updates, and optimizes data storage and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218100A_ABST
    Figure CN120218100A_ABST
Patent Text Reader

Abstract

The invention discloses a two-dimensional code weight reduction method and a two-dimensional code weight reduction system for batch production, and relates to the technical field of two-dimensional codes, and the method comprises the steps: carrying out the encryption of preset text content, and obtaining encrypted text content; obtaining dynamic production information, and obtaining a two-dimensional code material; performing analysis through a two-dimensional code generator to obtain an initialized two-dimensional code; traversing in the distributed storage database to obtain a traversing result; when the traversal result accords with a predetermined condition constraint, marking the initialized two-dimensional code as a target two-dimensional code of the preset text content; and storing the target two-dimensional code to the distributed storage database according to a predetermined distributed storage strategy. According to the method and the device, the technical problems that in the prior art, the two-dimensional codes are easy to repeat in batch production, and the information security is influenced can be solved, the problems of repetition, security and dynamic updating in the existing two-dimensional code batch production process are solved, and the application value and the management efficiency of the two-dimensional codes are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of two-dimensional codes, and particularly to a method and system for reducing the weight of two-dimensional codes for mass production. Background Art

[0002] In the wide application of two-dimensional codes, especially in mass production scenarios, ensuring the uniqueness and information security of two-dimensional codes is crucial. However, there are many problems in the existing technology during the mass production of two-dimensional codes. Among them, the phenomenon of duplicate two-dimensional codes is relatively common, especially in large-scale production, and there is a lack of an effective de-duplication mechanism. Further, due to the duplication of two-dimensional codes, the security of two-dimensional code information is insufficient, which is prone to information leakage. In addition, it is difficult for the existing technology to dynamically update the content of two-dimensional codes, and it is difficult to meet real-time and personalized requirements. These problems not only affect the user experience of two-dimensional codes, but also may lead to chaotic data management and security risks.

[0003] In summary, during the mass production of two-dimensional codes, the duplication phenomenon of the generated two-dimensional codes seriously affects their uniqueness, and due to the unencrypted content of the two-dimensional codes, there are technical problems of information confusion and tampering. Summary of the Invention

[0004] The purpose of this application is to provide a method and system for reducing the weight of two-dimensional codes for mass production, so as to solve the technical problems that during the mass production of two-dimensional codes, the duplication phenomenon of the generated two-dimensional codes seriously affects their uniqueness, and due to the unencrypted content of the two-dimensional codes, there are information confusion and tampering.

[0005] In view of the above problems, this application provides a method and system for reducing the weight of two-dimensional codes for mass production.

[0006] In a first aspect, this application provides a method for reducing the weight of two-dimensional codes for mass production. The method for reducing the weight of two-dimensional codes for mass production is implemented through a system for reducing the weight of two-dimensional codes for mass production. Among them, the method for reducing the weight of two-dimensional codes for mass production includes: obtaining preset text content, and performing encryption processing on the preset text content to obtain encrypted text content; obtaining dynamic production information, and adding the dynamic production information to the encrypted text content to obtain two-dimensional code materials; activating a two-dimensional code generator, and analyzing the two-dimensional code materials through the two-dimensional code generator to obtain an initialized two-dimensional code; traversing the initialized two-dimensional code in a distributed storage database to obtain a traversal result; when the traversal result meets the constraints of a predetermined condition, recording the initialized two-dimensional code as the target two-dimensional code of the preset text content; retrieving a predetermined distribution storage strategy, and storing the target two-dimensional code in the distributed storage database according to the predetermined distribution storage strategy.

[0007] In a second aspect, the present application also provides a QR code weight reduction system for mass production, which is used to execute the QR code weight reduction method for mass production as described in the first aspect. Among them, the QR code weight reduction system for mass production includes: a text encryption module, which is used to obtain preset text content and perform encryption processing on the preset text content to obtain encrypted text content; a material combination module, which is used to obtain dynamic production information and add the dynamic production information to the encrypted text content to obtain QR code materials; a QR code generation module, which is used to activate a QR code generator and analyze the QR code materials through the QR code generator to obtain an initialized QR code; a repeated analysis module, which is used to traverse the initialized QR code in a distributed storage database to obtain a traversal result; a repeated judgment module, which is used to record the initialized QR code as the target QR code of the preset text content when the traversal result meets the constraints of a predetermined condition; a QR code storage module, which is used to retrieve a predetermined distribution storage strategy and store the target QR code in the distributed storage database according to the predetermined distribution storage strategy.

[0008] One or more technical solutions provided in the present application have at least the following technical effects or advantages: By obtaining preset text content and encrypting the preset text content, encrypted text content is obtained; dynamic production information is obtained and added to the encrypted text content to obtain a two-dimensional code material; a two-dimensional code generator is activated, and the two-dimensional code material is analyzed through the two-dimensional code generator to obtain an initialized two-dimensional code; the initialized two-dimensional code is traversed in a distributed storage database to obtain a traversal result; when the traversal result meets the constraints of a predetermined condition, the initialized two-dimensional code is recorded as the target two-dimensional code of the preset text content; a predetermined distributed storage policy is retrieved, and the target two-dimensional code is stored in the distributed storage database according to the predetermined distributed storage policy. That is to say, first, the preset text content is obtained and encrypted, and then the dynamic production information is added to the encrypted text to form a two-dimensional code material. Then, the two-dimensional code generator is activated to analyze the material, generate an initialized two-dimensional code, and traverse it in the distributed storage database. If the traversal result meets the constraints of a predetermined condition, the initialized two-dimensional code is determined as the target two-dimensional code and stored in the database according to the predetermined distributed storage policy. By combining the encryption of the preset text content and the dynamic information, a unique two-dimensional code material is generated, effectively avoiding the generation of duplicate two-dimensional codes and significantly improving the uniqueness of the two-dimensional codes. At the same time, encrypting the preset text content ensures the security of the two-dimensional code information during generation and storage, reducing the risk of information leakage. In addition, the addition of dynamic production information enables the two-dimensional code to reflect the latest content in real time, meeting the application requirements in dynamic scenarios. Adopting a distributed storage policy optimizes the storage and management of two-dimensional code data, improves the query efficiency, and simplifies the data management process and reduces the management complexity through a unified storage policy and condition constraints.

[0009] The above description is only an overview of the technical solution of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of this application more obvious and understandable, the following specifically gives the specific implementation manners of this application. It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of this application, nor is it used to limit the scope of this application. Other features of this application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 is a schematic flowchart of a method for reducing the weight of two-dimensional codes for batch production of this application; Figure 2 is a schematic structural diagram of a system for reducing the weight of two-dimensional codes for batch production of this application.

[0011] Description of the reference numerals: 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 manners

[0012] By providing a QR code weight reduction method and a QR code weight reduction system for mass production, this application solves the technical problems that in the process of mass-producing QR codes, the repetition of generated QR codes seriously affects their uniqueness, and due to the lack of encryption of the QR code content, there are problems of information confusion and tampering. By combining the encryption of preset text content and dynamic information, unique QR code materials are generated, effectively avoiding the generation of duplicate QR codes and significantly improving the uniqueness of QR codes. At the same time, the preset text content is encrypted to ensure the security of QR code information during generation and storage, reducing the risk of information leakage. In addition, the addition of dynamic production information enables the QR code to reflect the latest content in real time, meeting the application requirements in dynamic scenarios. The distributed storage strategy is adopted to optimize the storage and management of QR code data, improve the query efficiency, and simplify the data management process and reduce the management complexity through a unified storage strategy and conditional constraints.

[0013] Next, the technical solutions in this application will 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, rather than all the embodiments of this application. It should be understood that this application is not limited by the example embodiments described here. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application. Additionally, it should be noted that for the sake of description, only parts related to this application are shown in the accompanying drawings rather than all of them.

[0014] Embodiment 1. Please refer to the attached Figure 1 drawings. This application provides a QR code weight reduction method for mass production. Among them, the method is applied to a QR code weight reduction system for mass production. The QR code weight reduction method for mass production specifically includes the following steps: Step P10: Obtain preset text content and perform encryption processing on the preset text content to obtain encrypted text content; specifically, by performing encryption processing on the preset text content, the security and uniqueness of the information are ensured. This processing method can effectively prevent the information from being tampered with or leaked during transmission and storage, and at the same time provide secure basic data for subsequent QR code generation.

[0015] First, obtain the preset text content, which contains the core information to be transmitted through the QR code. Then, encrypt these preset text contents. Convert the original text content into encrypted text content through an encryption algorithm, making the information more secure during subsequent processing and transmission. It should be noted that the encryption process not only enhances the confidentiality of the information but also provides uniqueness guarantee for subsequent QR code generation because the encrypted text content is difficult to be copied or tampered with. In this way, even during large-scale QR code generation, the risks of duplication and information leakage can be effectively avoided.

[0016] In summary, by encrypting the preset text content, the security and uniqueness of the information are achieved, providing a reliable basis for subsequent QR code generation and application. By encrypting the preset text content, this solution can achieve the confidentiality and integrity of the information, laying a foundation for the secure application of QR codes.

[0017] Step P20: Obtain the dynamic production information and add the dynamic production information to the encrypted text content to obtain the QR code material. Specifically, by combining the dynamic production information with the encrypted text content, the material for QR code generation is generated, aiming to endow the QR code with real-time and dynamic properties, enabling it to adapt to different production scenarios and personalized needs. First, obtain the dynamic production information, which usually includes production time, batch number, random sequence, or other data related to the production process. Then, add these dynamic production information to the already encrypted text content. This process generates a unique QR code material by integrating static encrypted text and dynamic production information. The introduction of dynamic information is one of the key innovations of this solution, making each QR code carry a unique identifier when generated. Even if the encrypted text content is the same, different dynamic information can ensure the uniqueness of the QR code. In addition, this combination method also provides stronger anti-counterfeiting ability for the QR code because the unpredictability of dynamic information increases the difficulty of the QR code being copied or tampered with. Obviously, the QR code material generated in this way not only has the security of information but also has a high degree of dynamicity and uniqueness, providing a solid foundation for subsequent QR code generation and application.

[0018] In summary, by combining the dynamic production information with the encrypted text content, not only the flexibility of the QR code is enhanced, but also the generated QR code material has uniqueness and dynamicity, thus realizing the personalization and security of the QR code in different production scenarios.

[0019] Step P30: Activate the QR code generator and analyze the QR code material through the QR code generator to obtain the initialized QR code. Furthermore, the QR code generator refers to the ZXing library.

[0020] Specifically, a two-dimensional code generator is used to analyze and process the two-dimensional code material that integrates dynamic production information and encrypted text content, so as to generate an initial two-dimensional code. This process not only realizes the conversion of information from text to two-dimensional code, but also ensures the efficiency and reliability of two-dimensional code generation by using the mature ZXing library as the generator.

[0021] First, activate the two-dimensional code generator, and then analyze the two-dimensional code material through the two-dimensional code generator. This analysis process involves the parsing of the encrypted text content and dynamic production information in the material to ensure that this information can be accurately converted into the two-dimensional code format. Among them, the two-dimensional code generator uses the ZXing library, which is a widely used open-source library and is selected because of its high efficiency and stability. The ZXing library can quickly process complex material information and generate two-dimensional codes that meet the standards. In this way, the generated initial two-dimensional code not only contains complete encrypted information and dynamic identifiers, but also has good reading performance. In addition, using the ZXing library also means the standardization and normalization of the generation process, further improving the quality and reliability of the two-dimensional code. Obviously, the initial two-dimensional code generated through the ZXing library can not only meet the needs of subsequent storage and application, but also provide strong guarantees for the uniqueness and security of the two-dimensional code.

[0022] In summary, by activating and using the ZXing library as a two-dimensional code generator, analyzing and processing the two-dimensional code material, an initial two-dimensional code is generated. This process not only ensures the accurate conversion of information, but also improves the generation efficiency and the quality of the two-dimensional code by using the mature ZXing library, laying a solid foundation for the wide application of the two-dimensional code.

[0023] Step P40: Traverse the initial two-dimensional code in the distributed storage database to obtain a traversal result; Specifically, by traversing the initialized QR codes in a distributed storage database, aiming to verify their uniqueness and compliance, it can effectively avoid the generation of duplicate QR codes. First, the generated initialized QR codes are imported into the distributed storage database for traversal operations. By comparing the initialized QR codes one by one in the database, it can detect whether there are duplicate or conflicting situations. During the traversal process, the architecture of the distributed storage database can give full play to its high efficiency and parallel processing capabilities, quickly completing the retrieval and comparison of massive amounts of data. Among them, the advantage of distributed storage is that it can disperse data storage on multiple nodes, thereby improving the data reading and writing speed and fault tolerance. In addition, in this way, the system can return the traversal results in a short time, providing timely feedback for subsequent QR code storage and applications. Obviously, this traversal mechanism based on distributed storage not only improves the efficiency of data processing but also provides strong guarantee for the uniqueness of QR codes.

[0024] In summary, by traversing the initialized QR codes in a distributed storage database, the verification of the uniqueness of QR codes and the optimization of data management are achieved.

[0025] Step P50: When the traversal result meets the constraints of predetermined conditions, record the initialized QR code as the target QR code of the preset text content; Specifically, by traversing the initialized QR codes in a distributed storage database and screening out the QR codes that meet the requirements according to the constraints of predetermined conditions, it ensures that the generated QR codes are unique and accurate. First, perform traversal operations on the initialized QR codes in the distributed storage database to obtain the traversal result. Then, judge the traversal result according to the pre-set condition constraints. These condition constraints usually include the uniqueness verification of QR codes, information integrity check, etc., to ensure that the screened QR codes meet the established standards. When the initialized QR code meets these predetermined conditions, the system confirms it as the target QR code. This process is the key link of the entire technical solution. Through strict condition constraints, the accuracy and uniqueness of the target QR code are ensured. By traversing the initialized QR codes in a distributed storage database and screening out the target QR codes according to the constraints of predetermined conditions, the verification of the uniqueness and accuracy of QR codes is achieved.

[0026] Step P60: Retrieve the predetermined distributed storage strategy and store the target QR code into the distributed storage database according to the predetermined distributed storage strategy.

[0027] Specifically, by retrieving a predetermined distributed storage strategy, the verified target two-dimensional code is stored in the distributed storage database, thereby realizing the efficient management and optimized storage of two-dimensional code data. First, retrieve the pre-set distributed storage strategy, aiming to optimize the efficiency and reliability of data storage. Then store the target two-dimensional code in the distributed storage database. By dispersing the data storage on multiple nodes, not only the fault tolerance of the data is improved, but also fast data read and write operations can be achieved. Among them, the key of the distributed storage strategy lies in how to reasonably allocate the location and method of data storage to ensure data consistency and efficient access. By retrieving the predetermined distributed storage strategy and storing the target two-dimensional code in the distributed storage database, the efficient management and optimized storage of data are realized.

[0028] Furthermore, obtain dynamic production information and add the dynamic production information to the encrypted text content to obtain a two-dimensional code material, including: Extract the first dynamic information from the dynamic production information; Add the first dynamic information to the encrypted text content to obtain a first material; Record the first material as the two-dimensional code material; Wherein, the dynamic production information at least includes a dynamic timestamp, a dynamic random number or a dynamic unique identifier.

[0029] Specifically, by extracting the first dynamic information from the dynamic production information and combining it with the encrypted text content, a basic material for two-dimensional code generation is generated. This not only enhances the dynamics and uniqueness of the two-dimensional code, but also ensures the personalization and security of the two-dimensional code in different production scenarios by introducing dynamic elements such as timestamps, random numbers or unique identifiers, providing a high-quality data basis for subsequent two-dimensional code generation and application.

[0030] First, extract the first dynamic information from the dynamic production information. These dynamic information usually contain key elements such as dynamic timestamps, dynamic random numbers or dynamic unique identifiers, providing unique dynamic features for the two-dimensional code. Then add the extracted first dynamic information to the already encrypted text content to form a first material. This process ensures the uniqueness and dynamics of the two-dimensional code material by combining static encrypted text and dynamic information. Then record the generated first material as the two-dimensional code material to prepare for subsequent two-dimensional code generation. Among them, the dynamic timestamp can record the generation time, the dynamic random number increases the randomness, and the dynamic unique identifier further ensures the uniqueness of the two-dimensional code. Obviously, the two-dimensional code material generated in this way not only has information security, but also has high dynamics and uniqueness, providing a solid foundation for subsequent two-dimensional code generation and application.

[0031] Further, after traversing the initialization QR code in the distributed storage database to obtain a traversal result, the following steps are also included: When the traversal result does not meet the constraints of the predetermined conditions, a re-production instruction is issued; Based on the re-production instruction, the second dynamic information in the dynamic production information is extracted, where 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 a second material; The second material is denoted as the QR code material.

[0032] Specifically, by triggering a re-production instruction when the traversal result does not meet the constraints of the predetermined conditions, new dynamic information is introduced to generate a new QR code material, thereby ensuring the uniqueness and compliance of the QR code. First, when the traversal result of the initialization QR code does not meet the constraints of the predetermined conditions, the system issues a re-production instruction. The issuance of this instruction is based on a strict judgment of the traversal result to ensure that only compliant QR codes can be accepted. Next, based on the re-production instruction, the second dynamic information in the dynamic production information is extracted. The second dynamic information refers to any dynamic information in the dynamic production information that is different from the dynamic information used for the first time, such as a new timestamp, random number, or unique identifier. In this way, by introducing new dynamic information, the system can re-generate a unique QR code material. 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 denoted as the new QR code material for subsequent QR code generation and verification processes. Obviously, this process effectively avoids the repetition and non-compliance of QR codes through the update and re-generation mechanism of dynamic information, ensuring the uniqueness and reliability of the QR codes.

[0033] In summary, by issuing a re-production instruction when the traversal result does not meet the constraints of the predetermined conditions and introducing new dynamic information to generate a new QR code material, the uniqueness and compliance verification of the QR code are achieved. It effectively solves the possible problems of repetition or non-compliance of the initialization QR code, and also enhances the flexibility and adaptability of QR code generation through the update of dynamic information, ensuring the reliability and efficiency of QR codes in large-scale production.

[0034] Further, traversing the initialization QR code in the distributed storage database to obtain a traversal result includes: Obtain a predetermined unit block length; Based on the predetermined unit block length and the preset text length of the preset text content, the preset text content is segmented to obtain a segmentation result; Extract the first segmentation block from the segmentation result and generate the first block two-dimensional code of the first segmentation block; Extract the first database from the distributed storage database, where the first database includes multiple historical two-dimensional codes; perform a comparative analysis on the first historical two-dimensional code and the first block two-dimensional code to obtain a first comparison result, where the first historical two-dimensional code refers to any one of the multiple historical two-dimensional codes; When the first comparison result meets a predetermined traversal constraint, use the first database as the target database; The initialized two-dimensional code traverses in the target database to obtain the traversal result.

[0035] Specifically, by obtaining a predetermined unit block length and segmenting the preset text content based on this length to generate segmented two-dimensional code blocks, and at the same time performing a comparative analysis in combination with the historical two-dimensional codes in the distributed storage database to ensure the uniqueness and compliance of the generated two-dimensional codes.

[0036] First, obtain a predetermined unit block length, which is preset according to the total length of the preset text content and is used to segment the longer text content into multiple blocks that meet the two-dimensional code capacity limit. Then, based on the predetermined unit block length and the total length of the preset text content, segment the preset text content to obtain a segmentation result. Next, extract the first segmentation block from the segmentation result and generate the first block two-dimensional code corresponding to this segmentation block. In addition, extract the first database containing multiple historical two-dimensional codes from the distributed storage database. To verify the uniqueness of the first block two-dimensional code, perform a comparative analysis on the first historical two-dimensional code and the first block two-dimensional code to obtain a first comparison result. Among them, the first historical two-dimensional code is arbitrarily selected from multiple historical two-dimensional codes. When the first comparison result meets a predetermined traversal constraint, determine the first database as the target database. Finally, the initialized two-dimensional code traverses in the target database to obtain the final traversal result.

[0037] In summary, by obtaining a predetermined unit block length to segment the preset text content and performing a comparative analysis in combination with the historical two-dimensional codes in the distributed storage database, the efficient generation and uniqueness verification of two-dimensional codes are realized. It not only improves the efficiency of two-dimensional code generation, but also effectively avoids the generation of duplicate two-dimensional codes through comparison with historical data, providing reliable technical support for the mass production of two-dimensional codes.

[0038] Furthermore, performing a comparative analysis on the first historical two-dimensional code and the first block two-dimensional code to obtain a first comparison result includes: Obtain the first historical block two-dimensional code set of the first historical two-dimensional code; Randomly extract any historical block two-dimensional code from the first historical block two-dimensional code set; Compare any of the historical block QR codes with the first block QR code to obtain the first comparison result.

[0039] 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, and then comparing and analyzing it with the first block QR code to verify the uniqueness and compliance of the generated QR code blocks. First, obtain the set of the first historical block QR codes corresponding to the first historical QR code. This set contains all the block QR codes after the segmentation of the first historical QR code, providing a comprehensive historical data basis for subsequent comparison and analysis. Then randomly extract any historical block QR code from the set of the first historical block QR codes. This random extraction process increases the randomness and coverage of the comparison, avoids omissions caused by fixed selection, and ensures the comprehensiveness and reliability of the comparison and analysis. Then compare the randomly extracted historical block QR code with the first block QR code to obtain the first comparison result. This comparison process is a key step in verifying the uniqueness of the first block QR code. By carefully comparing it with the historical block QR codes, it ensures that the generated QR code block is unique in the historical data. By obtaining the set of the first historical block QR codes, randomly extracting any historical block QR code from it, and comparing and analyzing it with the first block QR code, the accurate verification of the generated QR code block is achieved. It not only improves the efficiency of QR code block verification but also provides a strong guarantee for the uniqueness of the QR code.

[0040] Further, retrieve the predetermined distribution storage strategy and store the target QR code in the distributed storage database according to the predetermined distribution storage strategy, including: Extract the storage load evaluation function in the predetermined distribution storage strategy; Evaluate and screen the distributed storage database in combination with the storage load evaluation function to obtain a candidate database set; Extract the first candidate database from the candidate database set; Obtain the set of the first candidate block QR codes of the first candidate QR code in the first candidate database; Perform a similarity analysis on the set of the first candidate block QR codes and the set of target block QR codes of the preset text content formed based on the first block QR code to obtain the first candidate similarity; When the first candidate similarity reaches the predetermined similarity threshold, store the target QR code in the first candidate database.

[0041] Specifically, by extracting the storage load evaluation function in the predetermined distributed storage policy, the distributed storage database is evaluated and screened, and then a suitable candidate database is selected for storing the two-dimensional code. By comparing the similarity between the two-dimensional code block sets in the candidate database and the target two-dimensional code block set, it is ensured that duplicate and highly similar two-dimensional code blocks are avoided during storage, thereby optimizing the storage efficiency and ensuring the uniqueness and security of the data.

[0042] First, extract the storage load evaluation function in the predetermined distributed storage policy. This function is used to evaluate the current load situation of the distributed storage database to ensure the efficiency and stability of the storage operation. Then, combine the storage load evaluation function to evaluate and screen the distributed storage database to obtain a set of candidate databases. Based on the results of the load evaluation function, select a database with a lower load and better performance as the storage target to optimize the storage efficiency. Then, extract the first candidate database from the set of candidate databases and obtain the first candidate block two-dimensional code set of the first candidate two-dimensional code in this database. To verify the uniqueness of the target two-dimensional code, perform a similarity analysis on the first candidate block two-dimensional code set and the target block two-dimensional code set formed based on the first block two-dimensional code to obtain the first candidate similarity. This similarity analysis is a key step to ensure the uniqueness of the two-dimensional code. By comparing the two-dimensional code block sets, it is detected whether there are highly similar or duplicate situations. When the first candidate similarity reaches the predetermined similarity threshold, it indicates that the target two-dimensional code has sufficient differences from the two-dimensional codes in the candidate database, and the system then stores the target two-dimensional code in the first candidate database.

[0043] In summary, by extracting the storage load evaluation function to evaluate and screen the distributed storage database, and combining the similarity analysis to ensure the uniqueness of the target two-dimensional code, finally, the target two-dimensional code is stored in a suitable candidate database. This not only improves the reliability of the distributed storage but also provides technical support for the efficient management and application of two-dimensional codes.

[0044] Furthermore, combining the storage load evaluation function to evaluate and screen the distributed storage database, a set of candidate databases is obtained, including: Obtain any database in the distributed storage database; Evaluate and obtain any load value of the any database according to the storage load evaluation function; When the any load value is within the predetermined load threshold, add the any database to the set of candidate databases.

[0045] Specifically, by obtaining any database from the distributed storage database and quantitatively evaluating the load conditions of these databases using the storage load evaluation function, databases that meet the load requirements are screened out to construct a set of candidate databases.

[0046] First, obtain any database from the distributed storage database. This operation provides a basis for subsequent load evaluation. Then, evaluate the obtained arbitrary database according to the storage load evaluation function to obtain any load value of the database. The storage load evaluation function is the core tool in this process. By comprehensively considering multiple dimensions such as the storage capacity, read / write speed, and current load of the database, it quantifies a load value to measure the current load status of the database. When the obtained arbitrary load value is within the predetermined load threshold, it indicates that the load situation of the database meets the requirements, and then the arbitrary database is added to the candidate database set. This screening mechanism ensures that each database in the candidate database set has sufficient storage capacity and performance through the setting of the load threshold, thus providing a reliable storage environment for subsequent two-dimensional code storage operations. By obtaining an arbitrary database from the distributed storage database and quantitatively evaluating it according to the storage load evaluation function, databases that meet 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 the load balancing mechanism, providing a solid technical guarantee for the efficient storage of two-dimensional codes.

[0047] Furthermore, the expression of the storage load evaluation function is as follows: Among them, L(x) is the arbitrary load value of the arbitrary database x, CPU(x), Mem(x), and I / O(x) are the CPU utilization rate, memory utilization rate, and disk I / O of the arbitrary database x respectively, e is the adjustment factor, a, b, and c are the weight coefficients corresponding to the CPU utilization rate, memory utilization rate, and disk I / O respectively, and a + b + c = 1.

[0048] Specifically, Among them, L(x) is the arbitrary load value of the arbitrary database x, CPU(x), Mem(x), and I / O(x) are the CPU utilization rate, memory utilization rate, and disk I / O of the arbitrary database x respectively, e is the adjustment factor, a, b, and c are the weight coefficients corresponding to the CPU utilization rate, memory utilization rate, and disk I / O respectively, and a + b + c = 1.

[0049] In summary, the two-dimensional code weight reduction method for batch production provided by this application has the following technical effects: By obtaining the preset text content and encrypting the preset text content, an encrypted text content is obtained; obtaining dynamic production information and adding the dynamic production information to the encrypted text content to obtain a QR code material; activating a QR code generator and analyzing the QR code material 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 the constraints of a predetermined condition, recording the initial QR code as the target QR code of the preset text content; retrieving a predetermined distributed storage policy and storing the target QR code in the distributed storage database according to the predetermined distributed storage policy. That is to say, first, obtain the preset text content and encrypt it, and then add the dynamic production information to the encrypted text to form a QR code material. Then, activate the QR code generator to analyze the material, generate an initial QR code, and traverse it in the distributed storage database. If the traversal result meets the constraints of a predetermined condition, determine the initial QR code as the target QR code and store it in the database according to the predetermined distributed storage policy. By combining the encryption of the preset text content and the dynamic information, a unique QR code material is generated, effectively avoiding the generation of duplicate QR codes and significantly improving the uniqueness of the QR codes. At the same time, encrypting the preset text content ensures the security of the QR code information during generation and storage, reducing the risk of information leakage. In addition, the addition of dynamic production information enables the QR code to reflect the latest content in real time, meeting the application requirements in dynamic scenarios. Adopting a distributed storage policy optimizes the storage and management of QR code data, improves the query efficiency, and simplifies the data management process and reduces the management complexity through a unified storage policy and condition constraints.

[0050] Embodiment 2. Based on the same inventive concept as the QR code weight reduction method for batch production in the foregoing embodiment, the present application also provides a QR code weight reduction system for batch production. Please refer to the attached Figure 2 , the QR code weight reduction system for batch production includes: A text encryption module 11, which is used to obtain the preset text content and encrypt the preset text content to obtain an encrypted text content; A material combination module 12, which is used to obtain dynamic production information and add the dynamic production information to the encrypted text content to obtain a QR code material; A QR code generation module 13, which is used to activate a QR code generator and analyze the QR code material through the QR code generator to obtain an initial QR code; The repeated analysis module 14 is configured to traverse the initialized two-dimensional code in the distributed storage database to obtain a traversal result; the repeated judgment module 15 is configured to, when the traversal result meets the constraints of a predetermined condition, record the initialized two-dimensional code as the target two-dimensional code of the preset text content; The two-dimensional code storage module 16 is configured to retrieve a predetermined distributed storage policy and store the target two-dimensional code in the distributed storage database according to the predetermined distributed storage policy.

[0051] Furthermore, the material combination module 12 in the two-dimensional code weight reduction system for mass production is further configured to: extract the first dynamic information from the dynamic production information; add the first dynamic information to the encrypted text content to obtain a first material; record the first material as the two-dimensional code material; wherein, the dynamic production information at least includes a dynamic timestamp, a dynamic random number, or a dynamic unique identifier.

[0052] Furthermore, the two-dimensional code generation module 13 in the two-dimensional code weight reduction system for mass production is further configured to: the two-dimensional code generator refers to the ZXing library.

[0053] Furthermore, the two-dimensional code weight reduction system for mass production further includes a re-production module, and the re-production module is configured to: When the traversal result does not meet the constraints of the predetermined condition, issue a re-production instruction; extract the second dynamic information from the dynamic production information based on the re-production instruction, wherein the second dynamic information refers to any one of the dynamic information in the dynamic production information that is different from the first dynamic information; add the second dynamic information to the encrypted text content to obtain a second material; record the second material as the two-dimensional code material.

[0054] Furthermore, the repeated analysis module 14 in the two-dimensional code weight reduction system for mass production is further configured to: obtain a predetermined unit block length; divide the preset text content based on the predetermined unit block length and the preset text length of the preset text content to obtain a division result; extract the first division block from the division result and generate a first block two-dimensional code of the first division block; extract the first database from the distributed storage database, wherein the first database includes a plurality of historical two-dimensional codes; perform a comparative analysis on the first historical two-dimensional code and the first block two-dimensional code to obtain a first comparison result, wherein the first historical two-dimensional code refers to any one of the plurality of historical two-dimensional codes; when the first comparison result meets the predetermined traversal constraints, use the first database as the target database; the initialized two-dimensional code traverses in the target database to obtain the traversal result.

[0055] Further, the duplicate analysis module 14 in the QR code weight reduction system for mass production is further configured to: 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; compare the any historical block QR code with the first block QR code to obtain the first comparison result.

[0056] Further, the QR code storage module 16 in the QR code weight reduction system for mass production is further configured to: extract the storage load evaluation function in the predetermined distribution storage policy; combine the storage load evaluation function to evaluate and screen the distributed storage database 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 on the first candidate block QR code set and the target block QR code set of the preset text content formed based on the first block QR code to obtain the first candidate similarity; when the first candidate similarity reaches a predetermined similarity threshold, store the target QR code in the first candidate database.

[0057] Further, the QR code storage module 16 in the QR code weight reduction system for mass production is further configured to: obtain any database in the distributed storage database; evaluate and obtain any load value of the any database according to the storage load evaluation function; when the any load value is within a predetermined load threshold, add the any database to the candidate database set.

[0058] Further, the QR code storage module 16 in the QR code weight reduction system for mass production is further configured to: 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 rate, memory utilization rate, and disk I / O of any database x respectively, e is an adjustment factor, a, b, and c are the weight coefficients corresponding to the CPU utilization rate, memory utilization rate, and disk I / O respectively, and a + b + c = 1.

[0059] The embodiments in this specification are described in a progressive manner, and the key points of each embodiment are the differences from other embodiments. The foregoing Figure 1The QR code weight reduction method and specific examples for mass production in Embodiment 1 are equally applicable to the QR code weight reduction system for mass production in this embodiment. Through the foregoing detailed description of the QR code weight reduction method for mass production, those skilled in the art can clearly understand the QR code weight reduction system for mass production in this embodiment. Therefore, for the sake of simplicity of the specification, it will not be described in detail here. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0060] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0061] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A method for reducing the weight of a two-dimensional code for mass production, characterized in that: include: Obtaining a preset text content, and encrypting the preset text content to obtain an encrypted text content; Acquire dynamic production information, and add the dynamic production information to the encrypted text content to obtain a QR code material; Activate a QR code generator, and analyze the QR code material through the QR code generator to obtain an initialized QR code; Traversing the initialized two-dimensional code in the distributed storage database to obtain a traversal result; When the traversal result meets the predetermined condition constraint, the initialization two-dimensional code is recorded as the target two-dimensional code of the preset text content; A predetermined distributed storage strategy is retrieved, and the target two-dimensional code is stored in the distributed storage database according to the predetermined distributed storage strategy.

2. The method for reducing the weight of a two-dimensional code for mass production according to claim 1, characterized in that: The dynamic production information is obtained, and the dynamic production information is added to the encrypted text content to obtain a QR code material, including: Extracting first dynamic information from the dynamic production information; Adding the first dynamic information to the encrypted text content to obtain a first material; Recording the first material as the QR code material; The dynamic production information at least includes a dynamic timestamp, a dynamic random number or a dynamic unique identifier.

3. The method for reducing the weight of a two-dimensional code for mass production according to claim 1, characterized in that: The two-dimensional code generator refers to the ZXing library.

4. The method for reducing the weight of a two-dimensional code for mass production according to claim 2, characterized in that: After traversing the initialization two-dimensional code in the distributed storage database to obtain the traversal result, the method further includes: When the traversal result does not meet the predetermined condition constraint, issuing a re-production instruction; Extracting second dynamic information from the dynamic production information based on the re-production instruction, wherein the second dynamic information refers to any dynamic information from the dynamic production information that is different from the first dynamic information; Adding the second dynamic information to the encrypted text content to obtain a second material; The second material is recorded as the two-dimensional code material.

5. The method for reducing the weight of a two-dimensional code for mass production according to claim 1, characterized in that: Traversing the initialized two-dimensional code in the distributed storage database to obtain traversal results, including: Get the 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 of the first segmented block; Extracting a first database from the distributed storage database, wherein the first database includes a plurality of historical QR codes; performing a comparative analysis on the first historical QR code and the first block of QR codes to obtain a first comparison result, wherein the first historical QR code refers to any one of the plurality of historical QR codes; When the first comparison result satisfies a predetermined traversal constraint, taking the first database as a target database; The initialization two-dimensional code is traversed in the target database to obtain the traversal result.

6. The method for reducing the weight of a two-dimensional code for mass production according to claim 5, characterized in that: The first historical QR code is compared and analyzed with the first block of QR code to obtain a first comparison result, including: 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; The first comparison result is obtained by comparing the arbitrary historical block QR code with the first block QR code.

7. The method for reducing the weight of a two-dimensional code for mass production according to claim 5, characterized in that: Retrieving a predetermined distributed storage strategy, and storing the target two-dimensional code in the distributed storage database according to the predetermined distributed storage strategy, including: extracting a storage load evaluation function in the predetermined distributed storage strategy; Evaluate and screen the distributed storage database in combination with the storage load evaluation function to obtain a candidate database set; Extracting a first candidate database from the candidate database set; Obtain a first candidate block QR code set of the first candidate QR code in the first candidate database; Performing a similarity analysis on the first candidate block two-dimensional code set and the target block two-dimensional code set of the preset text content formed based on the first block two-dimensional code to obtain a first candidate similarity; When the first candidate similarity reaches a predetermined similarity threshold, the target two-dimensional code is stored in the first candidate database.

8. The method for reducing the weight of a two-dimensional code for mass production according to claim 7, characterized in that: The distributed storage database is evaluated and screened in combination with the storage load evaluation function to obtain a candidate database set, including: Obtain any database in the distributed storage database; Obtaining an arbitrary load value of the arbitrary database according to the storage load evaluation function; When the arbitrary load value is within a predetermined load threshold, the arbitrary database is added to the candidate database set.

9. The method for reducing the weight of a two-dimensional code for mass production according to claim 8, characterized in that: The expression of the storage load evaluation function is as follows: Wherein, L(x) is an arbitrary load value of the arbitrary database x, CPU(x), Mem(x) and I / O(x) are respectively the CPU utilization, memory utilization and disk I / O of the arbitrary database x, e is an adjustment factor, a, b and c are respectively the weight coefficients corresponding to the CPU utilization, memory utilization and disk I / O, and a+b+c=1.

10. A QR code weight reduction system for mass production, characterized in that: The two-dimensional code weight reduction system for mass production can execute the two-dimensional code weight reduction method for mass production as claimed in any one of claims 1 to 9, and the two-dimensional code weight reduction system for mass production includes: A text encryption module, which is used to obtain preset text content and encrypt the preset text content to obtain encrypted text content; A material combination module, which is used to obtain dynamic production information and add the dynamic production information to the encrypted text content to obtain a QR code material; A two-dimensional code generation module, which is used to activate a two-dimensional code generator and analyze the two-dimensional code material through the two-dimensional code generator to obtain an initialization two-dimensional code; A repetition analysis module, which is used to traverse the initialization two-dimensional code in the distributed storage database to obtain a traversal result; A repeat judgment module, which is used to record the initialization two-dimensional code as the target two-dimensional code of the preset text content when the traversal result meets the predetermined condition constraint; The two-dimensional code storage module is used to call a predetermined distributed storage strategy and store the target two-dimensional code in the distributed storage database according to the predetermined distributed storage strategy.

Citation Information

Patent Citations

  • Method for converting chemical fingerprint chromatography into two-dimensional code in traditional Chinese medicine quality tracing

    CN104376355A

  • Method and device for generating dynamic two-dimensional codes

    CN104424497A

  • Two-dimensional code manufacture method and system

    CN109272065A

  • A novel dynamic two-dimensional code anti-counterfeiting solution

    CN109726578A

  • Two-dimensional code central data management system

    CN111489000A