CN111626392A - Anti-theft picture generation method based on two-dimensional code watermark - Google Patents

Anti-theft picture generation method based on two-dimensional code watermark Download PDF

Info

Publication number
CN111626392A
CN111626392A CN202010480746.2A CN202010480746A CN111626392A CN 111626392 A CN111626392 A CN 111626392A CN 202010480746 A CN202010480746 A CN 202010480746A CN 111626392 A CN111626392 A CN 111626392A
Authority
CN
China
Prior art keywords
thread
data
watermark
decryption
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010480746.2A
Other languages
Chinese (zh)
Inventor
王凤高
姚长鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Cinderella Intelligent Information Technology Co ltd
Original Assignee
Jiangsu Cinderella Intelligent Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Cinderella Intelligent Information Technology Co ltd filed Critical Jiangsu Cinderella Intelligent Information Technology Co ltd
Priority to CN202010480746.2A priority Critical patent/CN111626392A/en
Publication of CN111626392A publication Critical patent/CN111626392A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking

Abstract

The invention discloses a picture generation method for preventing burglary based on two-dimension code watermarking, belonging to the technical field of picture data processing, comprising the following steps: 1) setting the pattern of the picture on the bottom layer of the target picture through a printer; 2) selecting a target area on the top layer of the target image; 3) preprocessing the target area image; 4) determining a text character string corresponding to the target image, generating a two-dimensional code from the text character string, and converting the two-dimensional code into a binary image; 5) encrypting the watermark code in the step 3) by using a multithreading group encryption and decryption scheduling method based on double-card verification to obtain encrypted watermark information; 6) embedding the encrypted watermark code in a target channel of a target area image according to an adjacent pixel method; 7) and assigning the matrix of the changed target channel to a channel corresponding to the original image, and generating a watermark image. The double-encrypted watermark information is embedded into the commodity picture, so that data leakage is prevented, and the anti-counterfeiting and anti-theft performance is high.

Description

