A method and system for generating variable anti-counterfeiting multi-color QR codes based on AI recognition

By analyzing QR code data through AI recognition technology, randomly variable colorful QR codes are generated, solving the problems of existing QR codes being easy to forge and difficult to control costs, and achieving high-security and low-cost QR code generation.

CN119476334BActive Publication Date: 2025-09-09SHENZHEN DINGXUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411485122.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-09-09
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

Existing QR code generation methods cannot effectively prevent counterfeiting and are easily forged. In addition, the cost of generating variable and colorful QR codes is difficult to control, and the applicable scenarios are not targeted.

Method used

Through AI recognition technology, the QR code data is analyzed to obtain the content prevention coefficient, which is then divided into different types and generated into randomly variable colorful QR codes. The outer code eye, inner code eye, code point and color are dynamically changed to generate a colorful QR code with a random appearance.

Benefits of technology

It improves the security and pertinence of QR codes, effectively prevents counterfeiting, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476334B_ABST
    Figure CN119476334B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for generating a variable anti-counterfeiting colorful two-dimensional code based on AI recognition, relates to the field of two-dimensional codes, and solves the problem of poor security of existing two-dimensional code generation methods. The method comprises the following steps: step S1: respectively obtaining target two-dimensional code data, a first content prevention coefficient, a second content prevention coefficient, and a third content prevention coefficient to obtain two-dimensional code content data; step S2: obtaining a two-dimensional code content change coefficient according to the two-dimensional code content data, and obtaining a two-dimensional code content change coefficient threshold value and performing numerical comparison with the two-dimensional code content change coefficient to obtain two-dimensional code content analysis data; step S3: generating a two-dimensional code according to the two-dimensional code content data and the two-dimensional code content analysis data. The present invention adopts randomly variable colorful two-dimensional codes for content coverage for two-dimensional code data with high security requirements, which can effectively ensure the security of two-dimensional code applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of QR codes and relates to artificial intelligence technology, specifically a method and system for generating variable anti-counterfeiting colorful QR codes based on AI recognition. Background Art

[0002] The existing QR code generation method has the following defects when generating QR codes:

[0003] 1. The existing QR code production method cannot effectively implement dynamic anti-counterfeiting for the generated data. Counterfeiters can easily regenerate the QR code from the original anti-counterfeiting code data and then print fake labels, which poses certain information security risks.

[0004] 2. Existing variable multicolor QR code generation programs are unable to analyze QR code data and usually generate variable multicolor QR codes uniformly, causing some scenarios where conventional QR codes can also use variable multicolor QR codes, making it difficult to control the cost of QR code generation.

[0005] To this end, we propose a method and system for generating variable anti-counterfeiting colorful QR codes based on AI recognition. Summary of the Invention

[0006] In response to the shortcomings of the existing technology, the purpose of the present invention is to provide a method and system for generating variable anti-counterfeiting colorful QR codes based on AI recognition. The present invention is based on obtaining target QR code data, performing information analysis on the target QR code data according to the target QR code data, obtaining a first content prevention coefficient, performing information change analysis on the target QR code data, obtaining a second content prevention coefficient, performing historical interaction information analysis on the target QR code data, obtaining a third content prevention coefficient, defining the target QR code data, the first content prevention coefficient, the second content prevention coefficient and the third content prevention coefficient as QR code content data, obtaining a QR code content change coefficient according to the QR code content data, and obtaining a QR code content change coefficient threshold value for numerical comparison with the QR code content change coefficient, dividing the target QR code data into first change type QR code data and second change type QR code data, obtaining QR code content analysis data, and generating a QR code according to the QR code content data and the QR code content analysis data.

[0007] In order to achieve the above objectives, the present invention adopts the following technical solution: A method for generating a variable anti-counterfeiting multi-color QR code based on AI recognition includes the following specific steps:

[0008] Step S1: Acquire target QR code data, perform information analysis on the target QR code data based on the target QR code data to obtain a first content prevention coefficient, perform information change analysis on the target QR code data to obtain a second content prevention coefficient, perform historical interaction information analysis on the target QR code data to obtain a third content prevention coefficient, and define the target QR code data, the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient as QR code content data;

[0009] Step S2: obtaining a QR code content variation coefficient based on the QR code content data, obtaining a QR code content variation coefficient threshold, and performing numerical comparison with the QR code content variation coefficient to divide the target QR code data into first variation type QR code data and second variation type QR code data, thereby obtaining QR code content analysis data;

[0010] Step S3: Generate a QR code based on the QR code content data and the QR code content analysis data.

[0011] Furthermore, the step S1 further includes the following specific steps:

[0012] Step S11: Obtain target QR code data;

[0013] Step S12: Mark the time value corresponding to the current moment as the first reference time point, mark the feature data monitoring period before the reference time point as the second reference time point, and mark the period between the first reference time point and the second reference time point as the content monitoring period;

[0014] Step S13: Analyze the target QR code data to obtain a first content prevention coefficient;

[0015] Step S14: performing information change analysis on the target QR code data to obtain a second content prevention coefficient;

[0016] Step S15: Analyze historical interaction information of the target QR code data to obtain a third content prevention coefficient;

[0017] Step S16: defining the target two-dimensional code data, the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient as two-dimensional code content data.

[0018] Furthermore, the step S13 further includes the following specific steps:

[0019] Step S131: Using a text recognition algorithm to extract text from the target two-dimensional code data at the first reference time point to obtain first two-dimensional code text data;

[0020] Step S132: using a text recognition algorithm to perform text extraction on the target two-dimensional code data at the second reference time point to obtain second two-dimensional code text data;

[0021] Step S133: performing a text content comparison on the first QR code text data and the second QR code text data. If the text content comparison results are consistent, the corresponding target QR code data is marked as the first type of QR code data. If the text content comparison results are inconsistent, the corresponding target QR code data is marked as the second type of QR code data.

[0022] Step S134: When the target QR code data is the first type of QR code data, the content prevention coefficient corresponding to the first type of QR code data is obtained to obtain a first content prevention coefficient;

[0023] Step S135: When the target QR code data is the second type of QR code data, the content prevention coefficient corresponding to the second type of QR code data is obtained to obtain the first content prevention coefficient;

[0024] The step S135 further includes the following specific steps:

[0025] Step S1351: randomly selecting a plurality of second-type QR code data at different time points during the content monitoring period to obtain a plurality of second-type QR code data;

[0026] Step S1352: Repeat step S134 to obtain the content prevention coefficient corresponding to each second type QR code data to obtain multiple content prevention coefficients, and average the obtained multiple content prevention coefficients to obtain the first content prevention coefficient.

[0027] Furthermore, the step S134 further includes the following specific steps:

[0028] Step S1341: Acquire the text content corresponding to the first type of QR code data to obtain the QR code content text;

[0029] Step S1342: setting a sensitive text content respectively and naming them as the first sensitive text content to the mth sensitive text content;

[0030] Step S1343: Obtain the quantity of the first sensitive text content to the mth sensitive text content in the QR code content text, and obtain the quantity of the first sensitive text to the ath sensitive text;

[0031] Step S1344: Count the number of characters in the QR code content text to obtain the sum of the number of characters in the text content;

[0032] Step S1345: Calculate the content prevention coefficient corresponding to the second type of QR code data by adding the number of sensitive texts from the first to the ath sensitive text and the number of characters in the text content;

[0033] The content prevention coefficient corresponding to the first type of QR code data is calculated using the following formula:

[0034]

[0035] Wherein, Nrf is the content prevention coefficient corresponding to the first type of QR code data, Mw1 to Mwa are the number of sensitive texts from the first to the ath sensitive text respectively, and Zfz is the sum of the number of characters in the text content;

[0036] Step S1346: define the content prevention coefficient corresponding to the first type of QR code data as the first content prevention coefficient.

[0037] Furthermore, the step S3 further includes the following specific steps:

[0038] Step S31: Acquire QR code content analysis data, and acquire first change type QR code data and second change type QR code data according to the QR code content analysis data;

[0039] Step S32: Acquire the QR code content data, and acquire the target QR code data according to the QR code content data;

[0040] Step S33: When the target two-dimensional code data is the first variable type two-dimensional code data, the target two-dimensional code data is generated into a multicolored two-dimensional code with randomly variable outer code eyes, inner code eyes, code points and colors;

[0041] Step S34: When the target two-dimensional code data is two-dimensional code data of the second variation type, the target two-dimensional code data is generated into a common two-dimensional code.

[0042] A system for generating variable anti-counterfeiting multi-color QR codes based on AI recognition. The specific working process of each module is as follows:

[0043] Data acquisition module: used to acquire target QR code data, perform information analysis on the target QR code data based on the target QR code data to obtain a first content prevention coefficient, perform information change analysis on the target QR code data to obtain a second content prevention coefficient, perform historical interaction information analysis on the target QR code data to obtain a third content prevention coefficient, and define the target QR code data, the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient as QR code content data;

[0044] Data analysis module: used to obtain the QR code content change coefficient based on the QR code content data, obtain the QR code content change coefficient threshold value and perform numerical comparison with the QR code content change coefficient, divide the target QR code data into first change type QR code data and second change type QR code data, and obtain QR code content analysis data;

