Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides an identification method and system based on a VR anti-counterfeiting technology.
An identification method based on VR anti-counterfeiting technology comprises the following steps: scanning the commodity to obtain a scanning video; setting anti-counterfeiting information of the commodity according to the scanned video, and storing the anti-counterfeiting information in a database of the server; after the commodity is traded, the user inquires the anti-counterfeiting information according to the appearance of the commodity to be identified.
Preferably, the step of setting the anti-counterfeiting information of the commodity according to the scanned video and storing the anti-counterfeiting information in the database of the server comprises: acquiring a preset number of pictures from the scanning video according to a preset rule; carrying out character recognition on the picture by utilizing an OCR plug-in to obtain recognized characters; segmenting the recognition characters according to a preset segmentation rule to obtain more than one phrase; and associating the picture, the phrase and the anti-counterfeiting information to complete the setting of the anti-counterfeiting information of the commodity.
Preferably, the step of querying the anti-counterfeiting information by the user according to the appearance of the commodity to be identified comprises: scanning a commodity to be identified to obtain a scanning video; acquiring a preset number of pictures from the scanning video according to a preset rule; carrying out character recognition on the picture by utilizing an OCR plug-in to obtain recognized characters; segmenting the recognition characters according to a preset segmentation rule to obtain more than one phrase; matching the phrases with phrases in a database; if the phrase matching is passed, matching the picture with the picture of the commodity which passes the phrase matching in the database; and if the pictures are matched, identifying the commodity and displaying the anti-counterfeiting information of the commodity to be identified.
Preferably, the step of querying the anti-counterfeiting information by the user according to the appearance of the commodity to be identified comprises: and inquiring the anti-counterfeiting information of the commodity according to the unique code of the commodity.
Preferably, the step of scanning the commodity to obtain the scanned video comprises: and shooting the commodity by 360 degrees by using the camera according to a preset shooting speed to obtain a scanned video.
An identification system based on VR anti-counterfeiting technology, comprising: the anti-counterfeiting information setting module and the anti-counterfeiting information identification module; the anti-counterfeiting information setting module is used for scanning the commodity to obtain a scanning video; setting anti-counterfeiting information of the commodity according to the scanned video, and storing the anti-counterfeiting information in a database of the server; and the anti-counterfeiting information identification module is used for inquiring anti-counterfeiting information according to the appearance of the commodity to be identified by a user after the commodity is traded.
Preferably, the anti-counterfeiting information setting module is further configured to obtain a preset number of pictures from the scanned video according to a preset rule; carrying out character recognition on the picture by utilizing an OCR plug-in to obtain recognized characters; segmenting the recognition characters according to a preset segmentation rule to obtain more than one phrase; and associating the picture, the phrase and the anti-counterfeiting information to complete the setting of the anti-counterfeiting information of the commodity.
Preferably, the anti-counterfeiting information identification module is further configured to scan the commodity to be identified to obtain a scanned video; acquiring a preset number of pictures from the scanning video according to a preset rule; carrying out character recognition on the picture by utilizing an OCR plug-in to obtain recognized characters; segmenting the recognition characters according to a preset segmentation rule to obtain more than one phrase; matching the phrases with phrases in a database; if the phrase matching is passed, matching the picture with the picture of the commodity which passes the phrase matching in the database; and if the pictures are matched, identifying the commodity and displaying the anti-counterfeiting information of the commodity to be identified.
Preferably, the anti-counterfeiting information identification module is further configured to query the anti-counterfeiting information of the commodity according to the unique code of the commodity.
Preferably, the anti-counterfeiting information setting module is further configured to use a camera to shoot the commodity at 360 degrees according to a preset shooting speed, so as to obtain a scanned video.
The invention has the beneficial effects that: according to the invention, before the commodity is sold, the picture and the phrase of the commodity are obtained, and the picture, the phrase and the anti-counterfeiting information of the commodity are associated and stored in the database. When the anti-counterfeiting information of the commodity needs to be inquired after the commodity is sold, the anti-counterfeiting information can be inquired through the appearance of the commodity to be identified, and the method is simple and convenient.
Detailed Description
The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic views illustrating only the basic structure of the present invention in a schematic manner, and thus show only the constitution related to the present invention.
Example 1
Referring to fig. 1 to 3, an identification method based on VR anti-counterfeiting technology includes:
s11, scanning the commodity to obtain a scanned video; specifically, a camera is used for shooting the commodity at 360 degrees according to a preset shooting speed, and a scanned video is obtained. In particular, the front and back sides of the watch are carefully photographed. The preset photographing speed may be 30 fps. The shot watch appearance video is stored in the server.
The commodity of this embodiment is the wrist-watch, and the merchant carries out the anti-fake information setting of all wrist-watches before selling the wrist-watch. The anti-counterfeiting information is set based on AR anti-counterfeiting technology. Before the anti-counterfeiting information is set, the merchant needs to perform authentication in the AR system, mainly the qualification information of the merchant, including information such as company name, address, contact, business license and the like. The merchant qualification is approved by an AR system administrator, and the merchant after approval can set AR anti-counterfeiting information on the watch.
S12, setting anti-counterfeiting information of the commodity according to the scanned video, and storing the anti-counterfeiting information in a database of the server;
and S13, after the commodity is traded, the user inquires the anti-counterfeiting information according to the appearance of the commodity to be identified.
Wherein, step S12 includes:
s121, acquiring a preset number of pictures from the scanning video according to a preset rule; specifically, a video recorded at a speed of 30fps is analyzed into 30 pictures every 1 second, and 5 pictures are fixedly acquired as effective pictures (1 st, 4 th, 9 th, 16 th and 25 th pictures respectively). Thus if a video is taken for N seconds, 5 x N pictures will be taken.
S122, carrying out character recognition on the picture by using an OCR plug-in unit to obtain recognized characters;
s123, segmenting the recognition characters according to a preset segmentation rule to obtain more than one phrase; specifically, the recognized characters are divided into a plurality of different phrases according to spaces (") and connectors (" - "), and are sequentially stored in a database according to the recognized sequence, and if the recognized characters exist, only one character is stored, and the character is not stored repeatedly; one of the phrases is a unique code on the back of the mobile phone.
And S124, associating the picture, the phrase and the anti-counterfeiting information to complete the setting of the anti-counterfeiting information of the commodity, and storing the picture and the phrase in a database of a server. The anti-counterfeiting information comprises currently used merchants, sale time, sale places (GPS addresses), watch brands, watch models, watch bar codes and AR identification related pictures.
Wherein, step S13 includes:
s131, scanning the commodity to be identified to obtain a scanned video; using the camera, the watch was scanned 360 degrees.
S132, acquiring a preset number of pictures from the scanned video according to a preset rule;
s133, character recognition is carried out on the picture by utilizing an OCR plug-in unit to obtain recognized characters;
s134, segmenting the recognition characters according to preset segmentation rules to obtain more than one phrase;
s135, matching the phrases with phrases in a database; and if the phrase number of the phrases of the commodity to be identified is the same as the phrase number of the commodity stored in the data, the matching is passed.
S136, if the phrase matching passes, matching the picture with the picture of the commodity which passes the phrase matching in the database; the specific matching process is as follows:
if the length of the currently uploaded video is M seconds, the number of pictures is 5 × M, and the hash algorithm is as follows:
step 1, reducing the size: the image is reduced to a size of 8 x 8 for a total of 64 pixels. The step has the effects of removing the details of the image, only retaining the basic information of structure/brightness and the like, and abandoning the image difference caused by different sizes/proportions;
step 2, simplifying color: converting the reduced image into 64-level gray, namely that all pixel points have 64 colors in total;
step 3, calculating an average value: calculating the gray level average value of all 64 pixels;
and 4, comparing the gray scale of the pixel: comparing the gray scale of each pixel with the average value, and recording the average value greater than or equal to 1 and the average value smaller than 0;
step 5, calculating a hash value: the comparison results from the previous step are combined to form a 64-bit integer, which is the fingerprint of the image. The order of the combination is not important as long as it is guaranteed that all images take the same order;
and 6, after the fingerprints are obtained, different images can be compared, and how many of the 64 bits are different. In theory, this is equivalent to the "Hamming distance" (in the information theory, the Hamming distance between two equal-length character strings is the number of different characters at the corresponding positions of the two character strings). If the number of the different data bits does not exceed 5, the two images are very similar; if greater than 10, this indicates that these are two different images. If the 5 x N pictures are compared in the 5 x M pictures, the total number of the compared 5 x N pictures is 25 x M x N times, if 22.5 x M x N (namely the probability of 90 percent) pictures in the comparison have different digits not exceeding 5, the group of pictures and the server anti-counterfeiting picture are considered to be consistent, at the moment, the APP can prompt that the identification is successful, and the identified watch anti-counterfeiting information, such as the brand, the model, the purchase time and the purchase place (GPS address) of the watch, is displayed.
And S137, if the pictures are matched, identifying the commodity and displaying the anti-counterfeiting information of the commodity to be identified.
As an alternative embodiment, step S13 includes: and inquiring the anti-counterfeiting information of the commodity according to the unique code of the commodity. Specifically, a unique code on the back of the watch is input, the unique code is compared with a stored phrase in a database, and when the identical commodities are compared, the commodities to be identified are identified. It should be noted that, in the process of setting the anti-counterfeiting information of the commodity, the system can identify all phrases on the bottom cover, and one group in the phrases is the unique code; therefore, the system is internally provided with the unique codes of various watches.
According to the scheme, before the commodity is sold, the picture and the phrase of the commodity are obtained, the picture, the phrase and the anti-counterfeiting information of the commodity are associated and stored in the database. When the anti-counterfeiting information of the commodity needs to be inquired after the commodity is sold, the anti-counterfeiting information can be inquired by inputting the unique code on the back of the commodity or shooting the appearance of the commodity, and the method is simple and convenient.
Example 2
Referring to fig. 4, an identification system based on VR anti-counterfeiting technology includes: the anti-counterfeiting information setting module 11 and the anti-counterfeiting information identification module 12; the anti-counterfeiting information setting module 11 is used for scanning the commodity to obtain a scanning video; setting anti-counterfeiting information of the commodity according to the scanned video, and storing the anti-counterfeiting information in a database of the server; the anti-counterfeiting information identification module 12 is used for inquiring anti-counterfeiting information according to the appearance of the commodity to be identified by a user after the commodity is traded.
In this embodiment, the anti-counterfeiting information setting module 11 is further configured to obtain a preset number of pictures from the scanned video according to a preset rule; carrying out character recognition on the picture by utilizing an OCR plug-in to obtain recognized characters; segmenting the recognition characters according to a preset segmentation rule to obtain more than one phrase; and associating the picture, the phrase and the anti-counterfeiting information to complete the setting of the anti-counterfeiting information of the commodity.
In this embodiment, the anti-counterfeiting information identification module 12 is further configured to scan the to-be-identified commodity to obtain a scanned video; acquiring a preset number of pictures from the scanning video according to a preset rule; carrying out character recognition on the picture by utilizing an OCR plug-in to obtain recognized characters; segmenting the recognition characters according to a preset segmentation rule to obtain more than one phrase; matching the phrases with phrases in a database; if the phrase matching is passed, matching the picture with the picture of the commodity which passes the phrase matching in the database; and if the pictures are matched, identifying the commodity and displaying the anti-counterfeiting information of the commodity to be identified.
In this embodiment, the anti-counterfeit information identification module 12 is further configured to query the anti-counterfeit information of the commodity according to the unique code of the commodity.
In this embodiment, the anti-counterfeit information setting module is further configured to use the camera to shoot the commodity at 360 degrees according to a preset shooting speed, so as to obtain a scanned video.
Before the commodity is sold, the anti-counterfeiting information setting module acquires the picture and the phrase of the commodity, associates the picture, the phrase and the anti-counterfeiting information of the commodity and stores the image, the phrase and the anti-counterfeiting information in the database. When the anti-counterfeiting information of the commodity needs to be inquired after the commodity is sold, the anti-counterfeiting information can be inquired by the anti-counterfeiting information identification module through the appearance of the commodity to be identified, and the method is simple and convenient.
In light of the foregoing description of the preferred embodiment of the present invention, many modifications and variations will be apparent to those skilled in the art without departing from the spirit and scope of the invention. The technical scope of the present invention is not limited to the content of the specification, and must be determined according to the scope of the claims.