A method and system for generating and printing intelligent digital two-dimensional codes applicable to multiple scenarios
Through segmented coding and layered construction of QR codes, combined with compression and encoding technology, the problem of missing information and difficult identification in the QR code generation process is solved, and efficient and reliable QR code generation suitable for multiple scenarios is achieved, improving Improve user experience and accuracy of information transmission.
Patent Information
- Application Number
- CN202410876298.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-02
AI Technical Summary
The QR code pattern generated by the existing digital QR code generation and printing method has a single structure, which is difficult to meet the needs of various application scenarios, and information is prone to be missing during the generation process, making it difficult for the scanning device to identify it.
By obtaining user needs and application scenario information, segmented coding and hierarchical construction of QR codes are used to arrange sub-QR codes in a diamond structure, combined with DEFLATE lossless compression algorithm and UTF-8 encoding to ensure information integrity and readability, and Detect QR code quality in different environments.
It improves the fault tolerance and information integrity of QR codes, meets the needs of various application scenarios, reduces scanning troubles, and improves user experience and the accuracy of information transmission.
Smart Images

Figure CN118410826B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of two-dimensional code generation and printing, and in particular to an intelligent digital two-dimensional code generation and printing method and system applicable to multiple scenarios. Background Art
[0002] The QR code generation and printing method and system is an innovative application that combines QR code technology with printing technology. Through this system, QR codes can be embedded in printed materials to realize functions such as information transmission and product traceability. In the background, with the development of digitalization and intelligence, people's demand for cross-platform information interaction has increased, and the emergence of QR codes has met this demand. Printed materials, as the main carrier of information dissemination, combined with QR code technology, not only improve the efficiency of information transmission, but also provide users with more diversified ways of interaction. The system is widely used in the packaging industry, advertising, cultural creativity and other fields, effectively promoting information sharing and business development.
[0003] The QR codes generated by the existing digital QR code generation and printing methods have a single pattern structure, and the QR codes are difficult to meet the needs of various application scenarios. At the same time, when the QR code generation and printing system generates QR codes in the corresponding field, it is difficult to ensure the quality of the generated QR codes. The generated QR codes are prone to missing information, which makes the information of the printed QR code incomplete and makes it difficult for scanning devices to recognize the QR code information. Therefore, it is necessary to provide an intelligent digital QR code generation and printing method and system suitable for multiple scenarios to solve the above-mentioned problems. Summary of the invention
[0004] In order to solve the above-mentioned technical problems, an intelligent digital QR code generation and printing method and system suitable for multiple scenarios are provided. This technical solution solves the problem that the QR code pattern structure generated by the existing digital QR code generation and printing method proposed in the above-mentioned background technology is single, and the QR code is difficult to meet the needs of various application scenarios. At the same time, when the QR code generation and printing system generates the QR code in the corresponding field, it is difficult to ensure the quality of the generated QR code, and the generated QR code is prone to missing information, so that the information of the printed QR code is incomplete, making it difficult for the scanning device to recognize the QR code information.
[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0006] A method for generating and printing intelligent digital two-dimensional codes applicable to multiple scenarios, comprising:
[0007] Obtain user demand information;
[0008] Acquire application scenario information according to user demand information, where the application scenario information is used to describe the scenario of product application;
[0009] According to the application scenario information, obtain the QR code type information;
[0010] According to the application scenario information and the two-dimensional code type information, structured information and error correction information are obtained, wherein the structured information is used to describe the data content actually encoded in the two-dimensional code;
[0011] According to the structured information, obtaining data encoding information;
[0012] Classify the data encoding information according to the application scenario information to obtain text encoding information, digital encoding information and link encoding information;
[0013] According to the text encoding information, the digital encoding information and the link encoding information, a first sub-QR code, a second sub-QR code and a third sub-QR code are obtained;
[0014] According to the first sub-QR code, the second sub-QR code and the third sub-QR code, basic pattern information of the QR code is obtained;
[0015] Obtain a sample QR code according to the QR code basic pattern information;
[0016] According to the display status of the sample QR code in different environments, different virtual environments are constructed, and the sample QR code is detected based on the different virtual environments.
[0017] In an optional embodiment, obtaining the QR code type information according to the application scenario information specifically includes:
[0018] According to the application scenario information, the information to be stored is obtained, and data cleaning is performed on the information to be stored;
[0019] Based on data normalization, the information to be stored after data cleaning is standardized to obtain standard format information;
[0020] According to the standard format information, obtaining the maximum information length;
[0021] Based on the data storage type requirements of the QR code, obtain the data capacity that can be stored by different types of QR codes;
[0022] According to the data capacity that can be stored in different types of QR codes, a data capacity threshold is obtained;
[0023] According to the data capacity threshold, it is determined whether the maximum information length meets the two-dimensional code data storage requirements. If not, the information to be stored is re-acquired. If so, the two-dimensional code type information matching the information to be stored is acquired.
[0024] In an optional embodiment, obtaining structured information and error correction information according to the application scenario information and the two-dimensional code type information specifically includes:
[0025] Obtain standard format information according to the application scenario information and the QR code type information;
[0026] Based on the QR code type information, the standard format information is encoded in UTF-8 to obtain structured information;
[0027] Based on the DEFLATE lossless compression algorithm, the structured information is compressed, and the length of the compressed information is calculated to obtain the maximum information parameter of the structured information;
[0028] Based on the analysis of the length of the coded information and the error correction level, the error correction parameters of different coded information lengths are obtained;
[0029] Obtaining error correction parameter thresholds according to error correction parameters of different coded information lengths;
[0030] According to the error correction parameter threshold, it is determined whether the maximum information parameter meets the standard. If not, the standard format information is re-acquired. If so, the error correction information is acquired.
[0031] In an optional embodiment, obtaining the first sub-QR code, the second sub-QR code and the third sub-QR code according to the text encoding information, the digital encoding information and the link encoding information specifically includes:
[0032] According to the user demand information, obtain QR code design information;
[0033] According to the two-dimensional code design information, obtain the two-dimensional code size information;
[0034] According to the two-dimensional code size information, obtain the maximum size information of the two-dimensional code, use one quarter of the maximum size of the two-dimensional code as the size of the first sub-two-dimensional code, the second sub-two-dimensional code and the third sub-two-dimensional code, and obtain the sub-two-dimensional code size information;
[0035] According to the sub-QR code size information, obtain the maximum information length of the sub-QR code;
[0036] According to the maximum information length of the sub-QR code, the minimum encoding information length is obtained;
[0037] According to the minimum coding information length, the text coding information, the digital coding information and the link coding information are segmented and split respectively to obtain text coding segment information, digital coding segment information and link coding segment information;
[0038] According to the minimum coding information length, the text coding segment information, the digital coding segment information and the link coding segment information are converted into a first sub-QR code, a second sub-QR code and a third sub-QR code respectively.
[0039] In an optional embodiment, obtaining the basic pattern information of the two-dimensional code according to the first sub-two-dimensional code, the second sub-two-dimensional code and the third sub-two-dimensional code specifically includes:
[0040] Based on the two-dimensional code detection device, the first sub-two-dimensional code, the second sub-two-dimensional code and the third sub-two-dimensional code are detected to obtain the sub-two-dimensional code quality index;
[0041] According to the user demand information, a standard index threshold is obtained;
[0042] Based on the standard index threshold, determine whether the sub-QR code quality index meets the standard; if not, obtain the first sub-QR code, the second sub-QR code and the third sub-QR code according to the text encoding information, the digital encoding information and the link encoding information; if yes, obtain the first core encoding pattern information, the second core encoding pattern information and the third core encoding pattern information according to the first sub-QR code, the second sub-QR code and the third sub-QR code;
[0043] According to the two-dimensional code design information, the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are arranged in a diamond structure to obtain the two-dimensional code basic pattern information.
[0044] In an optional embodiment, obtaining a sample two-dimensional code according to the two-dimensional code basic pattern information specifically includes:
[0045] Acquiring scene element feature information according to the application scene information;
[0046] According to the scene element feature information, acquiring pattern size parameters, pattern color parameters and pattern transparency parameters;
[0047] Based on the pattern design principle, the scene element feature information and the basic pattern information of the QR code are superimposed to obtain a feature QR code;
[0048] Based on the principle of QR code detection, the characteristic QR code is detected to obtain the characteristic QR code readability index;
[0049] According to the user demand information, a characteristic two-dimensional code readability index threshold is obtained;
[0050] According to the characteristic QR code readability index threshold, determine whether the characteristic QR code readability index meets the requirements. If not, obtain the pattern size parameters, pattern color parameters and pattern transparency parameters according to the scene element feature information, and then obtain the sample QR code based on the characteristic QR code.
[0051] In an optional embodiment, different virtual environments are constructed according to the display status of the sample QR code in different environments, and the sample QR code is detected based on the different virtual environments, specifically including:
[0052] According to the display status of the sample QR code in different environments, construct the indoor environment and outdoor environment, and obtain the indoor environment information and outdoor environment information;
[0053] Acquire an indoor ambient light index and an outdoor ambient light index according to the indoor ambient information and the outdoor ambient information;
[0054] According to the indoor ambient light index and the outdoor ambient light index, respectively simulate the display state of the sample QR code under different angle parameters, and detect the sample QR code to obtain the sample QR code quality index;
[0055] According to user demand information, obtain the sample QR code quality index threshold;
[0056] According to the sample QR code quality index threshold, determine whether the quality index of the sample QR code meets the standard. If not, obtain the sample QR code based on the feature QR code. If so, print the sample QR code based on the printing information.
[0057] Furthermore, a multi-scenario applicable intelligent digital two-dimensional code generation and printing system is proposed, which is used to implement any of the above-mentioned two-dimensional code generation and printing methods, including:
[0058] An information acquisition module, wherein the information acquisition module is used to acquire user demand information, application scenario information, two-dimensional code type information, structured information, error correction information, data encoding information, text encoding information, digital encoding information, link encoding information, information to be stored, standard format information, maximum information length, data capacity, data capacity threshold, maximum information parameter, error correction parameter, error correction parameter threshold, two-dimensional code design information, two-dimensional code size information, two-dimensional code maximum size information, sub-two-dimensional code size information, sub-two-dimensional code maximum information length, minimum encoding information length, text encoding segmentation information, digital encoding segmentation information, link encoding segmentation information, first sub-two-dimensional code, second sub-two-dimensional code, third sub-two-dimensional code, sub-two-dimensional code quality index, standard index threshold, first core encoding pattern information, second core encoding pattern information, third core encoding pattern information, two-dimensional code basic pattern information, scene element feature information, pattern size parameter, pattern color parameter, pattern transparency parameter, feature two-dimensional code, feature two-dimensional code readability index, feature two-dimensional code readability index threshold, indoor environment information, outdoor environment information, indoor environment light index, outdoor environment light index, sample two-dimensional code quality index and sample two-dimensional code quality index threshold;
[0059] The main control module is used to classify the data encoding information according to the application scenario information, normalize the information to be stored after data cleaning based on data normalization, determine whether the maximum information length meets the two-dimensional code data storage requirements based on the data capacity threshold, encode the standard format information in UTF-8 based on the two-dimensional code type information, determine whether the maximum information parameter meets the standard based on the error correction parameter threshold, and segment the text encoding information, digital encoding information and link encoding information according to the minimum encoding information length. The coding segment information and the linked coding segment information are respectively converted into the first sub-QR code, the second sub-QR code and the third sub-QR code, and based on the standard index threshold, whether the sub-QR code quality index meets the standard is judged, and according to the QR code design information, the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are arranged in a diamond structure, and based on the pattern design principle, the scene element feature information and the QR code basic pattern information are superimposed, and according to the feature QR code readability index threshold, whether the feature QR code readability index meets the requirements is judged, and according to the sample QR code quality index threshold, whether the quality index of the sample QR code meets the standard is judged;
[0060] A detection module, the detection module is used to detect the first sub-QR code, the second sub-QR code and the third sub-QR code based on the QR code detection device, detect the characteristic QR code based on the QR code detection principle, construct indoor environment and outdoor environment according to the display state of the sample QR code in different environments, simulate the display state of the sample QR code under different angle parameters according to the indoor environment light index and the outdoor environment light index, and detect the sample QR code;
[0061] A display module, which interacts with the main control module and the detection module, and is used to display the control panel and the generation process of the sample QR code, and is used to display the images of the sample QR code in indoor and outdoor environments constructed by the detection module according to the display status of the sample QR code in different environments;
[0062] A printing module is used to print the final sample QR code that meets the user's needs onto the corresponding product.
[0063] In an optional embodiment, the main control module includes:
[0064] A data processing unit, the data processing unit is used to classify the data encoding information according to the application scenario information, normalize the information to be stored after data cleaning based on data normalization, encode the standard format information in UTF-8 based on the two-dimensional code type information, and segment and split the text encoding information, digital encoding information and link encoding information according to the minimum encoding information length, arrange the first core encoding pattern information, the second core encoding pattern information and the third core encoding pattern information in a diamond structure according to the two-dimensional code design information, and superimpose the scene element feature information and the two-dimensional code basic pattern information based on the pattern design principle;
[0065] A conversion unit, the conversion unit being used to convert the text coding segment information, the digital coding segment information and the link coding segment information into a first sub-two-dimensional code, a second sub-two-dimensional code and a third sub-two-dimensional code respectively according to the minimum coding information length;
[0066] A judgment unit is used to judge whether the maximum information length meets the two-dimensional code data storage requirements according to the data capacity threshold, judge whether the maximum information parameter meets the standard according to the error correction parameter threshold, judge whether the sub-two-dimensional code quality index meets the standard based on the standard index threshold, judge whether the feature two-dimensional code readability index meets the requirements according to the readability index threshold, and judge whether the quality index of the sample two-dimensional code meets the standard according to the sample two-dimensional code quality index threshold.
[0067] In an optional embodiment, the information acquisition module includes:
[0068] A first acquisition unit, the first acquisition unit is used to acquire user demand information, application scenario information, two-dimensional code type information, structured information, error correction information, data encoding information, text encoding information, digital encoding information, link encoding information, information to be stored, standard format information, maximum information length, data capacity, data capacity threshold, maximum information parameter, error correction parameter and error correction parameter threshold;
[0069] A second acquisition unit, the second acquisition unit is used to acquire two-dimensional code design information, two-dimensional code size information, two-dimensional code maximum size information, sub-two-dimensional code size information, sub-two-dimensional code maximum information length, minimum coding information length, text coding segment information, digital coding segment information, link coding segment information, first sub-two-dimensional code, second sub-two-dimensional code and third sub-two-dimensional code;
[0070] A third acquisition unit, wherein the third acquisition unit is used to acquire a sub-QR code quality index, a standard index threshold, first core coding pattern information, second core coding pattern information, third core coding pattern information, QR code basic pattern information, scene element feature information, pattern size parameters, pattern color parameters, pattern transparency parameters, feature QR code, readability index, readability index threshold, indoor environment information, outdoor environment information, indoor environment light index, outdoor environment light index, sample QR code quality index and sample QR code quality index threshold.
[0071] Compared with the prior art, the present invention has the following beneficial effects:
[0072] The present invention proposes an intelligent digital two-dimensional code generation and printing method and system applicable to multiple scenarios. According to the minimum coding information length, the text coding segment information, the digital coding segment information and the link coding segment information are respectively converted into the first sub-two-dimensional code, the second sub-two-dimensional code and the third sub-two-dimensional code, and the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are obtained. The three sub-two-dimensional codes are arranged in a diamond structure to obtain the basic pattern information of the two-dimensional code, thereby improving the fault tolerance of the overall two-dimensional code. Even if one of the sub-two-dimensional codes is damaged or cannot be fully recognized, the other parts can still be correctly parsed to ensure the integrity and reliability of the information. At the same time, it can also make more effective use of space, reduce the trouble of scanning different two-dimensional codes multiple times, and improve the user experience.
[0073] The present invention proposes a method and system for generating and printing intelligent digital two-dimensional codes applicable to multiple scenarios. According to the application scenario information, scene element characteristic information is obtained. According to the scene element characteristic information, pattern size parameters, pattern color parameters and pattern transparency parameters are obtained. Based on the pattern design principle, the scene element characteristic information and the two-dimensional code basic pattern information are superimposed to obtain a characteristic two-dimensional code, and a sample two-dimensional code is obtained. According to the indoor ambient light index and the outdoor ambient light index, the display status of the sample two-dimensional code under different angle parameters is simulated respectively, and the sample two-dimensional code is detected to obtain the sample two-dimensional code quality index. After judgment, a high-quality sample two-dimensional code is obtained. It can be customized according to different application scenarios and needs to meet the needs in specific scenarios, making the use of two-dimensional codes more diversified and flexible. The sample two-dimensional code can better convey the scene element characteristic information, making it easier for users to understand the relevant scene background and information content after scanning, thereby improving the effective communication of information and the accuracy of user understanding. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 This is a flow chart of a method for generating and printing intelligent digital two-dimensional codes applicable to multiple scenarios proposed by the present invention;
[0075] Figure 2This is a flowchart for obtaining the type information of the two-dimensional code in the present invention;
[0076] Figure 3 A flowchart for obtaining structured information and error correction information in the present invention;
[0077] Figure 4 This is a flow chart of obtaining the first sub-QR code, the second sub-QR code and the third sub-QR code in the present invention;
[0078] Figure 5 It is a flowchart for obtaining the basic pattern information of the two-dimensional code in the present invention;
[0079] Figure 6 This is a flow chart for obtaining a sample QR code in the present invention;
[0080] Figure 7 It is a flow chart of detecting sample QR codes based on different virtual environments in the present invention;
[0081] Figure 8 This is a structural block diagram of a smart digital two-dimensional code generation and printing system applicable to multiple scenarios proposed by the present invention. DETAILED DESCRIPTION
[0082] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0083] Reference Figure 1-Figure 8 As shown, a method for generating and printing intelligent digital two-dimensional codes applicable to multiple scenarios includes:
[0084] Obtain user demand information;
[0085] According to user demand information, application scenario information is obtained, and the application scenario information is used to describe the product application scenario;
[0086] According to the application scenario information, obtain the QR code type information;
[0087] According to the application scenario information and the QR code type information, structured information and error correction information are obtained, where the structured information is used to describe the data content actually encoded in the QR code;
[0088] According to the structured information, obtain data encoding information;
[0089] According to the application scenario information, the data coding information is classified to obtain text coding information, digital coding information and link coding information;
[0090] According to the text coding information, the digital coding information and the link coding information, a first sub-QR code, a second sub-QR code and a third sub-QR code are obtained, specifically, the text coding segment information is converted into a QR code using a QR Code Art Generator to obtain a first sub-QR code, and the digital coding segment information and the link coding segment information are converted into a second sub-QR code and a third sub-QR code in the same manner;
[0091] According to the first sub-QR code, the second sub-QR code and the third sub-QR code, basic pattern information of the QR code is obtained;
[0092] Obtain a sample QR code based on the basic pattern information of the QR code;
[0093] According to the display status of the sample QR code in different environments, different virtual environments are constructed, and the sample QR code is detected based on the different virtual environments.
[0094] Furthermore, according to the application scenario information, the QR code type information is obtained, including:
[0095] According to the application scenario information, obtain the information to be stored and perform data cleaning on the information to be stored;
[0096] Based on data normalization, the information to be stored after data cleaning is standardized to obtain standard format information;
[0097] According to the standard format information, obtain the maximum information length;
[0098] Based on the data storage type requirements of the QR code, obtain the data capacity that can be stored by different types of QR codes;
[0099] According to the data capacity that can be stored in different types of QR codes, a data capacity threshold is obtained;
[0100] According to the data capacity threshold, determine whether the maximum information length meets the two-dimensional code data storage requirements. If not, re-acquire the information to be stored. If so, obtain the two-dimensional code type information that matches the information to be stored.
[0101] Furthermore, according to the application scenario information and the QR code type information, structured information and error correction information are obtained, including:
[0102] Obtain standard format information based on application scenario information and QR code type information;
[0103] Based on the QR code type information, the standard format information is encoded in UTF-8 to obtain structured information;
[0104] Based on the DEFLATE lossless compression algorithm, the structured information is compressed, and the length of the compressed information is calculated to obtain the maximum information parameter of the structured information;
[0105] Based on the analysis of the length of the coded information and the error correction level, the error correction parameters of different coded information lengths are obtained;
[0106] Obtaining error correction parameter thresholds according to error correction parameters of different coded information lengths;
[0107] According to the error correction parameter threshold, determine whether the maximum information parameter meets the standard. If not, re-acquire the standard format information. If so, obtain the error correction information.
[0108] Further, according to the text encoding information, the digital encoding information and the link encoding information, the first sub-QR code, the second sub-QR code and the third sub-QR code are obtained, which specifically includes:
[0109] Obtain QR code design information based on user demand information;
[0110] According to the QR code design information, obtain the QR code size information;
[0111] According to the size information of the QR code, the maximum size information of the QR code is obtained, and one quarter of the maximum size of the QR code is used as the size of the first sub-QR code, the second sub-QR code and the third sub-QR code to obtain the sub-QR code size information;
[0112] According to the sub-QR code size information, obtain the maximum information length of the sub-QR code;
[0113] According to the maximum information length of the sub-QR code, the minimum encoding information length is obtained;
[0114] According to the minimum coding information length, the text coding information, the digital coding information and the link coding information are segmented and split respectively to obtain text coding segment information, digital coding segment information and link coding segment information;
[0115] According to the minimum coding information length, the text coding segment information, the digital coding segment information and the link coding segment information are converted into a first sub-QR code, a second sub-QR code and a third sub-QR code respectively.
[0116] Further, according to the first sub-QR code, the second sub-QR code and the third sub-QR code, basic QR code pattern information is obtained, specifically including:
[0117] Based on the two-dimensional code detection device, the first sub-two-dimensional code, the second sub-two-dimensional code and the third sub-two-dimensional code are detected to obtain the sub-two-dimensional code quality index;
[0118] According to user demand information, obtain the standard index threshold;
[0119] Based on the standard index threshold, determine whether the sub-QR code quality index meets the standard. If not, obtain the first sub-QR code, the second sub-QR code and the third sub-QR code according to the text encoding information, the digital encoding information and the link encoding information. If yes, obtain the first core encoding pattern information, the second core encoding pattern information and the third core encoding pattern information according to the first sub-QR code, the second sub-QR code and the third sub-QR code;
[0120] According to the two-dimensional code design information, the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are arranged in a diamond structure to obtain the two-dimensional code basic pattern information.
[0121] Further, according to the basic pattern information of the QR code, a sample QR code is obtained, which specifically includes:
[0122] According to the application scenario information, obtain the scene element feature information;
[0123] According to the scene element feature information, pattern size parameters, pattern color parameters and pattern transparency parameters are obtained;
[0124] Based on the pattern design principle, the scene element feature information and the basic pattern information of the QR code are superimposed to obtain a feature QR code;
[0125] Based on the principle of QR code detection, the characteristic QR code is detected to obtain the characteristic QR code readability index;
[0126] According to user demand information, obtain the characteristic QR code readability index threshold;
[0127] According to the characteristic QR code readability index threshold, determine whether the characteristic QR code readability index meets the requirements. If not, obtain the pattern size parameters, pattern color parameters and pattern transparency parameters according to the scene element feature information, and then obtain the sample QR code based on the characteristic QR code.
[0128] Furthermore, different virtual environments are constructed according to the display status of the sample QR code in different environments, and the sample QR code is detected based on the different virtual environments, specifically including:
[0129] According to the display status of the sample QR code in different environments, construct the indoor environment and outdoor environment, and obtain the indoor environment information and outdoor environment information;
[0130] According to the indoor environment information and the outdoor environment information, an indoor environment light index and an outdoor environment light index are obtained;
[0131] According to the indoor ambient light index and the outdoor ambient light index, the display status of the sample QR code under different angle parameters is simulated respectively, and the sample QR code is tested to obtain the sample QR code quality index;
[0132] According to user demand information, obtain the sample QR code quality index threshold;
[0133] According to the sample QR code quality index threshold, determine whether the quality index of the sample QR code meets the standard. If not, obtain the sample QR code based on the feature QR code. If so, print the sample QR code based on the printing information.
[0134] Specifically, user demand information is used to describe the design requirements of the QR code input by the user. At the same time, user demand information is also used to describe the basic information of the QR code, such as the information and format that need to be included in the QR code, as well as the field information of the QR code application. Application scenario information is used to describe the application of QR codes in different fields, different scenarios and different products. QR code type information is used to describe the corresponding QR code types in different application scenarios, including QR code, DataMatrix and PDF417 code. Structured information is used to describe the actual data stored in the QR code, such as text, links, numbers, etc. Error correction information is additional information added to improve the fault tolerance of the QR code. The purpose of data cleaning of the information to be stored is to remove some special characters, such as punctuation, symbols, emoticons, etc., to ensure that the QR code contains only standardized text information. For links or other data in specific formats, it is necessary to ensure that they comply with the corresponding encoding specifications so that they can be correctly identified and processed during decoding. During the cleaning process, it is necessary to ensure the integrity of the information to be stored to avoid losing important content. Based on data normalization, the information to be stored after data cleaning is standardized to obtain standard format information. Through information normalization, it can be ensured that the information to be stored meets the unified format requirements, such as date format, address format, telephone number format, etc., to ensure that the information in the QR code is easy to understand and use. The standardized information is easier to be quickly and accurately read and decoded by the scanning device, which improves the recognition rate and stability of the QR code. The maximum information length refers to the maximum information length that can be stored in the QR code under a specific QR code type and encoding method. Based on the DEFLATE lossless compression algorithm, the structured information is compressed, and the compressed information length is calculated to obtain the maximum information parameter of the structured information. The maximum information parameter refers to the maximum compression ratio that the data can achieve under a specific compression algorithm and compression environment. This parameter can help us evaluate the compression potential of the data and understand the best compression effect of the data under a given compression algorithm. Based on the analysis of the length of the encoded information and the error correction level, the error correction parameters of different encoded information lengths are obtained. The error correction parameter represents the error correction capability of the QR code, that is, this parameter can be used to correct or detect data damage caused by errors during transmission or storage. The higher the error correction parameter, the stronger the error correction capability of the QR code, and the more erroneous data can be correctly repaired. According to the sub-QR code size information, the maximum information length of the sub-QR code is obtained. The maximum information length of the sub-QR code indicates the maximum information length that can be stored in the first sub-QR code, the second sub-QR code, and the third sub-QR code. According to the maximum information length of the sub-QR code, the minimum encoding information length is obtained. The minimum encoding information length refers to the minimum effective information length that can fill the entire QR code under a given error correction level and encoding method. This length depends on the specific QR code type, error correction level, and encoding method used.According to the QR code design information, the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are arranged in a diamond structure to obtain the basic pattern information of the QR code. Through the diamond structure arrangement, the QR code can have error correction capabilities to a certain extent. Even if some areas are damaged, they can be repaired through information from other areas. According to the application scenario information, the scene element feature information is obtained. The scene element feature information is used to describe the important features and elements of the QR code in a specific application scenario or environment. Based on the QR code detection principle, the feature QR code is detected to obtain the feature QR code readability index. The readability index is used to describe the probability of the QR code being successfully recognized and the accuracy of the data that can be read. The sample QR code quality index is used to describe the clarity of the QR code image, that is, whether the details in the image can be clearly presented, the contrast between the foreground and background in the QR code image, etc.
[0135] Furthermore, a multi-scenario applicable intelligent digital two-dimensional code generation and printing system is proposed, which is used to implement any of the above-mentioned two-dimensional code generation and printing methods, including:
[0136] An information acquisition module, the information acquisition module is used to acquire user demand information, application scenario information, two-dimensional code type information, structured information, error correction information, data encoding information, text encoding information, digital encoding information, link encoding information, to-be-stored information, standard format information, maximum information length, data capacity, data capacity threshold, maximum information parameter, error correction parameter, error correction parameter threshold, two-dimensional code design information, two-dimensional code size information, two-dimensional code maximum size information, sub-two-dimensional code size information, sub-two-dimensional code maximum information length, minimum encoding information length, text encoding segmentation information, digital encoding segmentation information, link encoding segmentation information, first sub-two-dimensional code, second sub-two-dimensional code, third sub-two-dimensional code, sub-two-dimensional code quality index, standard index threshold, first core encoding pattern information, second core encoding pattern information, third core encoding pattern information, two-dimensional code basic pattern information, scene element feature information, pattern size parameter, pattern color parameter, pattern transparency parameter, feature two-dimensional code, feature two-dimensional code readability index, feature two-dimensional code readability index threshold, indoor environment information, outdoor environment information, indoor environment light index, outdoor environment light index, sample two-dimensional code quality index and sample two-dimensional code quality index threshold;
[0137] The main control module is used to classify the data encoding information according to the application scenario information, normalize the information to be stored after data cleaning based on data normalization, determine whether the maximum information length meets the two-dimensional code data storage requirements based on the data capacity threshold, encode the standard format information in UTF-8 based on the two-dimensional code type information, determine whether the maximum information parameter meets the standard based on the error correction parameter threshold, and segment and split the text encoding information, digital encoding information and link encoding information according to the minimum encoding information length. The segment information and link coding segment information are respectively converted into the first sub-QR code, the second sub-QR code and the third sub-QR code. Based on the standard index threshold, it is judged whether the sub-QR code quality index meets the standard. According to the QR code design information, the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are arranged in a diamond structure. Based on the pattern design principle, the scene element feature information and the QR code basic pattern information are superimposed. According to the feature QR code readability index threshold, it is judged whether the feature QR code readability index meets the requirements. According to the sample QR code quality index threshold, it is judged whether the quality index of the sample QR code meets the standard.
[0138] A detection module, the detection module is used to detect the first sub-QR code, the second sub-QR code and the third sub-QR code based on the QR code detection device, detect the characteristic QR code based on the QR code detection principle, construct indoor and outdoor environments according to the display states of the sample QR code in different environments, simulate the display states of the sample QR code under different angle parameters according to the indoor environment light index and the outdoor environment light index, and detect the sample QR code;
[0139] A display module, which interacts with the main control module and the detection module, and is used to display the control panel and the generation process of the sample QR code, and is used to display the images of the sample QR code in indoor and outdoor environments constructed by the detection module according to the display status of the sample QR code in different environments;
[0140] The printing module is used to print the final sample QR code that meets the user's needs onto the corresponding product.
[0141] Furthermore, the main control module includes:
[0142] A data processing unit, the data processing unit is used to classify data encoding information according to application scenario information, normalize the information to be stored after data cleaning based on data normalization, encode the standard format information in UTF-8 based on the two-dimensional code type information, and segment and split the text encoding information, digital encoding information and link encoding information according to the minimum encoding information length, arrange the first core encoding pattern information, the second core encoding pattern information and the third core encoding pattern information in a diamond structure according to the two-dimensional code design information, and superimpose the scene element feature information and the two-dimensional code basic pattern information based on the pattern design principle;
[0143] A conversion unit, the conversion unit is used to convert the text coding segment information, the digital coding segment information and the link coding segment information into a first sub-two-dimensional code, a second sub-two-dimensional code and a third sub-two-dimensional code respectively according to the minimum coding information length;
[0144] The judgment unit is used to judge whether the maximum information length meets the two-dimensional code data storage requirements according to the data capacity threshold, judge whether the maximum information parameter meets the standard according to the error correction parameter threshold, judge whether the sub-two-dimensional code quality index meets the standard based on the standard index threshold, judge whether the readability index of the feature two-dimensional code meets the requirements according to the readability index threshold, and judge whether the quality index of the sample two-dimensional code meets the standard according to the sample two-dimensional code quality index threshold.
[0145] Furthermore, the information acquisition module includes:
[0146] A first acquisition unit, the first acquisition unit is used to acquire user demand information, application scenario information, two-dimensional code type information, structured information, error correction information, data encoding information, text encoding information, digital encoding information, link encoding information, information to be stored, standard format information, maximum information length, data capacity, data capacity threshold, maximum information parameter, error correction parameter and error correction parameter threshold;
[0147] A second acquisition unit, the second acquisition unit is used to acquire two-dimensional code design information, two-dimensional code size information, two-dimensional code maximum size information, sub-two-dimensional code size information, sub-two-dimensional code maximum information length, minimum coding information length, text coding segment information, digital coding segment information, link coding segment information, first sub-two-dimensional code, second sub-two-dimensional code and third sub-two-dimensional code;
[0148] The third acquisition unit is used to obtain the sub-QR code quality index, the standard index threshold, the first core coding pattern information, the second core coding pattern information, the third core coding pattern information, the QR code basic pattern information, the scene element feature information, the pattern size parameter, the pattern color parameter, the pattern transparency parameter, the feature QR code, the readability index, the readability index threshold, the indoor environment information, the outdoor environment information, the indoor environment light index, the outdoor environment light index, the sample QR code quality index and the sample QR code quality index threshold.
[0149] Specifically, the first acquisition unit in the information acquisition module is used to acquire user demand information, application scenario information, QR code type information, structured information, error correction information and data encoding information, and send it to the data processing unit in the main control module for processing, obtain the first sub-QR code, the second sub-QR code and the third sub-QR code, and transmit it to the detection module for detection, and the result will be displayed in the first display unit in the display module. The second display unit in the display module is used to display the image of the sample QR code in the indoor environment and the outdoor environment constructed by the detection module according to the display state of the sample QR code in different environments, and the first display unit is used to display the control panel and the generation process of the sample QR code. The first printing unit in the printing module is used to print the QR code on the products of mobile payment and marketing promotion, such as the payment code for personal payment and the promotional leaflet for marketing promotion, etc. The second printing unit is used for small-size labels and high-density printing, such as industrial fields, especially in the identification of electronic components, logistics management, etc., which can be selected according to the QR code type information. The first detection unit in the detection module is used to detect the first sub-QR code, the second sub-QR code and the third sub-QR code based on the QR code detection device. The second detection unit is used to detect the feature QR code based on the QR code detection principle, and to construct indoor and outdoor environments according to the display status of the sample QR code in different environments. The third detection unit is used to simulate the display status of the sample QR code under different angle parameters according to the indoor environment light index and the outdoor environment light index, and to detect the sample QR code.
[0150] In summary, the advantages of the present invention are: according to the minimum coding information length, the text coding segment information, the digital coding segment information and the link coding segment information are respectively converted into the first sub-QR code, the second sub-QR code and the third sub-QR code, and the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are obtained, and the three sub-QR codes are arranged in a diamond structure to obtain the basic pattern information of the QR code. Through the diamond structure arrangement, the QR code can have error correction capability to a certain extent. Even if part of the area is damaged, it can be repaired through information in other areas. The QR code arranged in a diamond structure can be recognized faster when scanning, because the scanner can scan along the direction of the diamond structure, reducing the scanning time. Due to the characteristics of the diamond structure, the QR code has a certain anti-interference ability during the transmission process, can better cope with noise interference and distortion, and improve the fault tolerance of the overall QR code. Even if one of the sub-QR codes is damaged or cannot be fully recognized, the other parts can still be correctly parsed to ensure the integrity and reliability of the information. At the same time, it can also make more effective use of space, reduce the trouble of scanning different QR codes multiple times, and improve the user experience. According to the application scenario information, the scene element characteristic information is obtained, and according to the scene element characteristic information, the pattern size parameters, pattern color parameters and pattern transparency parameters are obtained. Based on the pattern design principle, the scene element characteristic information and the QR code basic pattern information are superimposed to obtain the characteristic QR code, and the sample QR code is obtained. According to the indoor ambient light index and the outdoor ambient light index, the display status of the sample QR code under different angle parameters is simulated respectively, and the sample QR code is tested to obtain the sample QR code quality index. After judgment, a high-quality sample QR code is obtained, which can be customized according to different application scenarios and needs to meet the needs in specific scenarios, making the use of QR codes more diversified and flexible. The sample QR code can better convey the scene element characteristic information, making it easier for users to understand the relevant scene background and information content after scanning, thereby improving the effective communication of information and the accuracy of user understanding.
[0151] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for generating and printing intelligent digital QR codes applicable to multiple scenarios. It is characterized in that include: Obtain user demand information; Acquire application scenario information according to user demand information, where the application scenario information is used to describe the scenario of product application; According to the application scenario information, obtain the QR code type information; According to the application scenario information and the two-dimensional code type information, structured information and error correction information are obtained, wherein the structured information is used to describe the data content actually encoded in the two-dimensional code; According to the structured information, obtaining data encoding information; Classify the data encoding information according to the application scenario information to obtain text encoding information, digital encoding information and link encoding information; According to the text encoding information, the digital encoding information and the link encoding information, a first sub-QR code, a second sub-QR code and a third sub-QR code are obtained; According to the first sub-QR code, the second sub-QR code and the third sub-QR code, basic pattern information of the QR code is obtained; Obtain a sample QR code according to the QR code basic pattern information; According to the display status of the sample QR code in different environments, different virtual environments are constructed, and the sample QR code is detected based on the different virtual environments.
2. According to the multi-scenario applicable intelligent digital two-dimensional code generation and printing method of claim 1, It is characterized in that According to the application scenario information, the QR code type information is obtained, including: According to the application scenario information, the information to be stored is obtained, and data cleaning is performed on the information to be stored; Based on data normalization, the information to be stored after data cleaning is standardized to obtain standard format information; According to the standard format information, obtaining the maximum information length; Based on the data storage type requirements of the QR code, obtain the data capacity that can be stored by different types of QR codes; According to the data capacity that can be stored in different types of QR codes, a data capacity threshold is obtained; According to the data capacity threshold, it is determined whether the maximum information length meets the two-dimensional code data storage requirements. If not, the information to be stored is re-acquired. If so, the two-dimensional code type information matching the information to be stored is acquired.
3. According to the multi-scenario applicable intelligent digital two-dimensional code generation and printing method of claim 2, It is characterized in that According to the application scenario information and the QR code type information, structured information and error correction information are obtained, including: Obtain standard format information according to the application scenario information and the QR code type information; Based on the QR code type information, the standard format information is encoded in UTF-8 to obtain structured information; Based on the DEFLATE lossless compression algorithm, the structured information is compressed, and the length of the compressed information is calculated to obtain the maximum information parameter of the structured information; Based on the analysis of the length of the coded information and the error correction level, the error correction parameters of different coded information lengths are obtained; Obtaining error correction parameter thresholds according to error correction parameters of different coded information lengths; According to the error correction parameter threshold, it is determined whether the maximum information parameter meets the standard. If not, the standard format information is re-acquired. If so, the error correction information is acquired.
4. According to the method for generating and printing a smart digital two-dimensional code applicable to multiple scenarios as described in claim 3, It is characterized in that According to the text encoding information, the digital encoding information and the link encoding information, obtaining the first sub-QR code, the second sub-QR code and the third sub-QR code specifically includes: According to the user demand information, obtain QR code design information; According to the two-dimensional code design information, obtain the two-dimensional code size information; According to the two-dimensional code size information, obtain the maximum size information of the two-dimensional code, use one quarter of the maximum size of the two-dimensional code as the size of the first sub-two-dimensional code, the second sub-two-dimensional code and the third sub-two-dimensional code, and obtain the sub-two-dimensional code size information; According to the sub-QR code size information, obtain the maximum information length of the sub-QR code; According to the maximum information length of the sub-QR code, the minimum encoding information length is obtained; According to the minimum coding information length, the text coding information, the digital coding information and the link coding information are segmented and split respectively to obtain text coding segment information, digital coding segment information and link coding segment information; According to the minimum coding information length, the text coding segment information, the digital coding segment information and the link coding segment information are converted into a first sub-QR code, a second sub-QR code and a third sub-QR code respectively.
5. According to the method for generating and printing a smart digital two-dimensional code applicable to multiple scenarios as described in claim 4, It is characterized in that According to the first sub-QR code, the second sub-QR code and the third sub-QR code, the basic pattern information of the QR code is obtained, which specifically includes: Based on the two-dimensional code detection device, the first sub-two-dimensional code, the second sub-two-dimensional code and the third sub-two-dimensional code are detected to obtain the sub-two-dimensional code quality index; According to the user demand information, a standard index threshold is obtained; Based on the standard index threshold, determine whether the sub-QR code quality index meets the standard; if not, obtain the first sub-QR code, the second sub-QR code and the third sub-QR code according to the text encoding information, the digital encoding information and the link encoding information; if yes, obtain the first core encoding pattern information, the second core encoding pattern information and the third core encoding pattern information according to the first sub-QR code, the second sub-QR code and the third sub-QR code; According to the two-dimensional code design information, the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are arranged in a diamond structure to obtain the two-dimensional code basic pattern information.
6. According to the multi-scenario applicable intelligent digital two-dimensional code generation and printing method of claim 5, It is characterized in that According to the basic pattern information of the two-dimensional code, a sample two-dimensional code is obtained, which specifically includes: Acquiring scene element feature information according to the application scene information; According to the scene element feature information, acquiring pattern size parameters, pattern color parameters and pattern transparency parameters; Based on the pattern design principle, the scene element feature information and the basic pattern information of the QR code are superimposed to obtain a feature QR code; Based on the principle of QR code detection, the characteristic QR code is detected to obtain the characteristic QR code readability index; According to the user demand information, a characteristic two-dimensional code readability index threshold is obtained; According to the characteristic QR code readability index threshold, determine whether the characteristic QR code readability index meets the requirements. If not, obtain the pattern size parameters, pattern color parameters and pattern transparency parameters according to the scene element feature information. If so, obtain the sample QR code based on the characteristic QR code.
7. The method for generating and printing a smart digital two-dimensional code applicable to multiple scenarios according to claim 6, It is characterized in that According to the display status of the sample QR code in different environments, different virtual environments are constructed, and the sample QR code is tested based on the different virtual environments, including: According to the display status of the sample QR code in different environments, construct the indoor environment and outdoor environment, and obtain the indoor environment information and outdoor environment information; Acquire an indoor ambient light index and an outdoor ambient light index according to the indoor ambient information and the outdoor ambient information; According to the indoor ambient light index and the outdoor ambient light index, respectively simulate the display state of the sample QR code under different angle parameters, and detect the sample QR code to obtain the sample QR code quality index; According to user demand information, obtain the sample QR code quality index threshold; According to the sample QR code quality index threshold, determine whether the sample QR code quality index meets the standard. If not, obtain the sample QR code based on the feature QR code. If so, print the sample QR code based on the printing information.
8. An intelligent digital two-dimensional code generation and printing system applicable to multiple scenarios, used to implement the two-dimensional code generation and printing method as claimed in claim 7, It is characterized in that include: An information acquisition module, wherein the information acquisition module is used to acquire user demand information, application scenario information, two-dimensional code type information, structured information, error correction information, data encoding information, text encoding information, digital encoding information, link encoding information, information to be stored, standard format information, maximum information length, data capacity, data capacity threshold, maximum information parameter, error correction parameter, error correction parameter threshold, two-dimensional code design information, two-dimensional code size information, two-dimensional code maximum size information, sub-two-dimensional code size information, sub-two-dimensional code maximum information length, minimum encoding information length, text encoding segmentation information, digital encoding segmentation information, link encoding segmentation information, first sub-two-dimensional code, second sub-two-dimensional code, third sub-two-dimensional code, sub-two-dimensional code quality index, standard index threshold, first core encoding pattern information, second core encoding pattern information, third core encoding pattern information, two-dimensional code basic pattern information, scene element feature information, pattern size parameter, pattern color parameter, pattern transparency parameter, feature two-dimensional code, feature two-dimensional code readability index, feature two-dimensional code readability index threshold, indoor environment information, outdoor environment information, indoor environment light index, outdoor environment light index, sample two-dimensional code quality index and sample two-dimensional code quality index threshold; The main control module is used to classify the data encoding information according to the application scenario information, normalize the information to be stored after data cleaning based on data normalization, determine whether the maximum information length meets the two-dimensional code data storage requirements based on the data capacity threshold, encode the standard format information in UTF-8 based on the two-dimensional code type information, determine whether the maximum information parameter meets the standard based on the error correction parameter threshold, and segment the text encoding information, digital encoding information and link encoding information according to the minimum encoding information length. The coding segment information and the linked coding segment information are respectively converted into the first sub-QR code, the second sub-QR code and the third sub-QR code, and based on the standard index threshold, whether the sub-QR code quality index meets the standard is judged, and according to the QR code design information, the first core coding pattern information, the second core coding pattern information and the third core coding pattern information are arranged in a diamond structure, and based on the pattern design principle, the scene element feature information and the QR code basic pattern information are superimposed, and according to the feature QR code readability index threshold, whether the feature QR code readability index meets the requirements is judged, and according to the sample QR code quality index threshold, whether the quality index of the sample QR code meets the standard is judged; A detection module, the detection module is used to detect the first sub-QR code, the second sub-QR code and the third sub-QR code based on the QR code detection device, detect the characteristic QR code based on the QR code detection principle, construct indoor environment and outdoor environment according to the display state of the sample QR code in different environments, simulate the display state of the sample QR code under different angle parameters according to the indoor environment light index and the outdoor environment light index, and detect the sample QR code; A display module, which interacts with the main control module and the detection module, and is used to display the control panel and the generation process of the sample QR code, and is used to display the images of the sample QR code in indoor and outdoor environments constructed by the detection module according to the display status of the sample QR code in different environments; A printing module is used to print the final sample QR code that meets the user's needs onto the corresponding product.
9. According to the multi-scenario applicable intelligent digital two-dimensional code generation and printing system of claim 8, It is characterized in that The main control module comprises: A data processing unit, the data processing unit is used to classify the data encoding information according to the application scenario information, normalize the information to be stored after data cleaning based on data normalization, encode the standard format information in UTF-8 based on the two-dimensional code type information, and segment and split the text encoding information, digital encoding information and link encoding information according to the minimum encoding information length, arrange the first core encoding pattern information, the second core encoding pattern information and the third core encoding pattern information in a diamond structure according to the two-dimensional code design information, and superimpose the scene element feature information and the two-dimensional code basic pattern information based on the pattern design principle; A conversion unit, the conversion unit being used to convert the text coding segment information, the digital coding segment information and the link coding segment information into a first sub-two-dimensional code, a second sub-two-dimensional code and a third sub-two-dimensional code respectively according to the minimum coding information length; A judgment unit is used to judge whether the maximum information length meets the two-dimensional code data storage requirements according to the data capacity threshold, judge whether the maximum information parameter meets the standard according to the error correction parameter threshold, judge whether the sub-two-dimensional code quality index meets the standard based on the standard index threshold, judge whether the feature two-dimensional code readability index meets the requirements according to the readability index threshold, and judge whether the quality index of the sample two-dimensional code meets the standard according to the sample two-dimensional code quality index threshold.
10. The intelligent digital two-dimensional code generation and printing system applicable to multiple scenarios according to claim 8, It is characterized in that The information acquisition module includes: A first acquisition unit, the first acquisition unit is used to acquire user demand information, application scenario information, two-dimensional code type information, structured information, error correction information, data encoding information, text encoding information, digital encoding information, link encoding information, information to be stored, standard format information, maximum information length, data capacity, data capacity threshold, maximum information parameter, error correction parameter and error correction parameter threshold; A second acquisition unit, the second acquisition unit is used to acquire two-dimensional code design information, two-dimensional code size information, two-dimensional code maximum size information, sub-two-dimensional code size information, sub-two-dimensional code maximum information length, minimum coding information length, text coding segment information, digital coding segment information, link coding segment information, first sub-two-dimensional code, second sub-two-dimensional code and third sub-two-dimensional code; A third acquisition unit, wherein the third acquisition unit is used to acquire a sub-QR code quality index, a standard index threshold, first core coding pattern information, second core coding pattern information, third core coding pattern information, QR code basic pattern information, scene element feature information, pattern size parameters, pattern color parameters, pattern transparency parameters, feature QR code, readability index, readability index threshold, indoor environment information, outdoor environment information, indoor environment light index, outdoor environment light index, sample QR code quality index and sample QR code quality index threshold.
