Method and system for generating variable anti-counterfeiting colorful two-dimensional code based on AI identification

Through the variable anti-counterfeiting and colorful QR code generation method based on AI recognition, the content prevention coefficient and change coefficient threshold are used to generate colorful QR codes, which solves the problem of dynamic changes in the QR code data and insufficient scene adaptability in the existing technology. Achieve high security and low cost QR code generation.

CN119476334AActive Publication Date: 2025-02-18SHENZHEN DINGXUN TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing QR code generation methods cannot effectively dynamically change the generated data, which poses information security risks, and cannot adapt to different scenarios, making it difficult to control the cost of QR code generation.

Method used

Using the variable anti-counterfeiting and colorful QR code generation method based on AI recognition, the target QR code data is obtained to analyze information, calculate the content prevention coefficient, and divide the QR code data types according to the content change coefficient threshold to generate the corresponding colorful two-dimensional code.

Benefits of technology

It effectively guarantees the security of QR codes, improves the pertinence of colorful QR code application scenarios, and reduces the generation cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476334A_ABST
    Figure CN119476334A_ABST
Patent Text Reader

Abstract

The invention discloses a variable anti-fake colorful two-dimensional code generation method and system based on AI identification, relates to the field of two-dimensional codes, solves the problem that an existing two-dimensional code generation method is poor in safety, and comprises the steps that S1, target two-dimensional code data, a first content prevention coefficient, a second content prevention coefficient and a third content prevention coefficient are obtained respectively, s2, obtaining a two-dimensional code content change coefficient according to the two-dimensional code content data, obtaining a two-dimensional code content change coefficient threshold value, and performing numerical comparison on the two-dimensional code content change coefficient threshold value and the two-dimensional code content change coefficient to obtain two-dimensional code content analysis data; s3, two-dimensional code generation is carried out according to the two-dimensional code content data and the two-dimensional code content analysis data, content coverage is carried out on the two-dimensional code data with the high safety requirement through the randomly variable colorful two-dimensional codes, and the safety of two-dimensional code application can be effectively guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The existing two-dimensional code generation method has the following defects when generating a two-dimensional code:

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

[0004] 2. Existing variable colorful QR code generation programs cannot analyze QR code data and usually generate variable colorful QR codes uniformly, so that some scenarios where conventional QR codes can be used also use variable colorful QR codes, which makes 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 view of the shortcomings of the prior art, the purpose of the present invention is to provide a method and system for generating a variable anti-counterfeiting colorful two-dimensional code based on AI recognition. The present invention is based on acquiring target two-dimensional code data, performing information analysis on the target two-dimensional code data according to the target two-dimensional code data, obtaining a first content prevention coefficient, performing information change analysis on the target two-dimensional code data, obtaining a second content prevention coefficient, performing historical interaction information analysis on the target two-dimensional code data, obtaining a third content prevention coefficient, 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, acquiring 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, dividing the target two-dimensional code data into first change type two-dimensional code data and second change type two-dimensional code data, obtaining two-dimensional code content analysis data, and generating a two-dimensional code according to the two-dimensional code content data and the two-dimensional code content analysis data.

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

[0008] Step S1: acquiring target two-dimensional code data, performing information analysis on the target two-dimensional code data according to the target two-dimensional code data to obtain a first content prevention coefficient, performing information change analysis on the target two-dimensional code data to obtain a second content prevention coefficient, performing historical interaction information analysis on the target two-dimensional code data to obtain a third content prevention coefficient, and 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;

[0009] Step S2: obtaining a QR code content change coefficient according to the QR code content data, and obtaining a QR code content change coefficient threshold value and performing 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;