Anti-theft picture generation method based on two-dimensional code watermark
Technical Field
The invention relates to the technical field of picture data processing, in particular to a picture generation method for preventing burglary based on two-dimensional code watermarking.
Background
The two-dimensional code is a bar code for recording data symbol information by using black and white smelling figures distributed on a plane (in a two-dimensional direction) according to a certain rule by using a certain specific geometric figure. The method has the advantages of large information capacity, high reliability, flexible coding mode, strong confidentiality and anti-counterfeiting performance and the like.
The two-dimensional code is an information carrier, is also an important method and means for information acquisition and transmission, and can play a role in improving efficiency in various fields. With the popularization of intelligent terminals and the rapid popularization of mobile networks, the two-dimensional code becomes a window of the future data era. The two-dimensional code technology is widely used in the fields of mobile electronic commerce, fast character input, food safety management and the like.
The commodity picture is the patent and the product of each internet platform, how to prevent to be stolen by bad trade company, is the difficult point that puzzles each trade company and platform always, and the two-dimensional code pattern is paid through anti-fake on the commodity picture through combining two-dimensional code technique at present, but anti-fake, theftproof performance is poor, and lawless persons can use other two-dimensional code images to replace anti-fake payment two-dimensional code image, will cause serious loss for user, trade company and platform.
Based on the above, the invention designs a picture generation method for preventing burglary based on two-dimensional code watermarking, so as to solve the above mentioned problems.
Disclosure of Invention
The invention aims to provide a method for generating an anti-theft picture based on a two-dimensional code watermark, which aims to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a picture generation method for preventing burglary based on two-dimensional code watermarking comprises the following steps:
1) setting the pattern of the picture on the bottom layer of the target picture through a printer;
2) acquiring a target image of a target picture, and selecting a target area on the top layer of the target image;
3) preprocessing the target area image;
4) determining a text character string corresponding to a target image, generating a two-dimensional code from the text character string through a two-dimensional code generator, and converting the text character string into a binary image, namely converting the binary image into watermark codes with each bit being 0 and 1;
5) encrypting the watermark code in the step 3) by using a multithreading group encryption and decryption scheduling method based on double-card verification to obtain encrypted watermark information;
6) embedding a watermark: embedding the encrypted watermark code in a target channel of a target area image according to an adjacent pixel method;
7) and assigning the matrix of the changed target channel to a channel corresponding to the original image, keeping other channels of the original image unchanged, and generating a watermark image.
Preferably, the multithreading group encryption and decryption scheduling method based on double-card verification includes the following steps:
5.1) establishing at least one scheduling thread group comprising a main thread and a slave thread;
5.2) selecting a data encryption and decryption calling thread group, storing data into a data queue of a main thread by the data encryption and decryption calling thread, and waking up the main thread to enter a state of waking up after the main thread finishes data processing;
5.3) the main thread copies data to a data queue of the slave thread, wakes up the slave thread, calls the Hash fingerprint to encrypt and decrypt the data, and waits for waking up after the slave thread finishes data processing;
5.4) the slave thread calls a secret key K to encrypt and decrypt data and awakens a main thread;
5.5) the main thread compares the hash fingerprint with the key K operation result and wakes up the data encryption and decryption calling thread;
5.6) the data encryption and decryption calling thread judges whether the operation result is correct, if so, the identification is successful, otherwise, the identification cannot be carried out.
Preferably, the text character string in the step 4) is a website link character string.
Preferably, in the step 5.2), a data encryption and decryption calling thread group is selected according to the service request and the data volume.
Preferably, in the step 5.2), the data is stored at the tail of the main thread data queue, and in the step 5.3), the data is deleted after being taken out from the head of the main thread data queue.
Preferably, in the step 5.2), the data encryption and decryption calling thread wakes up the main thread by sending a first data processing event; in the step 5.3), the master thread wakes up the slave thread by sending a second data processing event to the slave thread; in the step 5.4), the slave thread wakes up the main thread by sending a first data processing completion event to the main thread; in the step 5.5), the main thread wakes up the data encryption and decryption calling thread by sending a second data processing completion event to the data encryption and decryption calling thread.
Compared with the prior art, the invention has the beneficial effects that: by adopting a multithreading group encryption and decryption scheduling method to embed the watermark information of the Hash fingerprint and the secret key K in the commodity picture, the security and the reliability of the stored data of the commodity picture are effectively ensured, the data leakage is prevented, the anti-counterfeiting and anti-theft performance is high, lawless persons can not be provided with the opportunity, and the condition that serious loss is caused by users, merchants and platforms is effectively avoided.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a technical scheme that: a picture generation method for preventing burglary based on two-dimensional code watermarking comprises the following steps:
1) setting the pattern of the picture on the bottom layer of the target picture through a printer;
2) acquiring a target image of a target picture, and selecting a target area on the top layer of the target image;
3) preprocessing the target area image;
4) determining a text character string corresponding to a target image, generating a two-dimensional code from the text character string through a two-dimensional code generator, and converting the text character string into a binary image, namely converting the binary image into watermark codes with each bit being 0 and 1;
5) encrypting the watermark code in the step 3) by using a multithreading group encryption and decryption scheduling method based on double-card verification to obtain encrypted watermark information;
6) embedding a watermark: embedding the encrypted watermark code in a target channel of a target area image according to an adjacent pixel method;
7) and assigning the matrix of the changed target channel to a channel corresponding to the original image, keeping other channels of the original image unchanged, and generating a watermark image.
The multithreading group encryption and decryption scheduling method based on double-card verification comprises the following steps:
5.1) establishing at least one scheduling thread group comprising a main thread and a slave thread;
5.2) selecting a data encryption and decryption calling thread group, storing data into a data queue of a main thread by the data encryption and decryption calling thread, and waking up the main thread to enter a state of waking up after the main thread finishes data processing;
5.3) the main thread copies data to a data queue of the slave thread, wakes up the slave thread, calls the Hash fingerprint to encrypt and decrypt the data, and waits for waking up after the slave thread finishes data processing;
5.4) calling a key K from the thread to encrypt and decrypt the data, and awakening the main thread;
5.5) the main thread compares the hash fingerprint with the key K operation result and wakes up the data encryption and decryption calling thread;
5.6) the data encryption and decryption calling thread judges whether the operation result is correct, if so, the identification is successful, otherwise, the identification cannot be carried out.
Wherein, the text character string in the step 4) is a website link character string.
And 5.2) selecting a data encryption and decryption calling thread group according to the service request and the data volume.
In step 5.2), data is stored at the tail of the main thread data queue, and in step 5.3), the data is deleted after being taken out from the head of the main thread data queue.
In the step 5.2), the data encryption and decryption calling thread wakes up the main thread by sending a first data processing event; in step 5.3), the master thread wakes up the slave thread by sending a second data processing event to the slave thread; in the step 5.4), the slave thread wakes up the main thread by sending a first data processing completion event to the main thread; and 5.5), the main thread wakes up the data encryption and decryption calling thread by sending a second data processing completion event to the data encryption and decryption calling thread.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (6)