[0045] QR code generation module: used to generate QR codes based on QR code content data and QR code content analysis data.

[0046] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0047] 1. The present invention adopts randomly variable colorful QR codes to cover the content for QR code data with high security requirements, which can effectively ensure the security of QR code applications;

[0048] 2. The present invention generates different types of QR codes for different types of QR code content by analyzing multiple data to obtain the QR code content variation coefficient, which can effectively improve the pertinence of the application scenarios of colorful QR codes. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] To facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0050] Figure 1 It is a diagram of the implementation steps of the present invention;

[0051] Figure 2 is a block diagram of the overall system of the present invention;

[0052] Figure 3 This is a diagram showing the combination of two-dimensional codes in the present invention. DETAILED DESCRIPTION

[0053] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0054] Example 1

[0055] See also Figure 1 The present invention provides a technical solution: a method for generating a variable anti-counterfeiting multi-color QR code based on AI recognition, comprising the following specific steps:

[0056] Step S1: respectively obtaining a first content prevention coefficient, a second content prevention coefficient, and a third content prevention coefficient to obtain QR code content data;

[0057] Step S11: Obtain target QR code data;

[0058] Step S12: Mark the time value corresponding to the current moment as the first reference time point, mark the feature data monitoring period before the reference time point as the second reference time point, and mark the period between the first reference time point and the second reference time point as the content monitoring period;

[0059] Step S13: acquiring information from the target QR code data and analyzing it to obtain a first content prevention coefficient;

[0060] The step S13 further includes the following specific steps:

[0061] Step S131: Using a text recognition algorithm to extract text from the target two-dimensional code data at the first reference time point to obtain first two-dimensional code text data;

[0062] Step S132: using a text recognition algorithm to perform text extraction on the target two-dimensional code data at the second reference time point to obtain second two-dimensional code text data;

[0063] Step S133: performing a text content comparison on the first QR code text data and the second QR code text data. If the text content comparison results are consistent, the corresponding target QR code data is marked as the first type of QR code data. If the text content comparison results are inconsistent, the corresponding target QR code data is marked as the second type of QR code data.

[0064] Step S134: When the target QR code data is the first type of QR code data, the content prevention coefficient corresponding to the first type of QR code data is obtained to obtain a first content prevention coefficient;

[0065] The step S134 further includes the following specific steps:

[0066] Step S1341: Acquire the text content corresponding to the first type of QR code data to obtain the QR code content text;

[0067] Step S1342: setting a sensitive text content respectively and naming them as the first sensitive text content to the mth sensitive text content;

[0068] Step S1343: Obtain the quantity of the first sensitive text content to the mth sensitive text content in the QR code content text, and obtain the quantity of the first sensitive text to the ath sensitive text;

[0069] Step S1344: Count the number of characters in the QR code content text to obtain the sum of the number of characters in the text content;

[0070] Step S1345: Calculate the content prevention coefficient corresponding to the second type of QR code data by adding the number of sensitive texts from the first to the ath sensitive text and the number of characters in the text content;

[0071] The content prevention coefficient corresponding to the first type of QR code data is calculated using the following formula:

[0072]

[0073] Wherein, Nrf is the content prevention coefficient corresponding to the first type of QR code data, Mw1 to Mwa are the number of sensitive texts from the first to the ath sensitive text respectively, and Zfz is the sum of the number of characters in the text content;

[0074] Step S1346: defining the content prevention coefficient corresponding to the first type of QR code data as a first content prevention coefficient;

[0075] Step S135: When the target QR code data is the second type of QR code data, the content prevention coefficient corresponding to the second type of QR code data is obtained to obtain the first content prevention coefficient;

[0076] The step S135 further includes the following specific steps:

[0077] Step S1351: randomly selecting a plurality of second-type QR code data at different time points during the content monitoring period to obtain a plurality of second-type QR code data;

[0078] Step S1352: Repeat step S134 to obtain the content protection coefficient corresponding to each second-type QR code data to obtain multiple content protection coefficients, and average the obtained multiple content protection coefficients to obtain a first content protection coefficient;

[0079] Step S14: performing information change analysis on the target QR code data to obtain a second content prevention coefficient;

[0080] The step S14 further includes the following specific steps:

[0081] Step S141: randomly selecting b different monitoring time points within the content monitoring period, and acquiring text from the target QR code data corresponding to each monitoring time point to obtain multiple target QR code monitoring texts;