[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 two-dimensional code data;

[0013] Step S12: Mark the time value corresponding to the current moment as a first reference time point, mark a characteristic data monitoring duration before the reference time point as a second reference time point, and mark the period between the first reference time point and the second reference time point as a 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 two-dimensional code data to obtain a second content prevention coefficient;

[0016] Step S15: Analyze the 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 perform text extraction on 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 between the first two-dimensional code text data and the second two-dimensional code text data. If the text content comparison results are consistent, the corresponding target two-dimensional code data is marked as the first type of two-dimensional code data. If the text content comparison results are inconsistent, the corresponding target two-dimensional code data is marked as the second type of two-dimensional code data.

[0022] Step S134: when the target two-dimensional code data is the first type of two-dimensional code data, the content prevention coefficient corresponding to the first type of two-dimensional code data is acquired to obtain a first content prevention coefficient;

[0023] Step S135: when the target two-dimensional code data is the second type of two-dimensional code data, the content prevention coefficient corresponding to the second type of two-dimensional code data is acquired 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 two-dimensional code data at different time points during a content monitoring period to obtain a plurality of second-type two-dimensional code data;

[0026] Step S1352: Repeat step S134 to obtain the content prevention coefficient corresponding to each second type of two-dimensional code data, 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 two-dimensional code data to obtain the two-dimensional code content text;

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

[0030] Step S1343: respectively 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: The content prevention coefficient corresponding to the second type of QR code data is obtained by calculating the number of sensitive texts from the first sensitive text 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, and the specific formula is as follows:

[0034]

[0035] Wherein, Nrf is the content prevention coefficient corresponding to the first type of two-dimensional code data, Mw1 to Mwa are the number of sensitive texts from the first to the ath sensitive texts, 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 two-dimensional code data as the first content prevention coefficient.

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

[0038] Step S31: acquiring two-dimensional code content analysis data, and acquiring first-varying type two-dimensional code data and second-varying type two-dimensional code data according to the two-dimensional 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 multi-colored 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 the second variation type two-dimensional code data, the target two-dimensional code data is generated as 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 according to 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 according to the QR code content data, and obtain the QR code content change coefficient threshold value and compare the value with the QR code content change coefficient, divide the target QR code data into the first change type QR code data and the second change type QR code data, and obtain the QR code content analysis data;

[0045] QR code generation module: used to generate QR code 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 two-dimensional codes to cover the content for two-dimensional code data with high security requirements, which can effectively ensure the security of two-dimensional code application;

[0048] 2. The present invention generates different types of QR codes for different types of QR code contents by analyzing a variety of 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] In order 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 the overall system block diagram of the present invention;

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

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

[0054] Embodiment 1

[0055] See also Figure 1 The present invention provides a technical solution: a method for generating a variable anti-counterfeiting multi-color two-dimensional 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 two-dimensional code data;

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

[0059] Step S13: acquiring information of the target two-dimensional code data and analyzing 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 perform text extraction on 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 between the first two-dimensional code text data and the second two-dimensional code text data. If the text content comparison results are consistent, the corresponding target two-dimensional code data is marked as the first type of two-dimensional code data. If the text content comparison results are inconsistent, the corresponding target two-dimensional code data is marked as the second type of two-dimensional code data.

[0064] Step S134: when the target two-dimensional code data is the first type of two-dimensional code data, the content prevention coefficient corresponding to the first type of two-dimensional code data is acquired 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 two-dimensional code data to obtain the two-dimensional code content text;

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

[0068] Step S1343: respectively 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: The content prevention coefficient corresponding to the second type of QR code data is obtained by calculating the number of sensitive texts from the first sensitive text 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, and the specific formula is as follows:

[0072]

[0073] Wherein, Nrf is the content prevention coefficient corresponding to the first type of two-dimensional code data, Mw1 to Mwa are the number of sensitive texts from the first to the ath sensitive texts, 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 two-dimensional code data as a first content prevention coefficient;

[0075] Step S135: when the target two-dimensional code data is the second type of two-dimensional code data, the content prevention coefficient corresponding to the second type of two-dimensional code data is acquired 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 two-dimensional code data at different time points during a content monitoring period to obtain a plurality of second-type two-dimensional code data;

[0078] Step S1352: repeating step S134, respectively obtaining the content prevention coefficient corresponding to each second type of two-dimensional code data, obtaining multiple content prevention coefficients, and averaging the obtained multiple content prevention coefficients to obtain a first content prevention coefficient;

[0079] Step S14: performing information change analysis on the target two-dimensional 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 during the content monitoring period, and acquiring text of the target two-dimensional code data corresponding to each monitoring time point, to obtain a plurality of target two-dimensional code monitoring texts;

[0082] Step S142: respectively obtaining the time difference between each target two-dimensional code monitoring text and the first reference time point, obtaining a plurality of monitoring time difference values, and arranging the obtained plurality of monitoring time difference values ​​in descending order according to the numerical value, and respectively naming the target two-dimensional code monitoring texts corresponding to the plurality of monitoring time difference values ​​as the first target two-dimensional code text to the bth target two-dimensional code text according to the arrangement order;

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

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

[0085] Step S145: repeating steps S143 and S144, performing text comparison between the b-1th target two-dimensional code text and the bth target two-dimensional code text. If the comparison results are consistent, the b-1th target two-dimensional code text is marked as the first change type target text. If the comparison results are inconsistent, the b-1th target two-dimensional code text is marked as the second change type target text.

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

[0087] Step S15: Analyze the 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: within the content monitoring period, the total number of times the two-dimensional code corresponding to the target two-dimensional code data is scanned is counted to obtain the monitored cumulative scanning number;

