Anti-counterfeiting information embedding method, extraction method, device and storage medium
By setting multiple embedding areas in confidential files and adding positioning and fault-tolerant encoding, the problem of extracting anti-counterfeiting information from the torn files is solved, and efficient splicing and deduplication processing is achieved between file fragments, ensuring reliable traceability sex.
Patent Information
- Application Number
- CN202110311711.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-24
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2041-03-24
AI Technical Summary
It is difficult for the prior art to extract anti-counterfeiting information from torn confidential documents for traceability.
Determine multiple embedding areas in the page of the file to be printed, embed anti-counterfeiting encoding, and add positioning encoding and fault-tolerant encoding to the encoding to convert it into an anti-counterfeiting point block collection, which is used to extract through splicing and deduplication after the file is torn apart Anti-counterfeiting information.
When confidential documents are torn apart, anti-counterfeiting information can be extracted accurately and efficiently, solving the problem of difficult traceability in the prior art.
Smart Images

Figure CN113076528B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of anti-counterfeiting technology, and specifically to an anti-counterfeiting information embedding method, extraction method, device and storage medium. Background Art
[0002] In order to improve the security of confidential documents, a common method is to embed anti-counterfeiting information in the form of watermarks on confidential documents. When the confidential document needs to be verified, the anti-counterfeiting information is extracted according to the predetermined rules when the anti-counterfeiting information is embedded, so as to trace the source.
[0003] Understandably, if the confidential document is intact, it is relatively easy to extract the anti-counterfeiting information from the confidential document. However, users usually tear up the confidential document after using it to ensure the security of the document information; or, after being illegally printed by illegal elements, they tear it up maliciously. If the confidential document has been torn up, it is difficult to extract the anti-counterfeiting information from the torn confidential document for tracing. Summary of the invention
[0004] The present application provides an anti-counterfeiting information embedding method, extraction method, device and storage medium, so as to solve the problem in the prior art that it is difficult to extract anti-counterfeiting information from torn confidential documents for tracing.
[0005] In a first aspect, an embodiment of the present application provides an anti-counterfeiting information embedding method, comprising:
[0006] According to a preset embedding rule, N embedding areas are determined in a page of the document to be printed, wherein the embedding areas are used to embed the anti-counterfeiting code, and N≥2;
[0007] Encoding the anti-counterfeiting information according to a preset encoding rule to obtain the anti-counterfeiting information code;
[0008] Adding a positioning code and a fault-tolerant code to the anti-counterfeiting information code to obtain an anti-counterfeiting code, wherein the positioning code and the fault-tolerant code are used to perform positioning and fault-tolerant verification on the anti-counterfeiting code when extracting the anti-counterfeiting information;
[0009] According to a preset point block generation rule, the anti-counterfeiting code is converted into an anti-counterfeiting point block set, and is embedded in the N embedding areas respectively, wherein each of the embedding areas corresponds to one anti-counterfeiting point block set.
[0010] Preferably, the step of determining N embedding areas in a page of the file to be printed according to a preset embedding rule includes:
[0011] According to the page information of the file to be printed, N embedding areas are determined in the print data sparse area of the file to be printed and / or at the corners of the file to be printed.
[0012] Preferably, the anti-counterfeiting code also includes direction coding, angle coding, secret key coding and / or coding form coding;
[0013] The direction coding and / or angle coding is used to perform graphic correction when extracting anti-counterfeiting information;
[0014] The secret key encoding and / or encoding form encoding is used for security verification when extracting anti-counterfeiting information.
[0015] Preferably, the anti-counterfeiting information is at least one of the brand, model, individual information of the image forming device that will print the file to be printed and the time when the file to be printed is received;
[0016] The individual information of the image forming device is at least one of a serial number, an IP address, and a MAC address of the image forming device, and the individual information of the image forming device is unique information that is distinguished from other image forming devices;
[0017] The time of receiving the file to be printed includes at least one of year, month, day, hour, minute and second.
[0018] In a second aspect, an embodiment of the present application provides an anti-counterfeiting information extraction method, comprising:
[0019] Scanning a confidential document to be used for extracting anti-counterfeiting information, and obtaining image data corresponding to the confidential document, wherein the image data includes a plurality of repeatedly embedded anti-counterfeiting point block sets;
[0020] Determining the position of the anti-counterfeiting point block set in the image data according to the positioning code in the anti-counterfeiting point block set and a preset embedding rule;
[0021] Segment the image data according to the position of the anti-counterfeiting point block set to obtain M anti-counterfeiting point block slices, wherein each of the anti-counterfeiting point block slices corresponds to one of the anti-counterfeiting point block sets, and M≥2;
[0022] According to a preset point block generation rule, the M anti-counterfeiting point block slices are parsed to obtain M anti-counterfeiting code slices;
[0023] According to the preset fault tolerance rules, the M security code slices are combined and fault-tolerantly tested to determine whether any two or more security code slices contain repeated codes that comply with the fault tolerance rules;
[0024] If there are two or more anti-counterfeiting code slices containing repeated codes that comply with the fault tolerance rule, the two or more anti-counterfeiting code slices are deduplicated and then spliced to obtain an anti-counterfeiting code splicing set;
[0025] According to a preset coding rule, the anti-counterfeiting codes in the anti-counterfeiting code splicing set are converted into anti-counterfeiting information.
[0026] Preferably, the confidential document from which anti-counterfeiting information is to be extracted is two or more confidential document fragments.
[0027] Preferably, the step of converting the anti-counterfeiting codes in the anti-counterfeiting code splicing set into anti-counterfeiting information according to a preset coding rule includes:
[0028] Determining whether the anti-counterfeiting code splicing set contains a complete anti-counterfeiting code;
[0029] If the anti-counterfeiting code splicing set includes a complete anti-counterfeiting code, the anti-counterfeiting code in the anti-counterfeiting code splicing set is converted into anti-counterfeiting information according to a preset coding rule.
[0030] Preferably, it also includes:
[0031] If any two or more anti-counterfeiting code slices do not contain repeated codes that comply with the fault tolerance rule, then determine whether any anti-counterfeiting code slice contains a complete anti-counterfeiting code;
[0032] If the i-th security code slice contains a complete security code, the security code in the i-th security code slice is converted into character information to obtain security information, 1≤i≤M.
[0033] Preferably, after scanning the confidentiality document from which the anti-counterfeiting information is to be extracted and obtaining the image data corresponding to the confidentiality document, the method further comprises:
[0034] The tilt angle of the image data is corrected according to the direction point blocks and / or angle point blocks in the anti-counterfeiting point block set.
[0035] Preferably, according to a preset coding rule, the anti-counterfeiting codes in the anti-counterfeiting code splicing set are converted into anti-counterfeiting information, including:
[0036] According to a preset coding rule, the key code and / or the coding form code in the anti-counterfeiting code splicing set is converted into key information and / or coding form information;
[0037] Performing security verification on the anti-counterfeiting code according to the secret key information and / or encoding form information;
[0038] If the security check passes, the anti-counterfeiting information codes in the anti-counterfeiting code splicing set are converted into anti-counterfeiting information according to a preset coding rule.
[0039] In a third aspect, an embodiment of the present application provides an anti-counterfeiting information embedding device, comprising: a processor, a memory, and a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, which, when executed, enable the device to execute any one of the methods described in the first aspect.
[0040] In a fourth aspect, an embodiment of the present application provides an anti-counterfeiting information extraction device, comprising: a processor, a memory, and a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, which, when executed, enable the device to execute any one of the methods described in the second aspect.
[0041] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect.
[0042] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the second aspect.
[0043] By adopting the technical solution provided in the embodiment of the present application, multiple anti-counterfeiting information embedding areas are set in the confidential document. When the confidential document is torn into pieces, the anti-counterfeiting information can be accurately and efficiently extracted based on the spliced file fragments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 A schematic diagram of file fragmentation provided in an embodiment of the present application;
[0046] Figure 2 A schematic diagram of a method for embedding anti-counterfeiting information provided in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of a printing file provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of a method for extracting anti-counterfeiting information provided in an embodiment of the present application;
[0049] Figure 5 A schematic diagram of image data provided in an embodiment of the present application;
[0050] Figure 6 A schematic diagram of error extraction provided in an embodiment of the present application;
[0051] Figure 7 A schematic diagram of an anti-counterfeiting point block slice provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0053] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0054] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0055] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0056] In order to improve the security of confidential documents, a common method is to embed anti-counterfeiting information in confidential documents in the form of watermarks. When it is necessary to trace the source of the leak of confidential documents, the anti-counterfeiting information is extracted according to the predetermined rules when the anti-counterfeiting information is embedded, so as to trace the source.
[0057] Understandably, if the confidential document is complete, it is relatively easy to extract the anti-counterfeiting information from the confidential document. However, users usually tear up the confidential document after using it to ensure the security of the document information; or, after being illegally printed by illegal elements, they tear it up maliciously.
[0058] See also Figure 1 , is a schematic diagram of a file fragment provided in an embodiment of the present application. Figure 1As shown in the figure, the complete document is torn into 5 fragments, namely fragments A, B, C, D, and E. At this time, the watermark in the document may be decomposed into different fragments A, B, C, D, and E. It is difficult to extract the anti-counterfeiting information corresponding to the watermark from different fragments for tracing.
[0059] Based on this, the present application provides an anti-counterfeiting information embedding method, extraction method, device and storage medium, so as to solve the problem in the prior art that it is difficult to extract anti-counterfeiting information from torn confidential documents for tracing.
[0060] It is understandable that before tracing the anti-counterfeiting information, it is first necessary to embed the anti-counterfeiting information in the confidentiality document.
[0061] See also Figure 2 , is a flow chart of an anti-counterfeiting information embedding method provided in an embodiment of the present application. Figure 2 As shown, it mainly includes the following steps.
[0062] Step S201: according to a preset embedding rule, N embedding areas are determined in a page of a to-be-printed document, wherein the embedding areas are used to embed anti-counterfeiting codes, and N≥2.
[0063] First, obtain the file to be printed. Specifically, the file to be printed is an electronic document, which can be in image format, PDF format or text format. The embodiment of the present application does not impose any specific restrictions on this.
[0064] According to the preset embedding rules, N embedding areas are determined in the page of the file to be printed. It is understandable that when a file is torn, some file fragments are likely to be lost, that is, the anti-counterfeiting information can only be extracted based on some file fragments. Based on this, the embodiment of the present application sets multiple embedding areas in the file to be printed, that is, N≥2, and each embedding area will be used to embed a complete set of anti-counterfeiting codes.
[0065] In the embodiment of the present application, the embedding rules may include the following two types.
[0066] The first one:
[0067] Analyze the print data distribution area of the file to be printed. In the area with dense print data, a small amount of or no embedded area can be set to reduce the impact of the subsequent embedded anti-counterfeiting information on the content or image of the printed file. In the area with sparse print data, the embedded area can be appropriately increased to increase the reliability of subsequent traceability. Specifically, the amount of print data in a certain area can be compared with a preset threshold. When the amount of print data is greater than the threshold, it is determined to be a dense print data area; when the amount of print data is less than the threshold, it is determined to be a sparse print data area.
[0068] Second type:
[0069] Set a mark at a specific position on the document to be printed based on the size information of the document to be printed. Figure 3 , is a schematic diagram of a printing file provided in an embodiment of the present application. Figure 3 As shown, the print file is A4 size. Generally, the print data is 25.4mm away from the top and bottom margins, and 31.8mm away from the left and right margins. Therefore, marks can be set at the four corners of the A4 size print file (i.e. Figure 3 The four points in the middle of the printed document are used as the reference to determine the embedding area of the anti-counterfeiting code. The embedding area can be the four corners of the printed document (the fragments of the four corners are easier to determine). Of course, those skilled in the art can also set marks on the four sides of the printed document, and this application does not limit this.
[0070] Step S202: Encode the anti-counterfeiting information according to a preset encoding rule to obtain the anti-counterfeiting information code.
[0071] Before encoding the anti-counterfeiting information, it is necessary to obtain the anti-counterfeiting information. The anti-counterfeiting information may be at least one of the brand, model, individual information of the image forming device that is about to print the file to be printed, and the time when the file to be printed is received. The individual information of the image forming device may be the unique information of the image forming device such as the serial number, IP address, MAC address, etc. that distinguishes the image forming device from other image forming devices, and the time when the file to be printed is received includes the year, month, day, hour, minute, second, etc. In a specific implementation, when the image forming device receives the file to be printed sent by the user using the terminal device, it will record and store the time of receiving the file to be printed and its own serial number and other unique identification information. The image forming device may be a printer, copier, fax machine, scanner, and other image forming devices.
[0072] The anti-counterfeiting information is encoded, that is, the anti-counterfeiting information is converted into binary digital information. The encoding rules can adopt common information encoding methods such as ASCII code, GB2312, GBK, GB18030, etc. Of course, those skilled in the art can also adopt other encoding methods, and the embodiments of the present application do not make specific restrictions on this.
[0073] Step S203: adding a positioning code and an error-tolerant code to the anti-counterfeiting information code to obtain an anti-counterfeiting code, wherein the positioning code and the error-tolerant code are respectively used for positioning and error-tolerant verification of the anti-counterfeiting code when extracting the anti-counterfeiting information.
[0074] Specifically, after the anti-counterfeiting information is converted into binary digital information according to the coding rules, the binary digital information is discretely combined to form an anti-counterfeiting information coding matrix of fixed length and width, and the anti-counterfeiting information coding matrix is expanded in rows and columns, and binary codes such as positioning code, direction code, angle code, fault-tolerant code, key code, and coding form code are added to the corresponding positions in the expanded matrix, thereby forming a complete anti-counterfeiting code. It can be understood that the expansion method of the above-mentioned coding matrix and the insertion method of the relevant special code (positioning code, direction code, angle code, fault-tolerant code, key code, coding form code) are various, and the embodiment of the present application does not limit this.
[0075] Specifically:
[0076] The positioning code is used to locate the anti-counterfeiting code when extracting the anti-counterfeiting information, so that the camera or scanner can read the anti-counterfeiting code accurately and quickly.
[0077] Direction coding and angle coding are used to perform graphic correction when extracting anti-counterfeiting information. That is to say, a certain angle and direction deviation can be allowed in the image data containing the code. By automatically identifying the internal correction information, it plays an automatic correction role and improves the decoding accuracy.
[0078] Fault-tolerant coding is used to perform fault-tolerant verification on spliced anti-counterfeiting code slices when extracting anti-counterfeiting information. In this way, even if the anti-counterfeiting code is partially damaged due to perforation, stains, etc., the camera or scanner can still read it correctly.
[0079] The key code and the encoding form code are used for security verification when extracting anti-counterfeiting information. Specifically, when decoding, the corresponding key code and encoding form code and other key information can be decoded first, and the anti-counterfeiting code can be security verified through the key information and encoding form information. If the security verification passes, the anti-counterfeiting information code is decoded to improve the confidentiality of the information.
[0080] Step S204: according to a preset point block generation rule, convert the anti-counterfeiting code into an anti-counterfeiting point block set, and embed the anti-counterfeiting point block set into the N embedding areas respectively, wherein each of the embedding areas corresponds to one anti-counterfeiting point block set.
[0081] It is understandable that the anti-counterfeiting code generated in the above step S203 is a digital matrix. If it is to be embedded in a printed document, the digital matrix needs to be converted into a corresponding graphic. Therefore, the embodiment of the present application converts the anti-counterfeiting code into an anti-counterfeiting point block set according to a preset point block generation rule.
[0082] In a specific implementation, no matter the file to be printed is a black and white print job or a color print job, the anti-counterfeiting point block set is embedded in the N embedding areas. Preferably, specific channels of the N embedding areas can be embedded, and the specific channels include a yellow channel or an invisible color channel to minimize the impact on the printed data.
[0083] The anti-counterfeiting point block set is embedded into N embedding areas respectively, and then printing can be performed to form an encrypted document, that is, a confidential file.
[0084] As mentioned above, users usually tear up confidential documents after using them to ensure the security of the document information; or, after being illegally printed by illegal elements, they are maliciously torn up. At this time, if you want to trace the anti-counterfeiting information, you can select any two fragments with the largest area possible for splicing (it can be understood that the larger the area, the more anti-counterfeiting information it carries, and the greater the probability of obtaining complete anti-counterfeiting information), and use a camera or scanner to extract the anti-counterfeiting information, and deduplicate the information of the spliced duplicate parts, and then obtain the complete anti-counterfeiting information. The following is a detailed explanation.
[0085] See also Figure 4 , is a schematic diagram of a flow chart of an anti-counterfeiting information extraction method provided in an embodiment of the present application. Figure 4 As shown, it mainly includes the following steps.
[0086] Step S401: Scanning a confidential document from which anti-counterfeiting information is to be extracted, and obtaining image data corresponding to the confidential document, wherein the image data includes a set of anti-counterfeiting point blocks.
[0087] It is understandable that when the confidential document is torn, the confidential document scanned here is a spliced confidential document fragment. Specifically, it can be a splicing of two fragments with a larger area and less printed data. For example, select Figure 1 The fragments A and C shown are spliced together. Then, a camera or a scanner is used to scan the spliced confidential document fragments to obtain image data corresponding to the confidential document fragments.
[0088] See also Figure 5 , is a schematic diagram of image data provided in an embodiment of the present application. Figure 5 As shown, the anti-counterfeiting information in the image data is in the form of a dot matrix, that is, a set of anti-counterfeiting dot blocks. In an optional embodiment, the anti-counterfeiting dot block set is invisible to the naked eye and can only be extracted using a camera or a scanner. Each dot block in the anti-counterfeiting dot block set contains specific information. For example, the black dot block with a square is a positioning dot block, and the dot block with a circle is a fault-tolerant dot block. For the convenience of viewing, the dot block is drawn as a black dot. In actual application, it can be a yellow dot or a fluorescent dot that is invisible to the naked eye. Figure 5The dotted line in the figure is a dividing line, and the anti-counterfeiting information on both sides of the dotted line is the same, that is, the anti-counterfeiting information is repeatedly embedded on both sides of the dotted line.
[0089] In order to facilitate subsequent data processing, a PC can be used to perform color enhancement and morphological processing on the image data to obtain enhanced image data.
[0090] Step S402: determining the position of the anti-counterfeiting point block set in the image data according to the positioning code in the anti-counterfeiting point block set and a preset embedding rule.
[0091] It should be pointed out that in the above-mentioned image data, in addition to the embedded anti-counterfeiting point block set, point blocks that do not carry any information themselves are also stored. These point blocks will cause interference. Therefore, it is necessary to use the embedded positioning point blocks and preset embedding rules to accurately determine the position of the embedded anti-counterfeiting point block set for extraction.
[0092] In addition, since the anti-counterfeiting point block set is repeatedly embedded, it is necessary to use the positioning point block and the preset embedding rules to accurately determine the anti-counterfeiting point block set to avoid extraction errors.
[0093] See also Figure 6 , is a schematic diagram of error extraction provided in an embodiment of the present application. Figure 6 In the figure, there should be a group of anti-counterfeiting point blocks above the dotted line, and there should be a group of anti-counterfeiting point blocks below the dotted line. If the position of the anti-counterfeiting point block set is not confirmed by using the positioning point blocks and the predetermined embedding rules, the anti-counterfeiting point block set will most likely be mistakenly identified and extracted as the point block set within the dotted box, resulting in an error in the extraction of the anti-counterfeiting point block set.
[0094] It should be pointed out that Figure 6 This is only an exemplary description. In the embodiment of the present application, the incorrect identification refers to the failure to identify the range where a set of anti-counterfeiting point blocks are located. Figure 6 The recognition range of the dashed box in the middle spans across multiple anti-counterfeiting point block sets.
[0095] In an optional embodiment, the anti-counterfeiting point block set also includes direction point blocks and / or angle point blocks, and the tilt angle of the image data can be corrected according to the direction point blocks and / or angle point blocks in the anti-counterfeiting point block set.
[0096] Step S403: Segment the image data according to the position of the anti-counterfeiting point block set to obtain M anti-counterfeiting point block slices, wherein each of the anti-counterfeiting point block slices corresponds to one of the anti-counterfeiting point block sets, and M≥2.
[0097] After the position of the anti-counterfeiting point block set is determined in step S402, the image data is segmented according to the position of the anti-counterfeiting point block set to obtain M anti-counterfeiting point block slices. It can be understood that the number of anti-counterfeiting point block slices matches the number of anti-counterfeiting point block sets, and one anti-counterfeiting point block slice corresponds to one anti-counterfeiting point block set. Of course, the anti-counterfeiting point block set in the anti-counterfeiting point block slice may also be incomplete, that is, one anti-counterfeiting point block slice only contains part of the point blocks in one anti-counterfeiting point block set.
[0098] See also Figure 7 , is a schematic diagram of an anti-counterfeiting point block slice provided in an embodiment of the present application. In the implementation of the present application, the image data is cut into 4 anti-counterfeiting point block slices.
[0099] Step S404: according to a preset point block generation rule, the M anti-counterfeiting point block slices are parsed to obtain M anti-counterfeiting code slices.
[0100] It can be understood that each dot block in the anti-counterfeiting dot block slice corresponds to specific information, so the anti-counterfeiting dot block slice can be parsed according to the dot block generation rule to obtain the corresponding anti-counterfeiting code slice.
[0101] See Table 1-Table 4 for Figure 7 The security code slices corresponding to the 4 security point block slices shown are binary security codes.
[0102]
[0103]
[0104] Step S405: According to the preset fault tolerance rules, the M anti-counterfeiting code slices are combined and fault-tolerantly tested to determine whether any two or more anti-counterfeiting code slices contain repeated codes that comply with the fault tolerance rules.
[0105] As shown above, in order to perform fault-tolerant verification, when generating the security code, the fault-tolerant code is inserted into the security code. In the specific implementation, the M security code slices can be combined in pairs to determine whether there are repeated codes that meet the fault-tolerant rules in the combined security code slices. For example, the shaded parts in Tables 1 and 2 above are repeated codes that meet the fault-tolerant rules; the shaded parts in Tables 3 and 4 are repeated codes that meet the fault-tolerant rules.
[0106] Step S406: If there are two or more security code slices containing repeated codes that comply with the error tolerance rule, the two or more security code slices are deduplicated and then spliced to obtain a security code splicing set.
[0107] Since the repeated code is an inserted repeated part, deduplication processing is required after the two anti-counterfeiting code slices are spliced.
[0108] For example, after concatenating Table 1 and Table 2, the shaded parts are deduplicated to obtain Table 5.
[0109]
[0110] Table 5
[0111] Step S407: according to a preset coding rule, the anti-counterfeiting codes in the anti-counterfeiting code splicing set are converted into anti-counterfeiting information.
[0112] It can be understood that the codes shown in Table 5 are binary codes. In order to facilitate users to read the information carried in the binary codes, it is necessary to decode the binary codes to obtain relevant anti-counterfeiting information. For example, after decoding the binary codes shown in Table 5, the anti-counterfeiting information obtained is "printed using XX printer at XX hours and XX minutes on XX days of XX months of XX years".
[0113] It should be noted that the anti-counterfeiting information is the anti-counterfeiting information embedded in the anti-counterfeiting information embedding step. Those skilled in the art can embed other anti-counterfeiting information according to actual needs, and the embodiments of the present application do not limit the specific content of the anti-counterfeiting information.
[0114] In an optional embodiment, the anti-counterfeiting code splicing set also includes secret key codes and / or coding form codes. In this case, step S407 specifically includes: according to a preset coding rule, converting the secret key codes and / or coding form codes in the anti-counterfeiting code splicing set into secret key information and / or coding form information; performing a security check on the anti-counterfeiting code according to the secret key information and / or coding form information; if the security check passes, converting the anti-counterfeiting information code in the anti-counterfeiting code splicing set into anti-counterfeiting information according to the preset coding rule. That is to say, when there is a secret key code and / or coding form code, first decode the secret key code and / or coding form code, and if it meets the relevant verification conditions, then decode the anti-counterfeiting information code.
[0115] In an optional embodiment, after the anti-counterfeiting code slices are spliced, it is determined whether the anti-counterfeiting code splicing set contains a complete anti-counterfeiting code; if the anti-counterfeiting code splicing set contains a complete anti-counterfeiting code, the anti-counterfeiting code in the anti-counterfeiting code splicing set is converted into anti-counterfeiting information according to a preset coding rule; if the anti-counterfeiting code splicing set does not contain a complete anti-counterfeiting code, the anti-counterfeiting information extraction fails.
[0116] In an optional embodiment, any two or more security code slices may not contain repeated codes that comply with the fault-tolerance rules. In this case, it is determined whether any one of the security code slices contains a complete security code. If any one of the security code slices contains a complete security code, the security code in the security code slice is converted into character information to obtain anti-counterfeiting information.
[0117] By adopting the technical solution provided in the embodiment of the present application, multiple anti-counterfeiting information embedding areas are set in the confidential document. When the confidential document is torn into pieces, the anti-counterfeiting information can be accurately and efficiently extracted based on the spliced file fragments.
[0118] Corresponding to the above-mentioned embodiments, the present application also provides an anti-counterfeiting information embedding device, which includes: a processor, a memory, and a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, and when the instructions are executed, the image forming device performs some or all of the steps in the above-mentioned method embodiments.
[0119] Corresponding to the above-mentioned embodiments, the present application also provides an anti-counterfeiting information extraction device, which includes: a processor, a memory, and a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, and when the instructions are executed, the image forming device performs some or all of the steps in the above-mentioned method embodiments.
[0120] In a specific implementation, the present application also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided in the present application. The above-mentioned storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0121] In a specific implementation, an embodiment of the present application further provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes some or all of the steps in the above method embodiment.
[0122] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0123] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0124] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0125] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for embedding anti-counterfeiting information, characterized in that: include: According to a preset embedding rule, N embedding areas are determined in the page of the document to be printed, wherein the embedding areas are used to embed the anti-counterfeiting code, N≥2, and each of the embedding areas will be used to embed a complete set of anti-counterfeiting codes; Encoding the anti-counterfeiting information according to a preset encoding rule to obtain the anti-counterfeiting information code; A positioning code and a fault-tolerant code are added to the anti-counterfeiting information code to obtain an anti-counterfeiting code, wherein the positioning code is used to position the anti-counterfeiting code when extracting the anti-counterfeiting information, and the image data is segmented according to the positioning result to obtain a plurality of anti-counterfeiting point block slices, and the fault-tolerant code is used to perform fault-tolerant verification on the anti-counterfeiting code when extracting the anti-counterfeiting information, and the anti-counterfeiting code slices corresponding to the anti-counterfeiting point block slices are spliced according to the result of the fault-tolerant verification, and the image data is the image data corresponding to the confidential file of the anti-counterfeiting information to be extracted, and the confidential file of the anti-counterfeiting information to be extracted is two or more confidential file fragments; According to a preset point block generation rule, the anti-counterfeiting code is converted into an anti-counterfeiting point block set, and is embedded in the N embedding areas respectively, wherein each of the embedding areas corresponds to one anti-counterfeiting point block set.
2. The method according to claim 1, characterized in that The step of determining N embedding areas in a page of the file to be printed according to a preset embedding rule includes: According to the page information of the file to be printed, N embedding areas are determined in the print data sparse area of the file to be printed and / or at the corners of the file to be printed.
3. The method according to claim 1, characterized in that The anti-counterfeiting code also includes direction coding, angle coding, secret key coding and / or coding form coding; The direction coding and / or angle coding is used to perform graphic correction when extracting anti-counterfeiting information; The secret key encoding and / or encoding form encoding is used for security verification when extracting anti-counterfeiting information.
4. The method according to claim 1, characterized in that The anti-counterfeiting information is at least one of the brand, model, individual information of the image forming device that will print the file to be printed and the time when the file to be printed is received; The individual information of the image forming device is at least one of a serial number, an IP address, and a MAC address of the image forming device, and the individual information of the image forming device is unique information that is distinguished from other image forming devices; The time of receiving the file to be printed includes at least one of year, month, day, hour, minute and second.
5. A method for extracting anti-counterfeiting information, characterized in that: include: Scanning a confidential document to be used for extracting anti-counterfeiting information, and obtaining image data corresponding to the confidential document, wherein the image data includes a plurality of repeatedly embedded anti-counterfeiting point block sets; Determining the position of the anti-counterfeiting point block set in the image data according to the positioning code in the anti-counterfeiting point block set and a preset embedding rule; According to the position of the anti-counterfeiting point block set, the image data is segmented to obtain M anti-counterfeiting point block slices, wherein each of the anti-counterfeiting point block slices corresponds to one of the anti-counterfeiting point block sets, M≥2, and the number of the anti-counterfeiting point block slices matches the number of the anti-counterfeiting point block sets; According to a preset point block generation rule, the M anti-counterfeiting point block slices are parsed to obtain M anti-counterfeiting code slices; According to the preset fault tolerance rules, the M security code slices are combined and fault-tolerantly tested to determine whether any two or more security code slices contain repeated codes that comply with the fault tolerance rules; If there are two or more anti-counterfeiting code slices containing repeated codes that comply with the fault tolerance rule, the two or more anti-counterfeiting code slices are deduplicated and then spliced to obtain an anti-counterfeiting code splicing set; According to a preset coding rule, the anti-counterfeiting codes in the anti-counterfeiting code splicing set are converted into anti-counterfeiting information; The confidential document from which the anti-counterfeiting information is to be extracted is two or more confidential document fragments.
6. The method according to claim 5, characterized in that The step of converting the anti-counterfeiting codes in the anti-counterfeiting code splicing set into anti-counterfeiting information according to a preset coding rule includes: Determining whether the anti-counterfeiting code splicing set contains a complete anti-counterfeiting code; If the anti-counterfeiting code splicing set includes a complete anti-counterfeiting code, the anti-counterfeiting code in the anti-counterfeiting code splicing set is converted into anti-counterfeiting information according to a preset coding rule.
7. The method according to claim 5, characterized in that Also includes: If any two or more anti-counterfeiting code slices do not contain repeated codes that comply with the fault tolerance rule, then determine whether any anti-counterfeiting code slice contains a complete anti-counterfeiting code; If the i-th security code slice contains a complete security code, the security code in the i-th security code slice is converted into character information to obtain security information, 1≤i≤M.
8. The method according to claim 5, characterized in that After scanning the confidential document to be extracted with anti-counterfeiting information and obtaining the image data corresponding to the confidential document, the method further includes: The tilt angle of the image data is corrected according to the direction point blocks and / or angle point blocks in the anti-counterfeiting point block set.
9. The method according to claim 5, characterized in that According to a preset coding rule, the anti-counterfeiting codes in the anti-counterfeiting code splicing set are converted into anti-counterfeiting information, including: According to a preset coding rule, the key code and / or the coding form code in the anti-counterfeiting code splicing set is converted into key information and / or coding form information; Performing security verification on the anti-counterfeiting code according to the secret key information and / or encoding form information; If the security check passes, the anti-counterfeiting information codes in the anti-counterfeiting code splicing set are converted into anti-counterfeiting information according to a preset coding rule.
10. An anti-counterfeiting information embedding device, characterized in that: include: A processor, a memory, and a computer program, wherein the computer program is stored in the memory, and the computer program comprises instructions, and when the instructions are executed, the device executes the method according to any one of claims 1 to 4.
11. An anti-counterfeiting information extraction device, characterized in that: include: A processor, a memory and a computer program, wherein the computer program is stored in the memory, and the computer program comprises instructions, and when the instructions are executed, the device executes the method according to any one of claims 5 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 4.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 5 to 9.