[0082] Step S142: Obtain the time difference between each target QR code monitoring text and the first reference time point, obtain multiple monitoring time difference values, and arrange the obtained multiple monitoring time difference values ​​in descending order according to the numerical value. Name the target QR code monitoring texts corresponding to the multiple monitoring time difference values ​​as the first target QR code text to the bth target QR code text according to the arrangement order;

[0083] Step S143: performing a text comparison between the first target QR code text and the second target QR code text. If the comparison results are consistent, the first target QR code text is marked as a first-varying target text. If the comparison results are inconsistent, the first target QR code text is marked as a second-varying target text.

[0084] Step S144: performing a text comparison between the second target QR code text and the third target QR code text. If the comparison results are consistent, the second target QR code text is marked as the first variation type target text. If the comparison results are inconsistent, the second target QR code text is marked as the second variation type target text.

[0085] Step S145: Repeat steps S143 and S144 to perform a text comparison between the b-1th target QR code text and the b-th target QR code text. If the comparison results are consistent, the b-1th target QR code text is marked as the first change type target text. If the comparison results are inconsistent, the b-1th target QR code text is marked as the second change type target text.

[0086] Step S146: Counting the number of target texts of the second change type to obtain a value of the number of changed texts, and calculating the ratio of the value of the number of changed texts to b to obtain a second content prevention coefficient;

[0087] Step S15: Analyze historical interaction information of the target QR code data to obtain a third content prevention coefficient;

[0088] The step S15 further includes the following specific steps:

[0089] Step S151: During the content monitoring period, the total number of times the QR code corresponding to the target QR code data is scanned is counted to obtain the cumulative number of monitored scans;

[0090] Step S152: During the content monitoring period, the number of times the QR code corresponding to the target QR code data is scanned by unfamiliar users is counted to obtain the number of monitored initial scans;

[0091] Step S153: c different scanning users are selected as sample scanning users, and are named as the first sample scanning user to the cth sample scanning user respectively;

[0092] Step S154: Obtain the number of user interactions required by the first sample scanning user to the cth sample scanning user in the process of realizing their own needs, and obtain the first user interaction number to the cth user interaction number;

[0093] Step S155: Calculate the number of interactions from the first user to the cth user to obtain the average number of interactions of the sample users;

[0094] Step S156: Calculate the average number of sample user interactions, the cumulative number of monitored scans, and the number of monitored initial scans to obtain a third content prevention coefficient;

[0095] The third-party content prevention coefficient is calculated using the following formula:

[0096] Nfr3=Yjh+Lsm+Csm;

[0097] Among them, Nfr3 is the third content prevention coefficient, Yjh is the average number of sample user interactions, Lsm is the cumulative number of monitoring scans, and Csm is the number of monitoring initial scans;

[0098] Step S16: defining the target QR code data, the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient as QR code content data;

[0099] Step S2: obtaining a QR code content variation coefficient based on the QR code content data, and obtaining a QR code content variation coefficient threshold and performing numerical comparison with the QR code content variation coefficient to obtain QR code content analysis data;

[0100] Step S21: Acquire the QR code content data, and respectively acquire the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient according to the QR code content data;

[0101] Step S22: Calculating the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient to obtain a QR code content variation coefficient;

[0102] Calculate the coefficient of change of the QR code content. The specific formula is as follows:

[0103] Bnr=Nfr1+Nfr2+Nfr3;

[0104] Among them, Bnr is the QR code content change coefficient, Nfr1 is the first content prevention coefficient, Nfr2 is the second content prevention coefficient, and Nfr3 is the third content prevention coefficient;

[0105] Step S23: respectively obtaining a first content prevention coefficient threshold, a second content prevention coefficient threshold, and a third content prevention coefficient threshold;

[0106] Step S24: Calculating the first content prevention coefficient threshold, the second content prevention coefficient threshold, and the third content prevention coefficient threshold to obtain a QR code content variation coefficient threshold;

[0107] The threshold value of the QR code content change coefficient is calculated using the following formula:

[0108] Bnry=Nfy1+Nfy2+Nfy3;

[0109] Wherein, Bnry is the QR code content change coefficient threshold, Nfy1 is the first content prevention coefficient threshold, Nfy2 is the second content prevention coefficient threshold, and Nfy3 is the third content prevention coefficient threshold;

[0110] Step S25: numerically comparing the QR code content change coefficient with the QR code content change coefficient threshold, dividing the target QR code data into first change type QR code data and second change type QR code data, and obtaining QR code content analysis data;

[0111] The step S25 further includes the following specific steps:

[0112] Step S251: When the QR code content change coefficient is greater than or equal to the QR code content change coefficient threshold, determining that the corresponding target QR code data is QR code data of the first change type;