[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 initial scans monitored;

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

[0092] Step S154: respectively obtaining 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 obtaining 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 monitored cumulative scanning number, and the monitored initial scanning number 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-party 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 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;

[0099] Step S2: obtaining a QR code content variation coefficient according to 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: obtaining the QR code content data, and obtaining the first content prevention coefficient, the second content prevention coefficient, and the third content prevention coefficient respectively 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 change coefficient threshold;

[0107] The threshold of the change coefficient of the QR code content is calculated. The specific formula is as follows:

[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 two-dimensional code content change coefficient with the two-dimensional code content change coefficient threshold, dividing the target two-dimensional code data into first change type two-dimensional code data and second change type two-dimensional code data, and obtaining two-dimensional code content analysis data;

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

[0112] Step S251: when the two-dimensional code content change coefficient is greater than or equal to the two-dimensional code content change coefficient threshold, determining that the corresponding target two-dimensional code data is first change type two-dimensional code data;

[0113] Step S252: when the two-dimensional code content change coefficient is less than the two-dimensional code content change coefficient threshold, determining that the corresponding target two-dimensional code data is second change type two-dimensional code data;

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

[0115] Step S31: acquiring two-dimensional code content analysis data, and acquiring first-varying type two-dimensional code data and second-varying type two-dimensional code data according to the two-dimensional 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 multi-colored 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 the second variation type two-dimensional code data, the target two-dimensional code data is generated as a common two-dimensional code.

[0119] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.

[0120] Embodiment 2

[0121] See also Figure 2 , based on another concept of the same invention, a variable anti-counterfeiting multi-color two-dimensional code generation system based on AI recognition is now proposed, including a data acquisition module, a data analysis module, a two-dimensional code generation module and a server, wherein the data acquisition module, the data analysis module and the two-dimensional code generation module are respectively connected to the server, and the server controls the data acquisition module, the data analysis module and the two-dimensional 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 a characteristic data monitoring duration 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 refers to the content data that needs to be covered by the QR code to be generated;

[0128] The basic content unit acquires information of the target QR code data and analyzes and obtains 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 a 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 between the first two-dimensional code text data and the second two-dimensional code text data, if the text content comparison results are consistent, marking the corresponding target two-dimensional code data as first-type two-dimensional code data, and if the text content comparison results are inconsistent, marking the corresponding target two-dimensional code data as second-type two-dimensional code data;

[0133] When the target two-dimensional code data is first-type two-dimensional code data, acquiring a content prevention coefficient corresponding to the first-type two-dimensional 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 two-dimensional code data to obtain the two-dimensional code content text;

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

[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 user name and password;

[0140] The quantity of the first sensitive text content to the mth sensitive text content in the QR code content is obtained respectively to obtain the quantity of the first sensitive text 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 text 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 obtained by calculating 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, and the specific formula is as follows:

[0146]

[0147] Wherein, Nrf is the content prevention coefficient corresponding to the first type of two-dimensional code data, Mw1 to Mwa are the number of sensitive texts from the first to the ath sensitive texts, 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 two-dimensional code data is defined as a first content prevention coefficient;

[0149] When the target two-dimensional code data is the second type of two-dimensional code data, the content prevention coefficient corresponding to the second type of two-dimensional code data is acquired 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 two-dimensional code data at different time points to obtain a plurality of second-type two-dimensional code data;

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

[0153] The information change unit performs information change analysis on the target two-dimensional 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 two-dimensional 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 two-dimensional code monitoring texts corresponding to the multiple monitoring time difference values ​​as the first target two-dimensional code text to the bth target two-dimensional code text respectively according to the arrangement order;

[0156] It should be noted here that:

[0157] In this application, the b involved here is the quantity value corresponding to the target two-dimensional code text, and the quantity value corresponding to the target two-dimensional 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 two-dimensional code text and the second target two-dimensional code text, if the comparison results are consistent, marking the first target two-dimensional code text as the first change type target text, if the comparison results are inconsistent, marking the first target two-dimensional code text as the second change type target text;

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

[0160] Repeat the above process to 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 of the number of changed texts, calculating the ratio of the value of the number of changed texts to b, and obtaining a second content prevention coefficient;

[0162] The user interaction unit performs historical interaction information analysis on 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 first 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 value corresponding to the sample scanning user, and c is an integer greater than 0;

[0168] Respectively obtain the number of user interactions that the first sample scanning user to the cth sample scanning user need to perform in the process of realizing 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 of 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-party 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 two-dimensional code data, the first content prevention coefficient, the second content prevention coefficient and the third content prevention coefficient are defined as two-dimensional 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, and obtains the QR code content change coefficient threshold value and compares the value with the QR code content change coefficient to obtain the QR code content analysis data;

[0177] 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;

[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 variation 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 of the change coefficient of the QR code content is calculated. The specific formula is as follows:

[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 two-dimensional code content change coefficient is greater than or equal to the two-dimensional code content change coefficient threshold, it is determined that the corresponding target two-dimensional code data is first change type two-dimensional code data;

[0190] When the two-dimensional code content change coefficient is less than the two-dimensional code content change coefficient threshold, it is determined that the corresponding target two-dimensional code data is the second change type two-dimensional 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 according to the QR code content analysis data;

[0193] Acquire the QR code content analysis data, and acquire the first change type QR code data and the 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 variable type two-dimensional code data, the target two-dimensional code data is generated into a multi-colored two-dimensional code with randomly variable outer code eyes, inner code eyes, code points and colors;

[0196] When the target two-dimensional code data is the second change type two-dimensional code data, 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 only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. 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: acquiring target two-dimensional code data, performing information analysis on the target two-dimensional code data according to the target two-dimensional code data to obtain a first content prevention coefficient, performing information change analysis on the target two-dimensional code data to obtain a second content prevention coefficient, performing historical interaction information analysis on the target two-dimensional code data to obtain a third content prevention coefficient, and 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; Step S2: obtaining a QR code content change coefficient according to the QR code content data, and obtaining a QR code content change coefficient threshold value and performing 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 two-dimensional code based on AI recognition according to claim 1, characterized in that: The step S1 further includes the following specific steps: Step S11: Obtain target two-dimensional code data; Step S12: mark the time value corresponding to the current moment as the first reference time point, mark a characteristic data monitoring duration 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.

3. The method for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition according to claim 2, characterized in that: Step S13: Analyze the target QR code data to obtain a first content prevention coefficient; Step S14: performing information change analysis on the target two-dimensional code data to obtain a second content prevention coefficient; Step S15: Analyze the historical interaction information of the target QR code data to obtain a third content prevention coefficient; 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.

4. The method for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition according to claim 3, characterized in that: The step S13 further includes the following specific steps: Step S131: using a text recognition algorithm to perform text extraction on the target two-dimensional code data at the first reference time point to obtain first two-dimensional code text data; Step S132: Use 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.

5. The method for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition according to claim 4, characterized in that: The step S13 further includes the following specific steps: Step S133: performing a text content comparison between the first two-dimensional code text data and the second two-dimensional code text data. If the text content comparison results are consistent, the corresponding target two-dimensional code data is marked as the first type of two-dimensional code data. If the text content comparison results are inconsistent, the corresponding target two-dimensional code data is marked as the second type of two-dimensional code data. Step S134: when the target two-dimensional code data is first-type two-dimensional code data, obtaining a first content prevention coefficient corresponding to the first-type two-dimensional code data; Step S135: when the target two-dimensional code data is second-type two-dimensional code data, a first content prevention coefficient corresponding to the second-type two-dimensional code data is obtained.

6. The method for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition according to claim 5, characterized in that: The step S13 further includes the following specific steps: The step S135 further includes the following specific steps: Step S1351: randomly selecting a plurality of second-type two-dimensional code data at different time points during a content monitoring period to obtain a plurality of second-type two-dimensional code data; Step S1352: Repeat step S134 to obtain the content prevention coefficient corresponding to each second type of two-dimensional code data, obtain multiple content prevention coefficients, and average the obtained multiple content prevention coefficients to obtain the first content prevention coefficient.

7. The method for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition according to claim 6, characterized in that: The step S134 further includes the following specific steps: Step S1341: Acquire the text content corresponding to the first type of two-dimensional code data to obtain the two-dimensional code content text; Step S1342: respectively set a sensitive text contents and name them as the first sensitive text content to the mth sensitive text content; Step S1343: respectively 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.

8. The method for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition according to claim 7, 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: The content prevention coefficient corresponding to the second type of QR code data is obtained by calculating the number of sensitive texts from the first sensitive text 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 two-dimensional code data as the first content prevention coefficient.

9. The method for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition according to claim 1, characterized in that: The step S3 further includes the following specific steps: Step S31: acquiring two-dimensional code content analysis data, and acquiring first-varying type two-dimensional code data and second-varying type two-dimensional code data according to the two-dimensional 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 multi-colored 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 the second variation type two-dimensional code data, the target two-dimensional code data is generated as a common two-dimensional code.

10. A system for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition, applicable to a method for generating a variable anti-counterfeiting multi-color two-dimensional code based on AI recognition as described in any one of claims 1 to 9, 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 according to 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 according to the QR code content data, and obtain the QR code content change coefficient threshold value and compare the value with the QR code content change coefficient, divide the target QR code data into the first change type QR code data and the second change type QR code data, and obtain the QR code content analysis data; QR code generation module: used to generate QR code 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

  • Colorful fillet anti-counterfeiting two-dimensional code generation method and device

    CN114021683A

  • Two-dimensional code word generation method, two-dimensional code recognition method and device

    CN117010330A

  • Deformation anti-counterfeiting two-dimensional code generation and identification method and system based on AI image identification

    CN118297091A