1. A picture generation method for preventing burglary based on two-dimensional code watermark is characterized in that: the method comprises the following steps:
1) setting the pattern of the picture on the bottom layer of the target picture through a printer;
2) acquiring a target image of a target picture, and selecting a target area on the top layer of the target image;
3) preprocessing the target area image;
4) determining a text character string corresponding to a target image, generating a two-dimensional code from the text character string through a two-dimensional code generator, and converting the text character string into a binary image, namely converting the binary image into watermark codes with each bit being 0 and 1;
5) encrypting the watermark code in the step 3) by using a multithreading group encryption and decryption scheduling method based on double-card verification to obtain encrypted watermark information;
6) embedding a watermark: embedding the encrypted watermark code in a target channel of a target area image according to an adjacent pixel method;
7) and assigning the matrix of the changed target channel to a channel corresponding to the original image, keeping other channels of the original image unchanged, and generating a watermark image.
2. The method for generating the anti-theft picture based on the two-dimensional code watermark according to claim 1, characterized in that: the multithreading group encryption and decryption scheduling method based on double-card verification comprises the following steps:
5.1) establishing at least one scheduling thread group comprising a main thread and a slave thread;
5.2) selecting a data encryption and decryption calling thread group, storing data into a data queue of a main thread by the data encryption and decryption calling thread, and waking up the main thread to enter a state of waking up after the main thread finishes data processing;
5.3) the main thread copies data to a data queue of the slave thread, wakes up the slave thread, calls the Hash fingerprint to encrypt and decrypt the data, and waits for waking up after the slave thread finishes data processing;
5.4) the slave thread calls a secret key K to encrypt and decrypt data and awakens a main thread;
5.5) the main thread compares the hash fingerprint with the key K operation result and wakes up the data encryption and decryption calling thread;
5.6) the data encryption and decryption calling thread judges whether the operation result is correct, if so, the identification is successful, otherwise, the identification cannot be carried out.
3. The method for generating the anti-theft picture based on the two-dimensional code watermark according to claim 1, characterized in that: and 4) the text character string in the step 4) is a website link character string.
4. The method for generating the anti-theft picture based on the two-dimensional code watermark according to claim 2, characterized in that: and 5.2) selecting a data encryption and decryption calling thread group according to the service request and the data volume.
5. The method for generating the anti-theft picture based on the two-dimensional code watermark according to claim 2, characterized in that: in the step 5.2), data is stored at the tail of the main thread data queue, and in the step 5.3), the data is deleted after being taken out from the head of the main thread data queue.
6. The method for generating the anti-theft picture based on the two-dimensional code watermark according to claim 2, characterized in that: in the step 5.2), the data encryption and decryption calling thread wakes up the main thread by sending a first data processing event; in the step 5.3), the master thread wakes up the slave thread by sending a second data processing event to the slave thread; in the step 5.4), the slave thread wakes up the main thread by sending a first data processing completion event to the main thread; in the step 5.5), the main thread wakes up the data encryption and decryption calling thread by sending a second data processing completion event to the data encryption and decryption calling thread.
CN202010480746.2A 2020-05-30 2020-05-30 Anti-theft picture generation method based on two-dimensional code watermark Pending CN111626392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010480746.2A CN111626392A (en) 2020-05-30 2020-05-30 Anti-theft picture generation method based on two-dimensional code watermark

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010480746.2A CN111626392A (en) 2020-05-30 2020-05-30 Anti-theft picture generation method based on two-dimensional code watermark

Publications (1)

Publication Number Publication Date
CN111626392A true CN111626392A (en) 2020-09-04

Family

ID=72271195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010480746.2A Pending CN111626392A (en) 2020-05-30 2020-05-30 Anti-theft picture generation method based on two-dimensional code watermark

Country Status (1)

Country Link
CN (1) CN111626392A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220551A (en) * 2017-04-21 2017-09-29 上海海加网络科技有限公司 A kind of multithreading group encryption/decryption dispatching method verified based on double card and system
CN110503591A (en) * 2018-05-16 2019-11-26 武汉智云星达信息技术有限公司 The method that effective intelligent image zooming-out and certification based on feature contour two dimension code watermark compare

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220551A (en) * 2017-04-21 2017-09-29 上海海加网络科技有限公司 A kind of multithreading group encryption/decryption dispatching method verified based on double card and system
CN110503591A (en) * 2018-05-16 2019-11-26 武汉智云星达信息技术有限公司 The method that effective intelligent image zooming-out and certification based on feature contour two dimension code watermark compare

Similar Documents

Publication Publication Date Title
Tkachenko et al. Two-level QR code for private message sharing and document authentication
CN1091329C (en) System for embedding authentication information into image and image alteration detecting system
Cao et al. Hierarchical recovery for tampered images based on watermark self-embedding
CN101836221B (en) Security system using encoded image with puzzled image
CN1421814A (en) Digital anti-fake method
CN101010691A (en) Systems and methods for digital content security
CN107918791A (en) Quick Response Code generation, coding/decoding method and device in Quick Response Code reproduction process
US6742712B1 (en) Information card and information card system
Shivani et al. VPVC: verifiable progressive visual cryptography
CN108960387B (en) Anti-counterfeiting two-dimensional code and generation and identification method thereof
Chang et al. A block-based watermarking scheme for image tamper detection and self-recovery
Shivani et al. Progressive visual cryptography with unexpanded meaningful shares
Xiong et al. QR-3S: A high payload QR code secret sharing system for industrial Internet of Things in 6G networks
Cao et al. Secure QR code scheme based on visual cryptography
CN110503592B (en) Two-dimensional code anti-counterfeiting method and system based on digital watermark
Singh et al. Digital image watermarking: concepts and applications
Uludag Secure biometric systems
Arora et al. Privacy protection of digital images using watermarking and qr code-based visual cryptography
Zhong et al. A secure visual secret sharing scheme with authentication based on QR Code
CN114065148A (en) Block chain-based security management and disclosure tracing method for confidential documents
Bhoskar et al. A Survey on secrete communication through QR code steganography for military application
CN111626392A (en) Anti-theft picture generation method based on two-dimensional code watermark
Sun et al. An optical watermarking solution for authenticating printed documents
EP1116176B1 (en) Information card
CN109064375B (en) Zero watermark-based large data property identification method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200904