[0113] Step S252: When the QR code content change coefficient is less than the QR code content change coefficient threshold, determining that the corresponding target QR code data is QR code data of the second change type;

[0114] Step S3: Generate a QR code based on the QR code content analysis data;

[0115] Step S31: Acquire QR code content analysis data, and acquire first change type QR code data and second change type QR code data according to the QR code content analysis data;

[0116] Step S32: Acquire the QR code content data, and acquire the target QR code data according to the QR code content data;

[0117] Step S33: When the target two-dimensional code data is the first variable type two-dimensional code data, the target two-dimensional code data is generated into a multicolored two-dimensional code with randomly variable outer code eyes, inner code eyes, code points and colors;

[0118] Step S34: When the target two-dimensional code data is two-dimensional code data of the second variation type, the target two-dimensional code data is generated into a common two-dimensional code.

[0119] In this application, if a corresponding calculation formula appears, the above calculation formula is dimensionless and its numerical calculation is performed. The weight coefficient, proportional coefficient and other coefficients in the formula are set to a result value obtained by quantifying each parameter. Regarding the size of the weight coefficient and the proportional coefficient, as long as it does not affect the proportional relationship between the parameter and the result value, it is acceptable.

[0120] Example 2

[0121] See also Figure 2 Based on another concept of the same invention, a system for generating a variable anti-counterfeiting multi-color QR code based on AI recognition is proposed, comprising a data acquisition module, a data analysis module, a QR code generation module, and a server. The data acquisition module, the data analysis module, and the QR code generation module are respectively connected to the server, and the server controls the data acquisition module, the data analysis module, and the QR code generation module respectively.

[0122] The data acquisition module respectively acquires the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient to obtain the QR code content data;

[0123] The data acquisition module includes a basic content unit, an information change unit, and a user interaction unit;

[0124] Get the target QR code data;

[0125] Mark the time value corresponding to the current moment as the first reference time point, mark the feature data monitoring period before the reference time point as the second reference time point, and mark the period between the first reference time point and the second reference time point as the content monitoring period;

[0126] It should be noted here that:

[0127] The target QR code data involved here is the content data that needs to be covered by the QR code to be generated;

[0128] The basic content unit obtains information about the target QR code data and analyzes it to obtain a first content prevention coefficient;

[0129] The details are as follows:

[0130] Using a text recognition algorithm to extract text from the target two-dimensional code data at the first reference time point to obtain first two-dimensional code text data;

[0131] Using a text recognition algorithm to extract text from the target two-dimensional code data at the second reference time point to obtain second two-dimensional code text data;

[0132] Performing a text content comparison on the first QR code text data and the second QR code text data; if the text content comparison results are consistent, marking the corresponding target QR code data as first type QR code data; if the text content comparison results are inconsistent, marking the corresponding target QR code data as second type QR code data;

[0133] When the target QR code data is the first type of QR code data, obtaining the content prevention coefficient corresponding to the first type of QR code data to obtain a first content prevention coefficient;

[0134] The details are as follows:

[0135] Acquire the text content corresponding to the first type of QR code data to obtain the QR code content text;

[0136] Set a sensitive text content respectively and name them as the first sensitive text content to the mth sensitive text content;

[0137] It should be noted here that:

[0138] In this application, a is the quantity value corresponding to the sensitive text content, and a is an integer greater than 0;

[0139] In this application, the first sensitive text content involved here may be an ID card number, the second sensitive text content may be a bank account number, and the third sensitive content may be a username and password;

[0140] Obtain the quantity of the first to the mth sensitive text contents in the QR code content respectively, and obtain the quantity of the first to the ath sensitive text;

[0141] It should be noted here that:

[0142] In this application, if there are three ID card numbers in the QR code content text, the number of first sensitive texts is 3; if there are five bank account numbers in the QR code content text, the number of first sensitive texts is 5;

[0143] Count the number of characters in the QR code content to obtain the sum of the number of characters in the text content;

[0144] The content prevention coefficient corresponding to the second type of QR code data is calculated by adding the number of sensitive texts from the first to the ath sensitive text and the number of characters in the text content;

[0145] The content prevention coefficient corresponding to the first type of QR code data is calculated using the following formula:

[0146]

[0147] Wherein, Nrf is the content prevention coefficient corresponding to the first type of QR code data, Mw1 to Mwa are the number of sensitive texts from the first to the ath sensitive text respectively, and Zfz is the sum of the number of characters in the text content;

[0148] The content prevention coefficient corresponding to the first type of QR code data is defined as a first content prevention coefficient;

[0149] When the target QR code data is the second type of QR code data, the content prevention coefficient corresponding to the second type of QR code data is obtained to obtain the first content prevention coefficient;

