Disclosure of Invention
The invention provides a traceability anti-counterfeiting method based on big data association degree analysis, aiming at overcoming at least one defect in the prior art.
In order to solve the technical problems, the technical scheme of the invention is as follows:
a tracing anti-counterfeiting method based on big data relevance analysis comprises the following steps:
s1: obtaining a tracing code, and obtaining a tracing serial number according to the tracing code;
s2: the tracing terminal application acquires data items with correlation degree when commodities circulate or sell;
s3: the tracing terminal sends the obtained tracing serial number and the data item of the correlation degree to a tracing system platform;
s4: a tracing anti-counterfeiting function interface in a tracing system platform receives a tracing serial number and associated degree data sent by a tracing terminal, and performs matching query;
s5: analyzing the association degree of the traceability serial number and the commodity association degree data item;
s6: and the tracing terminal displays the result.
In a preferred embodiment, in step S1, the tracing terminal application is opened, and the tracing code on the commodity packaging box is scanned to obtain the tracing serial number.
In a preferred embodiment, in step S1, the tracing terminal application is opened, and the tracing code query button is clicked to obtain the tracing serial number.
In a preferred embodiment, in step S1, the traceable serial number is generated by encrypting and performing bit operation on a traceable code generated by a traceable coding rule and a random sequence, and the steps are as follows:
s11: the tracing code is converted into a byte sequence through encryption operation;
s12: performing bit operation on the byte sequence and converting the byte sequence into characters;
s13: and splicing the characters converted each time together to generate a tracing serial number.
In a preferred embodiment, the step of querying the matching between the traceability serial number and the commodity association degree data in step S4 is as follows:
s41: the tracing anti-counterfeiting function module firstly searches whether a tracing serial number exists in a database, if the tracing serial number does not exist, the tracing serial number is returned to the tracing terminal to be displayed, and the query is finished;
s42: if the traceability serial number exists, matching whether the traceability serial number relevance data item sent by the traceability terminal meets the preset condition or not according to the relevance data item preset according to the actual condition of the commodity, if not, returning to the traceability terminal for displaying if the traceability serial number relevance data item does not meet the preset condition, prompting the consumer of the preset condition of the traceability serial number relevance data item, and finishing the query;
s43: if the traceability serial number exists and the current traceability serial number association degree data item meets the actual preset conditions of the commodity, the step S5 is performed.
In a preferred scheme, in step S5, querying a traceability code before encryption and bit operation corresponding to a database traceability serial number to obtain a batch number of the traceability code; according to the tracing batch number, writing the tracing serial number and the association degree data items into a scanned tracing serial number and association degree data item set and carrying out big data association degree analysis, wherein the steps are as follows:
s51: reading a traceability serial number and an association degree data item set, and distributing the traceability serial number and the association degree data item set to each computing node of the big data platform according to the traceability batch number;
s52: counting the occurrence frequency of each batch of traceability code relevance data items by each computing node of the big data platform, and converting the occurrence frequency into relevance indexes;
s53: comparing whether the query tracing serial number and the association degree data item meet the association degree index of big data association degree analysis or not, if not, returning to the condition that the tracing serial number and the association degree data item do not meet the association degree index of big data association degree analysis, prompting a consumer that the correlation degree relation between the tracing serial number and the association degree data item should be met, and finishing the query; otherwise, if the tracing sequence number is satisfied, the tracing related information of the tracing sequence number is returned.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that: a traceability anti-counterfeiting method based on big data relevance analysis is characterized in that a consumer scans a traceability label on a commodity once by using a traceability terminal to obtain a traceability serial number and relevance data items at the same time; inquiring whether the traceability serial numbers and the association degree data items exist or not and meet actual preset conditions of the commodities, so as to ensure whether the inquiry data are effective or not; according to the query result, performing big data association analysis on the source tracing serial number and the association degree data item set; according to the analysis result, whether the traceability serial number and the association degree data item of the inquiry meet the association degree analysis result or not is compared, so that the authenticity of the commodity information is ensured, namely the traceability and anti-counterfeiting effect of the commodity information is achieved.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product;
it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Example 1
As shown in fig. 1-2, a tracing anti-counterfeiting method based on big data association degree analysis includes the following steps:
s1: obtaining a tracing code, and obtaining a tracing serial number according to the tracing code;
s2: the tracing terminal application acquires data items with correlation degree when commodities circulate or sell;
s3: the tracing terminal sends the obtained tracing serial number and the data item of the correlation degree to a tracing system platform;
s4: a tracing anti-counterfeiting function interface in a tracing system platform receives a tracing serial number and associated degree data sent by a tracing terminal, and performs matching query;
s5: analyzing the association degree of the traceability serial number and the commodity association degree data item;
s6: and the tracing terminal displays the result.
In a specific implementation process, in step S1, the tracing terminal application is opened, and the tracing code on the commodity packaging box is scanned to obtain the tracing serial number.
In a specific implementation process, in step S1, the tracing terminal application is opened, and the tracing code query button is clicked to obtain the tracing serial number.
In a specific implementation process, in step S1, the tracing sequence number is generated by encrypting and bit-operating a tracing code generated by a tracing encoding rule and a random sequence, and the steps are as follows:
s11: the tracing code is converted into a byte sequence through encryption operation;
s12: performing bit operation on the byte sequence and converting the byte sequence into characters;
s13: and splicing the characters converted each time together to generate a tracing serial number.
In a specific implementation process, the matching query step of the traceability serial number and the commodity association degree data in step S4 is as follows:
s41: the tracing anti-counterfeiting function module firstly searches whether a tracing serial number exists in a database, if the tracing serial number does not exist, the tracing serial number is returned to the tracing terminal to be displayed, and the query is finished;
s42: if the traceability serial number exists, matching whether the traceability serial number relevance data item sent by the traceability terminal meets the preset condition or not according to the relevance data item preset according to the actual condition of the commodity, if not, returning to the traceability terminal for displaying if the traceability serial number relevance data item does not meet the preset condition, prompting the consumer of the preset condition of the traceability serial number relevance data item, and finishing the query;
s43: if the traceability serial number exists and the current traceability serial number association degree data item meets the actual preset conditions of the commodity, the step S5 is performed.
In the specific implementation process, in step S5, the database tracing serial number and the tracing code before encryption and bit operation are queried to obtain the batch number of the tracing code; according to the tracing batch number, writing the tracing serial number and the association degree data items into a scanned tracing serial number and association degree data item set and carrying out big data association degree analysis, wherein the steps are as follows:
s51: reading a traceability serial number and an association degree data item set, and distributing the traceability serial number and the association degree data item set to each computing node of the big data platform according to the traceability batch number;
s52: counting the occurrence frequency of each batch of traceability code relevance data items by each computing node of the big data platform, and converting the occurrence frequency into relevance indexes;
s53: comparing whether the query tracing serial number and the association degree data item meet the association degree index of big data association degree analysis or not, if not, returning to the condition that the tracing serial number and the association degree data item do not meet the association degree index of big data association degree analysis, prompting a consumer that the correlation degree relation between the tracing serial number and the association degree data item should be met, and finishing the query; otherwise, if the tracing sequence number is satisfied, the tracing related information of the tracing sequence number is returned.
A traceability anti-counterfeiting method based on big data relevance analysis is characterized in that a consumer scans a traceability label on a commodity once by using a traceability terminal to obtain a traceability serial number and relevance data items at the same time; inquiring whether the traceability serial numbers and the association degree data items exist or not and meet actual preset conditions of the commodities, so as to ensure whether the inquiry data are effective or not; according to the query result, performing big data association analysis on the source tracing serial number and the association degree data item set; and comparing whether the traceability serial number and the association degree data item of the query meet the association degree analysis result or not according to the analysis result, thereby ensuring the authenticity of the commodity information, namely achieving the effect of traceability and anti-counterfeiting of the commodity information.
Example 2
The tracing code on the commodity label is scanned through the tracing terminal, and the tracing serial number in the tracing code is obtained through analysis and decoding, and fig. 3 is a two-dimensional code decoding flow chart, for example, the analyzed tracing serial number is as follows:
“faeded7e66b906cad1075b96c84a67b0”;
the tracing serial number is generated by encrypting and bit operation according to a tracing coding rule and a tracing code generated by a random sequence; for example, the traceability code generated according to the encoding rule is "daxueching 09105n90j 833", and the traceability serial number after md5 encryption and bit operation is: "faded 7e66b906cad1075b96c84a67b 0", the traceability serial number is used as the consumer traceability anti-counterfeiting query entry, thus ensuring the irreversibility of the traceability code to the traceability serial number, and leading a counterfeiter not to be capable of obtaining the traceability code coding rule through the traceability sequence decoding, thereby leading the counterfeiter not to generate the traceability serial number in advance; counterfeiters can only obtain limited traceability serial numbers scanned and taken in a market at present, so that a premise is provided for the association analysis and anti-counterfeiting of big data in the following;
the method comprises the steps of obtaining relevant data items of commodities, such as time information, geographical location information and the like, wherein the time information and the geographical location information are selected in the embodiment, and different commodities can be selected according to different requirements;
the tracing terminal sends a tracing serial number and related data items to a tracing system tracing anti-counterfeiting function interface;
the tracing anti-counterfeiting function interface inquires a database, judges whether the sent tracing serial number exists or not, and if not, returns information that the tracing code does not exist and the commodity is false to the tracing terminal;
otherwise, whether the associated data item related to the commodity meets the actual preset condition of the commodity is judged, for example, whether the query term corresponding to the time information compared with the traceability serial number in the database is due or not is judged, and if not, the 'the commodity related data item does not meet the actual preset condition of the commodity' is returned to the traceability terminal.
It should be noted that the preset conditions of the traceability serial numbers and the associated data items can be set according to the actual conditions of the commodities; for example, the expiration time of the traceable serial number can be set according to the shelf life time of the commodity, and in this way, the consumer can automatically judge whether the commodity is a counterfeit or not according to the current time of scanning the commodity.
If the tracing serial number exists and the related data item of the commodity meets the actual preset condition of the commodity, inquiring an original tracing code corresponding to the tracing serial number, obtaining a commodity batch number corresponding to the tracing serial number from the original tracing code, obtaining the batch number, scanning and verifying the existing tracing serial number and the related data item data set, and calling a big data platform to perform correlation analysis on the tracing serial number and the data item set, wherein the steps mainly comprise:
and acquiring a traceability serial number and an associated data item set, distributing data to the big data platform computing node according to the traceability batch number, and distributing the read data to the next computing node by the big data platform computing node according to actual requirements. For example, the Storm flow computing big data platform is selected in the implementation of the embodiment, and other big data platforms can be selected according to needs. FIG. 4 is a block diagram of a processing structure using Storm big data association analysis, wherein the graph only reflects a processing framework model in an embodiment, and the specific detail how many nodes are deployed is planned according to the size of data volume; the node Spout acquires a related data item set according to the batch number, and distributes the preprocessed related data item to the next processing node Bolt; the processing node Bolt counts the occurrence frequency of the associated data items of the traceability serial numbers of each batch, and finally forms an association analysis result, for example, the association relationship between the traceability serial numbers and the geographic positions;
and inquiring whether the traceability serial number and the associated data item meet the association analysis result. For example, the query has a source sequence number of "faded 7e66b906cad1075b96c84a67b 0", and the associated data items are: "20170215, Guangzhou railway station", after big data association analysis, the commodity association geographical position is found to be: "Guangzhou south station" and "Guangzhou north station". The result shows that the consumer can know whether the commodity purchased by the consumer is purchased in the place above the market geographical position when the commodity meets the actual preset condition, so that the authenticity of the commodity is judged.
As shown in fig. 5, the two-dimensional code scanning module mainly uses the foregoing description as a standard, the commodity associated data item, for example, the geographic location, may be scanned and located by using the traceability terminal LBS location unit, the traceability anti-counterfeit module sequentially performs the query unit, the determination unit, the query counting unit, the association degree analysis unit, and the association result comparison unit, and finally returns the traceability anti-counterfeit result.
The same or similar reference numerals correspond to the same or similar parts;
the terms describing positional relationships in the drawings are for illustrative purposes only and are not to be construed as limiting the patent;
it should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.