[0150] The details are as follows:

[0151] During the content monitoring period, randomly selecting a plurality of second-type QR code data at different time points to obtain a plurality of second-type QR code data;

[0152] Repeat the process of obtaining the content prevention coefficient corresponding to the first type of QR code data, respectively obtain the content prevention coefficient corresponding to each second type of QR code data, obtain multiple content prevention coefficients, and average the obtained multiple content prevention coefficients to obtain the first content prevention coefficient;

[0153] The information change unit performs information change analysis on the target QR code data to obtain a second content prevention coefficient;

[0154] During the content monitoring period, randomly select b different monitoring time points, and obtain the text of the target QR code data corresponding to each monitoring time point to obtain multiple target QR code monitoring texts;

[0155] Obtain the time difference between each target QR code monitoring text and the first reference time point respectively, obtain multiple monitoring time difference values, and arrange the obtained multiple monitoring time difference values ​​in descending order according to the numerical value, and name the target QR code monitoring texts corresponding to the multiple monitoring time difference values ​​as the first target QR code text to the bth target QR code text according to the arrangement order;

[0156] It should be noted here that:

[0157] In this application, b referred to herein is the quantity value corresponding to the target QR code text, and the quantity value corresponding to the target QR code text is consistent with the quantity value at the monitoring time point, and b is an integer greater than 0;

[0158] Performing a text comparison between the first target QR code text and the second target QR code text; if the comparison results are consistent, marking the first target QR code text as the first change type target text; if the comparison results are inconsistent, marking the first target QR code text as the second change type target text;

[0159] Performing a text comparison between the second target QR code text and the third target QR code text; if the comparison results are consistent, marking the second target QR code text as the first change type target text; if the comparison results are inconsistent, marking the second target QR code text as the second change type target text;

[0160] Repeat the above process and compare the b-1th target QR code text with the b-th target QR code text. If the comparison results are consistent, the b-1th target QR code text is marked as the first change type target text. If the comparison results are inconsistent, the b-1th target QR code text is marked as the second change type target text.

[0161] Counting the number of target texts of the second change type to obtain a value for the number of changed texts, and calculating a ratio between the value for the number of changed texts and b to obtain a second content prevention coefficient;

[0162] The user interaction unit analyzes the historical interaction information of the target QR code data to obtain a third-party content prevention coefficient;

[0163] During the content monitoring period, the total number of times the QR code corresponding to the target QR code data is scanned is counted to obtain the cumulative number of monitored scans;

[0164] During the content monitoring period, the number of times the QR code corresponding to the target QR code data is scanned by unfamiliar users is counted to obtain the number of initial scans monitored;

[0165] Select c different scanning users as sample scanning users and name them as the first sample scanning user to the cth sample scanning user respectively;

[0166] It should be noted here that:

[0167] In this application, c is the number of sample scanning users, and c is an integer greater than 0;

[0168] Obtain the number of user interactions required by the first sample scanning user to the cth sample scanning user in the process of achieving their own needs, and obtain the first user interaction number to the cth user interaction number;

[0169] Calculate the number of interactions from the first user to the cth user to obtain the average number of interactions for the sample users;

[0170] The third-party content prevention coefficient is calculated by calculating the average number of sample user interactions, the cumulative number of monitored scans, and the number of monitored initial scans.

[0171] The third-party content prevention coefficient is calculated using the following formula:

[0172] Nfr3=Yjh+Lsm+Csm;

[0173] Among them, Nfr3 is the third content prevention coefficient, Yjh is the average number of sample user interactions, Lsm is the cumulative number of monitoring scans, and Csm is the number of monitoring initial scans;

[0174] The target QR code data, the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient are defined as QR code content data;

[0175] The data acquisition module acquires the QR code content data and transmits it to the data analysis module;

[0176] The data analysis module obtains the QR code content change coefficient according to the QR code content data, obtains the QR code content change coefficient threshold value and compares it with the QR code content change coefficient to obtain QR code content analysis data;

[0177] Obtaining QR code content data, and respectively obtaining a first content prevention coefficient, a second content prevention coefficient, and a third content prevention coefficient according to the QR code content data;

[0178] The first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient are calculated to obtain a QR code content change coefficient;

[0179] Calculate the coefficient of change of the QR code content. The specific formula is as follows:

[0180] Bnr=Nfr1+Nfr2+Nfr3;

[0181] Among them, Bnr is the QR code content change coefficient, Nfr1 is the first content prevention coefficient, Nfr2 is the second content prevention coefficient, and Nfr3 is the third content prevention coefficient;

[0182] respectively obtaining a first content prevention coefficient threshold, a second content prevention coefficient threshold, and a third content prevention coefficient threshold;

[0183] The first content prevention coefficient threshold, the second content prevention coefficient threshold, and the third content prevention coefficient threshold are calculated to obtain a QR code content change coefficient threshold;

[0184] The threshold value of the QR code content change coefficient is calculated using the following formula:

[0185] Bnry=Nfy1+Nfy2+Nfy3;

[0186] Wherein, Bnry is the QR code content change coefficient threshold, Nfy1 is the first content prevention coefficient threshold, Nfy2 is the second content prevention coefficient threshold, and Nfy3 is the third content prevention coefficient threshold;

[0187] Compare the QR code content change coefficient with the QR code content change coefficient threshold, divide the target QR code data into first change type QR code data and second change type QR code data, and obtain QR code content analysis data;

[0188] The details are as follows:

[0189] When the QR code content change coefficient is greater than or equal to the QR code content change coefficient threshold, determining that the corresponding target QR code data is first change type QR code data;

[0190] When the QR code content change coefficient is less than the QR code content change coefficient threshold, determining that the corresponding target QR code data is a second change type QR code data;

[0191] The data analysis module acquires the QR code content analysis data and transmits it to the QR code generation module;

[0192] The QR code generation module generates the QR code based on the QR code content analysis data;

[0193] Acquire QR code content analysis data, and acquire first change type QR code data and second change type QR code data according to the QR code content analysis data;

[0194] Obtain the QR code content data, and obtain the target QR code data according to the QR code content data;

[0195] See also Figure 3 When the target two-dimensional code data is the first change type two-dimensional code data, the target two-dimensional code data is generated into a multicolored two-dimensional code with randomly changeable outer code eyes, inner code eyes, code points and colors;

[0196] When the target two-dimensional code data is two-dimensional code data of the second variation type, the target two-dimensional code data is generated as a common two-dimensional code.

[0197] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to specific embodiments. Obviously, many modifications and variations are possible based on the contents of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for generating a variable anti-counterfeiting multi-color QR code based on AI recognition, characterized in that: include: Step S1: Acquire target QR code data, perform information analysis on the target QR code data based on the target QR code data to obtain a first content prevention coefficient, perform information change analysis on the target QR code data to obtain a second content prevention coefficient, perform historical interaction information analysis on the target QR code data to obtain a third content prevention coefficient, and define the target QR code data, the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient as QR code content data; The step S1 further includes the following specific steps: Step S11: Obtain target QR code data; Step S12: Mark the time value corresponding to the current moment as the first reference time point, mark the feature data monitoring period before the reference time point as the second reference time point, and mark the period between the first reference time point and the second reference time point as the content monitoring period; Step S13: Analyze the target QR code data to obtain a first content prevention coefficient; Step S13 further includes: The step S13 further includes the following specific steps: Step S131: Using a text recognition algorithm to extract text from the target two-dimensional code data at the first reference time point to obtain first two-dimensional code text data; Step S132: using a text recognition algorithm to extract text from the target two-dimensional code data at the second reference time point to obtain second two-dimensional code text data; The step S13 further includes the following specific steps: Step S133: performing a text content comparison on the first QR code text data and the second QR code text data. If the text content comparison results are consistent, the corresponding target QR code data is marked as the first type of QR code data. If the text content comparison results are inconsistent, the corresponding target QR code data is marked as the second type of QR code data. Step S134: when the target QR code data is the first type of QR code data, obtaining the first content prevention coefficient corresponding to the first type of QR code data; Step S135: When the target QR code data is the second type of QR code data, obtaining the first content prevention coefficient corresponding to the second type of QR code data; Step S135 further includes the following specific steps: Step S1351: randomly selecting a plurality of second-type QR code data at different time points during the content monitoring period to obtain a plurality of second-type QR code data; Step S1352: Repeat step S134 to obtain the content protection coefficient corresponding to each second-type QR code data to obtain multiple content protection coefficients, and average the obtained multiple content protection coefficients to obtain a first content protection coefficient; ; Where Nrf is the first content prevention coefficient, Mw1 to Mwa are the number of sensitive texts from the first to the ath sensitive text respectively, and Zfz is the sum of the number of characters in the text content; Step S14: performing information change analysis on the target QR code data to obtain a second content prevention coefficient; During the content monitoring period, randomly select b different monitoring time points, and obtain the text of the target QR code data corresponding to each monitoring time point to obtain multiple target QR code monitoring texts; Obtain the time difference between each target QR code monitoring text and the first reference time point respectively, obtain multiple monitoring time difference values, and arrange the obtained multiple monitoring time difference values ​​in descending order according to the numerical value, and name the target QR code monitoring texts corresponding to the multiple monitoring time difference values ​​as the first target QR code text to the bth target QR code text according to the arrangement order; Perform a text comparison between the first target QR code text and the second target QR code text. If the comparison results are consistent, the first target QR code text is marked as the first change type target text. If the comparison results are inconsistent, the first target QR code text is marked as the second change type target text. Similarly, compare the b target QR code text to obtain the second change type target text. Counting the number of target texts of the second change type to obtain a value for the number of changed texts, and calculating a ratio between the value for the number of changed texts and b to obtain a second content prevention coefficient; Step S15: Analyze historical interaction information of the target QR code data to obtain a third content prevention coefficient; ; Among them, Nfr3 is the third content prevention coefficient, Yjh is the average number of sample user interactions, Lsm is the cumulative number of monitoring scans, and Csm is the number of monitoring initial scans; Step S16: defining the target QR code data, the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient as QR code content data; Step S2: Obtaining a QR code content variation coefficient based on the QR code content data, wherein the QR code content data is obtained, and a first content prevention coefficient, a second content prevention coefficient, and a third content prevention coefficient are respectively obtained based on the QR code content data; and the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient are calculated to obtain the QR code content variation coefficient; and obtaining a QR code content change coefficient threshold value and performing a numerical comparison with the QR code content change coefficient, dividing the target QR code data into first change type QR code data and second change type QR code data, and obtaining QR code content analysis data; Step S3: Generate a QR code based on the QR code content data and the QR code content analysis data.

2. The method for generating a variable anti-counterfeiting multi-color QR code based on AI recognition according to claim 1, characterized in that: The step S134 further includes the following specific steps: Step S1341: Acquire the text content corresponding to the first type of QR code data to obtain the QR code content text; Step S1342: Set a sensitive text content respectively and name them as the first sensitive text content to the ath sensitive text content; Step S1343: Obtain the quantity of the first sensitive text content to the ath sensitive text content in the QR code content text respectively to obtain the quantity of the first sensitive text to the ath sensitive text.

3. The method for generating a variable anti-counterfeiting multi-color QR code based on AI recognition according to claim 2, characterized in that: The step S134 further includes the following specific steps: Step S1344: Count the number of characters in the QR code content text to obtain the sum of the number of characters in the text content; Step S1345: Calculate the content prevention coefficient corresponding to the second type of QR code data by adding the number of sensitive texts from the first to the ath sensitive text and the number of characters in the text content; Calculating the content prevention coefficient corresponding to the first type of QR code data; Step S1346: define the content prevention coefficient corresponding to the first type of QR code data as the first content prevention coefficient.

4. The method for generating a variable anti-counterfeiting multi-color QR code based on AI recognition according to claim 1, characterized in that: The step S3 further includes the following specific steps: Step S31: Acquire QR code content analysis data, and acquire first change type QR code data and second change type QR code data according to the QR code content analysis data; Step S32: Acquire the QR code content data, and acquire the target QR code data according to the QR code content data; Step S33: When the target two-dimensional code data is the first variable type two-dimensional code data, the target two-dimensional code data is generated into a multicolored two-dimensional code with randomly variable outer code eyes, inner code eyes, code points and colors; Step S34: When the target two-dimensional code data is two-dimensional code data of the second variation type, the target two-dimensional code data is generated into a common two-dimensional code.

5. A system for generating a variable anti-counterfeiting multi-color QR code based on AI recognition, applicable to the method for generating a variable anti-counterfeiting multi-color QR code based on AI recognition according to any one of claims 1 to 4, characterized in that: The specific working process of each module of the generation system is as follows: Data acquisition module: used to acquire target QR code data, perform information analysis on the target QR code data based on the target QR code data to obtain a first content prevention coefficient, perform information change analysis on the target QR code data to obtain a second content prevention coefficient, perform historical interaction information analysis on the target QR code data to obtain a third content prevention coefficient, and define the target QR code data, the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient as QR code content data; Data analysis module: used to obtain the QR code content change coefficient based on the QR code content data, obtain the QR code content change coefficient threshold value and perform numerical comparison with the QR code content change coefficient, divide the target QR code data into first change type QR code data and second change type QR code data, and obtain QR code content analysis data; QR code generation module: used to generate QR codes based on QR code content data and QR code content analysis data.

Citation Information

Patent Citations

  • Dynamic electronic two-dimensional code generation and recognition method

    CN106384143A

  • Dynamic two-dimensional code generation method, apparatus and device, and storage medium

    CN111160504A