Anti-counterfeiting information generation method, product verification method and device
Patent Information
- Application Number
- CN202380008919.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2025-03-11
AI Technical Summary
In existing anti-counterfeiting technology, anti-counterfeiting labels fixed on products are easy to be deciphered and stolen, and are difficult to dynamically update, resulting in poor anti-counterfeiting effects.
By classifying, encoding, and encrypting product information, dynamic anti-counterfeiting information is generated, and random numbers and digital fields are used to dynamically generate fields to be processed to achieve dynamic updating of target anti-counterfeiting information.
It improves the difficulty and security of deciphering anti-counterfeiting information, enhances the anti-counterfeiting effect, and avoids the problem of easy deciphering and theft of fixed anti-counterfeiting labels.
Smart Images

Figure CN119604862A_ABST
Abstract
Description
Anti-counterfeiting information generation method, product verification method and device Technical Field
[0001] The present disclosure relates to the field of anti-counterfeiting technology, and more specifically, to an anti-counterfeiting information generation method, a product verification method, and a device. Background Art
[0002] Anti-counterfeiting technology is currently an effective means of protecting the legitimate interests of authentic manufacturers and consumers. With the development of computer technology, anti-counterfeiting technology is constantly being updated to meet the varying sophistication requirements of products in different fields.
[0003] Summary of the Invention
[0004] In view of this, the present disclosure provides an anti-counterfeiting information generating method, a product verification method, an apparatus, an electronic device, and a medium.
[0005] One aspect of the present disclosure provides a method for generating anti-counterfeiting information, including: classifying product information according to the field type of the product information to obtain a numeric field and a text field; encoding the above-mentioned text field to obtain a coded field; generating a to-be-processed field according to a random number, the above-mentioned numeric field and the above-mentioned coded field; encrypting the above-mentioned to-be-processed field to obtain an initial anti-counterfeiting field; and generating target anti-counterfeiting information according to the above-mentioned initial anti-counterfeiting field and the above-mentioned numeric field.
[0006] Another aspect of the present disclosure provides a product verification method, including: in response to a received product information verification request, obtaining product information and anti-counterfeiting information corresponding to the product information, wherein the above-mentioned anti-counterfeiting information is generated using the above-mentioned anti-counterfeiting information generation method; based on the above-mentioned product information, obtaining the embedded position information of the digital field by querying the anti-counterfeiting information library; based on the embedded position information of the digital field, obtaining the digital field and the initial anti-counterfeiting field from the above-mentioned anti-counterfeiting information; decrypting the above-mentioned initial anti-counterfeiting field to obtain a random number, a digital field and a coding field; decoding the above-mentioned coding field to obtain a text field; and obtaining a verification result of the product information by comparing the above-mentioned product information, the above-mentioned digital field and the above-mentioned text field.
[0007] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the present disclosure.
[0008] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method described in the present disclosure when executed.
[0009] Another aspect of the present disclosure provides a computer program product, which includes computer-executable instructions. When the instructions are executed, they are used to implement the method described in the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0011] FIG1 schematically illustrates an exemplary system architecture to which the anti-counterfeiting information generation method, product verification method, and device according to an embodiment of the present disclosure may be applied;
[0012] FIG2 schematically shows a flow chart of a method for generating anti-counterfeiting information according to an embodiment of the present disclosure;
[0013] FIG3 schematically shows an example schematic diagram of a method for generating anti-counterfeiting information according to an embodiment of the present disclosure;
[0014] FIG4A schematically shows an example schematic diagram of a method for generating anti-counterfeiting information according to another embodiment of the present disclosure;
[0015] FIG4B schematically shows an example schematic diagram of a method for generating anti-counterfeiting information according to another embodiment of the present disclosure;
[0016] FIG5 schematically shows an example schematic diagram of encrypting a field to be processed according to an embodiment of the present disclosure;
[0017] FIG6 schematically shows an example schematic diagram of a method for generating anti-counterfeiting information according to another embodiment of the present disclosure;
[0018] FIG7 schematically shows a flow chart of a product verification method according to an embodiment of the present disclosure;
[0019] FIG8 schematically shows an example schematic diagram of a product verification method according to an embodiment of the present disclosure;
[0020] FIG9 schematically shows a block diagram of an anti-counterfeiting information generating device according to an embodiment of the present disclosure;
[0021] FIG10 schematically shows a block diagram of a product authentication device according to an embodiment of the present disclosure; and
[0022] FIG11 schematically shows a block diagram of an electronic device suitable for implementing the anti-counterfeiting information generation method and the product verification method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0024] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0025] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0026] When expressions such as “at least one of A, B, and C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., “a system having at least one of A, B, and C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.). When expressions such as “at least one of A, B, or C, etc.” are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., “a system having at least one of A, B, or C” should include but is not limited to systems having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, and C, etc.).
[0027] Anti-counterfeiting technology is currently an effective means of protecting the legitimate interests of authentic manufacturers and consumers. Related technologies typically affix static anti-counterfeiting features, such as anti-counterfeiting labels, to products. The authenticity of the product is then verified by verifying the label's security code online. However, these fixed anti-counterfeiting labels remain immutable and are easily deciphered and misused.
[0028] To this end, embodiments of the present disclosure provide a method for generating anti-counterfeiting information. For example, product information is classified according to its field type to obtain a numeric field and a text field. The text field is encoded to obtain a coded field. A pending field is generated based on the random number, the numeric field, and the coded field. The pending field is encrypted to obtain an initial anti-counterfeiting field. Target anti-counterfeiting information is generated based on the initial anti-counterfeiting field and the numeric field.
[0029] According to the embodiments of the present disclosure, since the initial anti-counterfeiting field is obtained by encrypting the random number, numeric field, and code field, each time the anti-counterfeiting information is used, a new field to be processed can be dynamically generated based on the real-time random number, numeric field, and code field. Therefore, the target anti-counterfeiting information can be dynamically updated, achieving the purpose of improving the anti-counterfeiting effect.
[0030] FIG1 schematically illustrates an exemplary system architecture to which the anti-counterfeiting information generation method, product verification method, and apparatus according to an embodiment of the present disclosure may be applied.
[0031] It should be noted that FIG1 is only an example of a system architecture to which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios. For example, in another embodiment, the exemplary system architecture to which the target detection method, the training method and apparatus of the deep learning model can be applied may include a terminal device, but the terminal device can implement the target detection method, the training method and apparatus of the deep learning model provided in the embodiments of the present disclosure without interacting with the server.
[0032] As shown in FIG1 , the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links.
[0033] The user may use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software (for example only).
[0034] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0035] Server 105 can be any type of server that provides various services. For example, server 105 can be a cloud server, also known as a cloud computing server or cloud host, a host product within a cloud computing service system that addresses the management difficulties and poor scalability of traditional physical hosts and VPS (Virtual Private Server) services. Server 105 can also be a server for a distributed system or a server integrated with blockchain.
[0036] It should be noted that the anti-counterfeiting information generation method provided in the embodiments of the present disclosure can generally be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103. Correspondingly, the anti-counterfeiting information generation device provided in the embodiments of the present disclosure can also be set in the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0037] Alternatively, the anti-counterfeiting information generation method provided in the embodiment of the present disclosure may also be generally executed by the server 105. Accordingly, the anti-counterfeiting information generation device provided in the embodiment of the present disclosure may generally be set in the server 105. The anti-counterfeiting information generation method provided in the embodiment of the present disclosure may also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the anti-counterfeiting information generation device provided in the embodiment of the present disclosure may also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0038] It should be noted that the product verification method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the product verification device provided in the embodiment of the present disclosure can generally be set in the server 105. The product verification method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the product verification device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0039] Alternatively, the product verification method provided in the embodiment of the present disclosure may also be generally executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the training device for the deep learning model provided in the embodiment of the present disclosure may also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0040] It should be understood that the number of terminal devices, networks, and servers in Figure 1 is merely illustrative and any number of terminal devices, networks, and servers may be provided as required.
[0041] It should be noted that the sequence numbers of the operations in the following method are only used to indicate the operation for the purpose of description, and should not be regarded as indicating the order in which the operations should be performed. Unless explicitly stated, the method does not need to be performed in the order shown.
[0042] FIG2 schematically shows a flow chart of a method for generating anti-counterfeiting information according to an embodiment of the present disclosure.
[0043] As shown in FIG. 2 , the method 200 includes operations S210 to S250 .
[0044] In operation S210 , the product information is classified according to the field type of the product information to obtain a numeric field and a text field.
[0045] In operation S220, the text field is encoded to obtain an encoded field.
[0046] In operation S230, a field to be processed is generated according to the random number, the number field, and the code field.
[0047] In operation S240 , the field to be processed is encrypted to obtain an initial anti-counterfeiting field.
[0048] In operation S250, target anti-counterfeiting information is generated according to the initial anti-counterfeiting field and the number field.
[0049] According to embodiments of the present disclosure, product information may include a product serial number. A product serial number is typically a unique identification number generated by the manufacturer upon completion of production and before the product leaves the factory, based on information such as the product type, name, model, batch, and production date. Product information may typically consist of letters and numbers, for example, "AAA111BB22."
[0050] According to an embodiment of the present disclosure, in order to facilitate information tracing when quality problems occur in the product, the manufacturer may also add the manufacturer's identification to the product information. For example, the identification of a manufacturer in place A may be "0D3", and the product information may be "AAA111BB220D3".
[0051] According to an embodiment of the present disclosure, in order to increase the difficulty of deciphering the anti-counterfeiting information, the anti-counterfeiting information generation method can be upgraded from time to time. In this case, there may be differences in the anti-counterfeiting information generation methods for different batches of products. Therefore, when verifying a product, it is necessary to first identify the version of the anti-counterfeiting information generation method before using the corresponding verification method to parse the anti-counterfeiting information and achieve effective verification of the product. Therefore, the version identifier of the anti-counterfeiting algorithm can also be added to the product information. For example: the version identifier of the anti-counterfeiting information generation method can be "PC1", and the product information can be "AAA111BB220D3PC1".
[0052] For example, product information can be "AAA111BB22". According to the field type of the product information, the product information can be classified. The resulting numeric fields can be "111" and "22", and the text fields can be "AAA" and "BB".
[0053] According to embodiments of the present disclosure, a coding dictionary can be used to encode text fields. The coding dictionary can store the numbers corresponding to each character. For example, the number corresponding to the letter A can be "0," and the number corresponding to the letter B can be "111." The encoding field obtained by encoding the text field "AAA" can be "000." The encoding field obtained by encoding the text field "BB" can be "111111."
[0054] According to an embodiment of the present disclosure, the coding field can form an all-digital field of the product information together with the digital field according to the initial position of the text field in the product information.
[0055] For example, the product information can be "AAA111BB22". After encoding the text field, the all-numeric field that forms the product information together with the numeric field can be "000111111111122".
[0056] According to an embodiment of the present disclosure, the random number may be randomly generated using a random number seed. The random number seed may be real-time time information or an analog signal collected by an analog signal collection port of an embedded system of an electronic product.
[0057] According to an embodiment of the present disclosure, the position of the random number in the field to be processed can be pre-configured, for example: the position of the random number in the field to be processed can be before the first byte, after the last byte, or between the mth byte and the m+1th byte, where m can be greater than 1 and less than or equal to the total number of bytes, and the total number of bytes can be the number of bytes of the all-digit field.
[0058] For example, the all-numeric field of product information can be "000111111111122", the random number can be "45", and the position of the pre-configured random number in the field to be processed can be between the third and fourth bytes. The resulting field to be processed can be "0004511111111122".
[0059] According to embodiments of the present disclosure, a symmetric encryption algorithm, such as the Data Encryption Algorithm (DES), can be used to encrypt the field to be processed to obtain an initial anti-counterfeiting field. Alternatively, an asymmetric encryption algorithm, such as the RSA (Rivest Shamir Adleman) algorithm of the public key cryptography system, can be used to encrypt the field to obtain an initial anti-counterfeiting field. Embodiments of the present disclosure do not specifically limit the type of encryption algorithm.
[0060] According to embodiments of the present disclosure, the embedding position of a numeric field can be preconfigured. For example, the embedding position of a numeric field can be before the first byte, after the last byte, or between the mth byte and the m+1th byte, where m can be greater than 1 and less than or equal to the total number of bytes, which can be the number of bytes in the full numeric field. If the product information includes multiple numeric fields, different embedding positions can be configured for different numeric fields.
[0061] For example, the product information could be "AAA111BB22." After encrypting the pending field "0004511111111122," the resulting initial anti-counterfeiting field could be "EJ7B5NYJGV677P529." In the product information, the first numeric field is "111" and the second numeric field is "22." The numeric fields can be embedded in the following locations: the first numeric field can be inserted between the third and fourth bytes of the initial anti-counterfeiting field. The second numeric field can be inserted after the last byte of the initial anti-counterfeiting field. By embedding the numeric fields sequentially into the initial anti-counterfeiting field according to their embedding positions, the resulting target anti-counterfeiting information could be "EJ7111B5NYJGV677P52922."
[0062] FIG3 schematically shows an example diagram of a method for generating anti-counterfeiting information according to an embodiment of the present disclosure.
[0063] As shown in Figure 3, in embodiment 300, product information 301 "ABA111222" is classified to obtain text field 302 "ABA" and numeric field 303 "111222". The text field 302 is encoded using coding field 304 to obtain coding field 305 "01110". Based on coding field 305 "0110", numeric field 303 "111222" and random number 306 "32857", the field to be processed 307 "01110111222323857" is obtained. The field to be processed 307 is encrypted to obtain the initial anti-counterfeiting field 308 "EJ7B5NYXX235H502". Based on numeric field 303 and initial anti-counterfeiting field 308, the target anti-counterfeiting information 309 "EJ7B1112225NYXX235H502" is obtained.
[0064] According to the embodiments of the present disclosure, since the initial anti-counterfeiting field is obtained by encrypting the random number, the numeric field, and the code field, the embedding position of the random number in the field to be processed and the embedding position of the numeric field in the initial anti-counterfeiting field can be flexibly configured. Each time the anti-counterfeiting information is used, a new field to be processed can be dynamically generated based on the real-time random number, numeric field, and code field. Therefore, the target anti-counterfeiting information can be dynamically updated, achieving the purpose of improving the anti-counterfeiting effect.
[0065] Although adding random numbers to the product information field can increase the difficulty of deciphering anti-counterfeiting information, the length of the random number field is not fixed. Adding random numbers to the product information field results in unprocessed fields of varying lengths. Consequently, when encrypting the unprocessed fields, the computing resources required for fields of varying lengths also vary. To meet the computing resource requirements of the unprocessed fields, computing resources can be allocated based on the computing power required by the longest field. However, this not only wastes resources and space, but also increases anti-counterfeiting costs.
[0066] Therefore, the embodiment of the present disclosure can ensure the uniformity of resource configuration by limiting the field to be processed to a fixed field length.
[0067] According to an embodiment of the present disclosure, generating a field to be processed based on a random number, a numeric field, and a coded field may include the following operations: obtaining the field length of product information based on the numeric field and the coded field; obtaining a target random field from the random number based on the field length and a field length threshold; and generating a field to be processed based on the target random field, the numeric field, and the coded field.
[0068] According to an embodiment of the present disclosure, obtaining the field length of product information based on a numeric field and a coding field may include the following operations: determining the length of the numeric field based on the numeric field; determining the length of the coding field based on the coding field; and obtaining the field length of the product information based on the length of the numeric field and the length of the coding field.
[0069] According to an embodiment of the present disclosure, the numeric field may include multiple numeric fields, and the length of the numeric field may be the sum of the lengths of the multiple numeric fields.
[0070] For example, the all-numeric field of product information can be "00011111111122". The byte length of the numeric field "111" can be 3, the byte length of the numeric field "22" can be 2, and the byte length of the numeric field can be 5.
[0071] According to an embodiment of the present disclosure, the coding field may include multiple coding fields, and the length of the coding field may be the sum of the lengths of the multiple coding fields.
[0072] For example, the full numeric field of product information can be "00011111111122". The byte length of the encoding field "000" can be 3, the byte length of the encoding field "111111" can be 6, and the byte length of the encoding field can be 9.
[0073] According to an embodiment of the present disclosure, the field length of the product information may be obtained according to the sum of multiple numeric fields and the sum of multiple coding fields.
[0074] For example, the sum of multiple numeric fields can be 5, the sum of multiple coding fields can be 9, and the field length of product information can be 14.
[0075] According to the embodiments of the present disclosure, by fixing the field length of the field to be processed by using a field length threshold, the computing resource requirements of the target anti-counterfeiting information generation process can be unified, so that the field length threshold can be flexibly configured according to the current configuration of computing resources.
[0076] According to an embodiment of the present disclosure, obtaining a target random field from a random number based on a field length and a field length threshold may include the following operations: determining a target number of bytes based on the field length and the field length threshold; and obtaining a target random field from the random number based on the target number of bytes based on a field query strategy.
[0077] According to an embodiment of the present disclosure, the field length threshold can be preconfigured, for example, 20. A target byte count can be determined based on the difference between the field length threshold and the field length of the product information. Based on the target byte count and the field query strategy, a target random field is obtained from the random number.
[0078] For example, if the product information field length is 14, the field length threshold can be 20, and the target byte count can be 6. The random number can be "13592055", and the field query strategy can be to query from the second field from left to right, so the target random field can be "359205".
[0079] FIG4A schematically shows an example diagram of a method for generating anti-counterfeiting information according to other embodiments of the present disclosure.
[0080] As shown in FIG4A , in embodiment 400A, product information 401 "ABA111222" is classified to obtain text field 402 "ABA" and numeric field "111222." Text field 402 is encoded using encoding field 404 to obtain encoding field 405 "0110." Based on numeric field 403 and encoding field 405, product information field 407 "01110111222" is obtained. The target byte count can be determined based on the length of the product information field and the field length threshold. Based on the target byte count, a target random field 408 "323" is obtained from random number 406 "323857." Based on target random field 408 and product information field 407, a field to be processed 409 "01110111222323" is obtained. Field to be processed 409 is encrypted to obtain an initial anti-counterfeiting field 410 "EJ7B5NYXY502." According to the number field 403 and the initial anti-counterfeiting field 410, the target anti-counterfeiting information 411 "EJ7B5NYXY502111222" is obtained.
[0081] According to an embodiment of the present disclosure, obtaining a target random field from a random number based on a field query strategy and a target number of bytes may include the following operations: determining a query start position and a query direction based on the field query strategy; determining a query end position based on the query start position, the query direction, and the target number of bytes; and querying the target random field from the random number based on the query start position and the query end position.
[0082] According to an embodiment of the present disclosure, a field query strategy may include a sequential query. The sequential query may start with the i-th field in the random number and sequentially query the i+1-th field, the i+2-th field, and so on, where i and j may be integers greater than or equal to 1.
[0083] For example, a field query strategy could be to query sequentially from left to right starting from the second field of the random number. The query start position could be the second field, and the query direction could be from left to right. The target byte count could be 6, and the query end position could be the seventh field.
[0084] According to an embodiment of the present disclosure, a field query strategy may also be a jump query. A jump query may start with the i-th field in the sub-random number and, according to a preset jump interval (for example, the jump interval may be 2), sequentially query the i+2-th field, the i+4-th field, and so on to the i+q-th field, where i and q may be integers greater than or equal to 1.
[0085] For example, the field query strategy can be to start the search from the second field of the random number and jump from left to right, with a jump interval of 2. The query start position can be the second field, and the query direction can be from left to right. The target byte number can be 3, and the query end position can be the sixth field.
[0086] FIG4B schematically shows an example diagram of a method for generating anti-counterfeiting information according to other embodiments of the present disclosure.
[0087] As shown in FIG4B , in embodiment 400A, product information 401 "ABA111222" is classified to obtain text field 402 "ABA" and numeric field "111222." Text field 402 is encoded using encoding field 404 to obtain encoding field 405 "0110." Based on numeric field 403 and encoding field 405, product information field 407 "01110111222" is obtained. The target byte count can be determined based on the length of the product information field and the field length threshold. Based on the target byte count, a target random field 40111 "285" is obtained from random number 406 "323857" based on the query strategy. Based on target random field 408 and product information field 407, a field to be processed 4091 "01110111222285" is obtained. Field to be processed 409 is encrypted to obtain an initial anti-counterfeiting field 4101 "EJ7C73GXY511." According to the digital field 403 and the initial anti-counterfeiting field 4101, the target anti-counterfeiting information 4111 "EJ7C73GXY511111222" is obtained.
[0088] According to the embodiments of the present disclosure, by configuring different field query strategies, the target random field can be obtained from the random number according to the query strategy, which increases the difficulty of deciphering the random number.
[0089] According to an embodiment of the present disclosure, generating a field to be processed based on a target random field, a numeric field, and a coding field may include the following operations: generating an information code based on the numeric field and the coding field; determining embedding position information of the target random field; and embedding the target random field into the information code based on the embedding position information to generate the field to be processed.
[0090] According to an embodiment of the present disclosure, the information code may be an all-digital field of the product information. The embedding position of the target random field may be pre-configured, for example, the embedding position of the target random field may be between the 6th and 7th bytes of the information code.
[0091] For example, the information code can be "00011111111122", the target random field can be "359205", and the target random field can be embedded between the sixth and seventh bytes of the information code. Embedding the target random field "359205" between the sixth and seventh bytes of the information code yields the field to be processed "00011135920511111122".
[0092] According to embodiments of the present disclosure, the embedding position information of the target random field can also be obtained by querying the random number. For example, by constructing a mapping relationship between the random field and the embedding position of the target random field, the embedding position of the target random field can be queried based on the target random field and the mapping relationship.
[0093] According to an embodiment of the present disclosure, an embedding position can be determined by querying the mapping relationship between the random field and the embedding position of the target random field. For example, the target random field may be "359205". By querying the mapping relationship between the target random field and the embedding position of the target random field, the embedding position of the target random field may be "between the second and third bytes".
[0094] For example, the information code can be "000111111111122", the target random field can be "359205", and the field to be processed according to the above embedding position can be "00359205011111111122"
[0095] According to an embodiment of the present disclosure, multiple embedding positions can also be determined by querying the mapping relationship between the random field and the embedding position of the target random field. For example, the target random field can be "359205". By querying the mapping relationship between the target random field and the embedding position of the target random field, the embedding position corresponding to the field "359" can be "between the second and third bytes." The embedding position corresponding to the field "205" can be "between the eighth and ninth bytes."
[0096] For example, the information code may be "000111111111122", the target random field may be "359205", and the field to be processed obtained according to the above embedded position may be "00359011111205111122".
[0097] According to the embodiments of the present disclosure, by determining the embedding position of the target random field, the variability of the target random field and the field to be processed generated by information encoding can be improved, thereby increasing the difficulty of deciphering the target anti-counterfeiting information.
[0098] In order to increase the difficulty of deciphering the target anti-counterfeiting information, random numbers can be used to determine the target key, thereby achieving randomness in the encryption process.
[0099] According to an embodiment of the present disclosure, encrypting the field to be processed to obtain the initial anti-counterfeiting field may include the following operations: determining a target key by querying an anti-counterfeiting information library based on a random number, and encrypting the field to be processed using the target key to obtain the initial anti-counterfeiting field.
[0100] According to embodiments of the present disclosure, the anti-counterfeiting information library may include a mapping between random numbers and key information. For example, the key corresponding to the random number "10D" may be a data encryption key in a symmetric encryption algorithm. The key corresponding to the random number "MD8" may be a public key in an asymmetric encryption algorithm.
[0101] According to an embodiment of the present disclosure, encrypting a field to be processed using a target key to obtain an initial anti-counterfeiting field may include the following operations: determining a target encryption algorithm based on a key type of the target key; and encrypting the field to be processed using the target key based on the target encryption algorithm to obtain the initial anti-counterfeiting field.
[0102] For example, the field to be processed could be "00359011111205111122," and the random number could be "359205." Using the random number, the public key of the asymmetric encryption algorithm can be obtained by querying the anti-counterfeiting information database. The public key can then be used to encrypt the field to be processed using the RSA algorithm to obtain the initial anti-counterfeiting field.
[0103] Since the encryption algorithms in the embodiments of the present disclosure are all relatively mature encryption technologies, the execution process of the encryption algorithms will not be described in detail here.
[0104] FIG5 schematically shows an example diagram of encrypting a field to be processed according to an embodiment of the present disclosure.
[0105] As shown in FIG5 , in embodiment 500, a target key 543 is obtained by querying an anti-counterfeiting information database 542 based on a random number 541. The target key 543 is used to encrypt a field to be processed 544 to obtain an initial anti-counterfeiting field 545. Target anti-counterfeiting information 548 is obtained based on the initial anti-counterfeiting field 545, a numeric field 546, and the embedded position 547 of the numeric field.
[0106] According to the embodiments of the present disclosure, by randomly determining the encryption algorithm through random numbers, the randomness of the encryption process can be increased, and the difficulty of deciphering the target anti-counterfeiting information can be improved.
[0107] According to an embodiment of the present disclosure, generating target anti-counterfeiting information based on the initial anti-counterfeiting field and the digital field may include the following operations: determining embedding position information of the digital field; and embedding the digital field into the initial anti-counterfeiting field according to the embedding position information to generate the target anti-counterfeiting information.
[0108] According to the embodiments of the present disclosure, the method for determining the embedding position information of the numeric field is similar to the method for determining the embedding position information of the target random field described above. A fixed embedding position can be pre-configured, or the embedding position of the numeric field can be obtained by querying the mapping relationship between the random number and the embedding position of the numeric field using a random number. Detailed description is omitted here.
[0109] According to an embodiment of the present disclosure, embedding a numeric field into an initial anti-counterfeiting field based on embedding position information to generate target anti-counterfeiting information may include the following operations: embedding the numeric field into the initial anti-counterfeiting field based on embedding position information to obtain the target anti-counterfeiting field; determining a display type of the target anti-counterfeiting field based on product information; and processing the target anti-counterfeiting field based on the display type to obtain the target anti-counterfeiting information.
[0110] According to the embodiments of the present disclosure, the target anti-counterfeiting information is dynamically changing and can usually be displayed through a visual interface. However, due to the different resolutions of the visual interfaces of different products, different display methods can be selected.
[0111] According to an embodiment of the present disclosure, product information may include resolution information of the product's visual interface. Based on the resolution information, the display type of the target anti-counterfeiting field can be determined by querying the correspondence between the display type and the resolution threshold. For example, for products with a low-resolution visual interface, the target anti-counterfeiting field can be directly displayed. For products with a high-resolution visual interface, the target anti-counterfeiting field can be converted into a barcode or QR code for display.
[0112] According to the embodiments of the present disclosure, for a target anti-counterfeiting field that needs to be converted into a barcode or a QR code, the target anti-counterfeiting field can be processed using barcode or QR code generation technology based on the correspondence between each character in the target anti-counterfeiting field and the barcode graphic or QR code graphic to obtain a barcode image or QR code graphic corresponding to the content of the target anti-counterfeiting field as the target anti-counterfeiting information.
[0113] FIG6 schematically shows an example schematic diagram of a method for generating anti-counterfeiting information according to another embodiment of the present disclosure;
[0114] As shown in Figure 6, in embodiment 600, the storage unit 601, the random signal acquisition unit 602, the computing unit 603, and the display unit 604 can be processing units in the embedded system of the product. When executing the anti-counterfeiting information generation method of the embodiment of the present disclosure, the computing unit 603 can obtain product information from the storage unit 601 and obtain a random number from the random signal acquisition unit. The random signal acquisition unit can be any one of a timer unit, a timing unit, or an analog signal acquisition unit. The random signal acquisition unit can use the random signal collected by the timer unit, the timing unit, or the analog signal acquisition unit as a random number seed, input it into an embedded random number generator, and generate a random number. The computing unit 603 uses the product information and the random number to generate the target anti-counterfeiting information by executing the anti-counterfeiting information generation method of the embodiment of the present disclosure. The display unit 604 can determine the final display method of the target anti-counterfeiting information based on the product resolution or other configuration information, for example, it can be a barcode 605 or a QR code 606.
[0115] Since both barcode generation technology and QR code generation technology are relatively mature technologies at present, the process of processing the target anti-counterfeiting field using barcode generation technology or QR code generation technology will not be described in detail here.
[0116] According to the embodiments of the present disclosure, by determining the embedding position of the digital field, the variability of the target anti-counterfeiting information generated by the digital field and the initial anti-counterfeiting field can be improved, thereby improving the deciphering of the target anti-counterfeiting information.
[0117] FIG7 schematically shows a flow chart of a product verification method according to an embodiment of the present disclosure.
[0118] As shown in FIG. 7 , the product verification method 700 may include operations S710 to S760 .
[0119] In operation S710, in response to the received product information verification request, product information and anti-counterfeiting information corresponding to the product information are acquired.
[0120] In operation S720, the embedding position information of the digital field is obtained by querying the anti-counterfeiting information library according to the product information.
[0121] In operation S730, a number field and an initial anti-counterfeiting field are obtained from the anti-counterfeiting information according to the embedding position information of the number field.
[0122] In operation S740, the initial anti-counterfeiting field is decrypted to obtain a random number, a number field, and a code field.
[0123] In operation S750, the coded field is decoded to obtain a text field.
[0124] In operation S760, a verification result of the product information is obtained by comparing the product information, the numeric field, and the text field.
[0125] According to the embodiments of the present disclosure, the product can be any terminal device, such as an electronic video wall. A user can trigger a product verification selection operation on the terminal device. The embedded system, as shown in FIG6 , embedded within the product generates anti-counterfeiting information according to the anti-counterfeiting information generation method provided in the embodiments of the present disclosure. The anti-counterfeiting information and product information are then sent to a server, which executes the product verification method provided in the embodiments of the present disclosure.
[0126] According to embodiments of the present disclosure, the anti-counterfeiting information library can store information related to anti-counterfeiting algorithms corresponding to different product information, such as anti-counterfeiting algorithm version identification information. Each version of the anti-counterfeiting algorithm information can include the embedding location information of the numeric field, the embedding location information of the random number, key information, decryption algorithm information, and so on.
[0127] For example: the product information can be "AAA111" and the anti-counterfeiting information can be "EJ7C73GXY511111222". By querying the anti-counterfeiting information, it can be obtained that the embedded position information of the digital field can be between the 10th byte and the 11th byte. The digital field "111" and the initial anti-counterfeiting field "EJ7C73GXY511222" can be obtained from the anti-counterfeiting information.
[0128] According to an embodiment of the present disclosure, decrypting the initial anti-counterfeiting field to obtain a random number, a numeric field, and a coding field may include the following operations: obtaining a random number and a target key by querying an anti-counterfeiting information database based on product information; and decrypting the initial anti-counterfeiting field using the target key to obtain a random number, a numeric field, and a coding field.
[0129] According to an embodiment of the present disclosure, in order to increase the randomness of the encryption process, the encryption algorithm for generating anti-counterfeiting information can be queried through a random number. Therefore, the target key can also be obtained based on the random number by querying the correspondence between the random number and the key.
[0130] According to an embodiment of the present disclosure, decrypting the initial anti-counterfeiting field using the target key to obtain the random number, the numeric field, and the encoding field may include the following operations: determining a target encryption algorithm based on the key type of the target key; decrypting the initial anti-counterfeiting field using the target key based on the target encryption algorithm to obtain the random number, the numeric field, and the encoding field.
[0131] According to an embodiment of the present disclosure, when the target encryption algorithm is a symmetric encryption algorithm, the encryption process and the decryption process use the same key. When the target encryption algorithm is an asymmetric algorithm, the encryption process and the decryption process use different keys. For example, a public key can be used for encryption, and then a private key corresponding to the public key can be used for decryption.
[0132] For example, based on product information, by querying the anti-counterfeiting information database, the random number obtained could be "385," and the target key could be the key of the data encryption algorithm. Because the data encryption algorithm is symmetric, the same key is used for both encryption and decryption. Therefore, this key can be used to decrypt the initial anti-counterfeiting field, yielding "000111385." "111" is the numeric field in the product information, "000" is the coded field, and "385" is the random number.
[0133] According to the embodiment of the present disclosure, the coding field is decoded using the coding field to obtain the text field "AAA". Therefore, by decrypting and decoding the anti-counterfeiting information, the digital field of the product information is "111" and the text field is "AAA".
[0134] According to the embodiments of the present disclosure, the embedded positions of the numeric field and the random number can both be obtained by querying the anti-counterfeiting information database. Therefore, the positions of the numeric field and the text field in the original product information can be unchanged by decrypting and decoding the anti-counterfeiting information. By comparing the product information with the numeric field and the text field, the verification result of the product information can be obtained.
[0135] According to an embodiment of the present disclosure, if the numeric fields and text fields in the product information are identical to the numeric fields and text fields obtained by processing the anti-counterfeiting information, the verification result of the product information can be determined to be passed. Otherwise, the verification result of the product information can be determined to be failed.
[0136] For example, the product information may be "AAA111". After processing the anti-counterfeiting information, the obtained numeric field may be "111" and the text field may be "AAA". Therefore, the verification result of the obtained product information may be verification passed.
[0137] In order to improve the anti-counterfeiting effect, the number of anti-counterfeiting verifications can be set. When the number of verifications exceeds the specified threshold, an early warning message can be sent to the operation and maintenance system, and the dynamic generation of anti-counterfeiting information can be stopped.
[0138] FIG8 schematically shows an example diagram of a product verification method according to an embodiment of the present disclosure.
[0139] As shown in FIG8 , in embodiment 800, a user can use a terminal device 801 to scan a dynamically generated anti-counterfeiting QR code. The terminal device 801 then recognizes the anti-counterfeiting QR code image to obtain anti-counterfeiting information. The user then sends the product information and anti-counterfeiting information to a server 802. The server 802 processes the anti-counterfeiting information based on the product information and anti-counterfeiting information using the product verification method provided in the embodiment of the present disclosure to obtain a product verification result. The server then sends the product verification result to the terminal device and displays the product verification result on a visual interface of the terminal device 801: for example, "Product XX Verification Passed" or "Product XX Verification Failed."
[0140] According to the embodiments of the present disclosure, based on product information, by querying the anti-counterfeiting information database, information related to the anti-counterfeiting algorithm corresponding to the product information is obtained, and by decrypting and decoding the anti-counterfeiting information, the product information verification result is obtained. Since the anti-counterfeiting information is dynamically generated, the credibility of the product verification result can be effectively improved.
[0141] FIG9 schematically shows a block diagram of an anti-counterfeiting information generating device according to an embodiment of the present disclosure.
[0142] As shown in FIG. 9 , the anti-counterfeiting information generating device 900 may include a classification module 910 , an encoding module 920 , a first generating module 930 , an encryption module 940 and a second generating module 950 .
[0143] The classification module 910 is configured to classify the product information according to the field type of the product information to obtain a numeric field and a text field.
[0144] The encoding module 920 is configured to encode the text field to obtain an encoded field.
[0145] The first generating module 930 is configured to generate a field to be processed according to the random number, the number field and the code field.
[0146] The encryption module 940 is configured to encrypt the field to be processed to obtain an initial anti-counterfeiting field.
[0147] The second generating module 950 is configured to generate target anti-counterfeiting information according to the initial anti-counterfeiting field and the digital field.
[0148] According to an embodiment of the present disclosure, the first generation module 930 may include a first acquisition submodule, a second acquisition submodule, and a first generation submodule. The first acquisition submodule is configured to obtain the field length of the product information based on the numeric field and the coding field. The second acquisition submodule is configured to obtain the target random field from the random number based on the field length and the field length threshold. The first generation submodule is configured to generate a field to be processed based on the target random field, the numeric field, and the coding field.
[0149] According to an embodiment of the present disclosure, the first obtaining submodule may include a first determining unit, a second determining unit, and a first obtaining unit. The first determining unit is configured to determine the length of the numeric field based on the numeric field. The second determining unit is configured to determine the length of the coding field based on the coding field. The first obtaining unit is configured to obtain the field length of the product information based on the length of the numeric field and the length of the coding field.
[0150] According to an embodiment of the present disclosure, the second obtaining submodule may include a third determining unit and a second obtaining unit. The third determining unit is configured to determine a target number of bytes based on a field length and a field length threshold. The second obtaining unit is configured to obtain a target random field from the random number based on the target number of bytes and based on a field query strategy.
[0151] According to an embodiment of the present disclosure, the second obtaining unit may include a first determining subunit, a second determining subunit, and a query subunit. The first determining subunit is configured to determine a query starting position and a query direction based on a field query strategy. The second determining subunit is configured to determine a query ending position based on the query starting position, the query direction, and the target number of bytes. The query subunit is configured to query a target random field from the random number based on the query starting position and the query ending position.
[0152] According to an embodiment of the present disclosure, the first generation submodule may include a first generation unit, a fourth determination unit, and a second generation unit. The first generation unit is configured to generate an information code based on the digital field and the coding field. The fourth determination unit is configured to determine the embedding position information of the target random field. The second generation unit is configured to embed the target random field into the information code based on the embedding position information to generate a field to be processed.
[0153] According to an embodiment of the present disclosure, the encryption module may include a first determination submodule and an encryption submodule. The first determination submodule is configured to determine a target key by querying an anti-counterfeiting information library based on a random number. The encryption submodule is configured to encrypt a field to be processed using the target key to obtain an initial anti-counterfeiting field.
[0154] According to an embodiment of the present disclosure, the encryption submodule may include a fifth determination unit and an encryption unit. The fifth determination unit is configured to determine a target encryption algorithm based on a key type of a target key. The encryption unit is configured to encrypt a field to be processed using the target key based on the target encryption algorithm to obtain an initial anti-counterfeiting field.
[0155] According to an embodiment of the present disclosure, the second generation module may include a second determination submodule and a second generation submodule. The second determination submodule is configured to determine embedding position information of the numeric field. The second generation submodule is configured to embed the numeric field into the initial anti-counterfeiting field based on the embedding position information to generate target anti-counterfeiting information.
[0156] According to an embodiment of the present disclosure, the second generation submodule may include an embedding unit, a sixth determination unit, and a processing unit. The embedding unit is configured to embed the digital field into the initial anti-counterfeiting field based on the embedding position information to obtain the target anti-counterfeiting field. The sixth determination unit is configured to determine the display type of the target anti-counterfeiting field based on the product information. The processing unit is configured to process the target anti-counterfeiting field based on the display type to obtain the target anti-counterfeiting information.
[0157] FIG10 schematically shows a block diagram of a product authentication device according to an embodiment of the present disclosure.
[0158] As shown in FIG. 10 , the product authentication device 1000 may include an acquisition module 1010 , a query module 1020 , an obtaining module 1030 , a decryption module 1040 , a decoding module 1050 and a comparison module 1060 .
[0159] The acquisition module 1010 is configured to acquire product information and anti-counterfeiting information corresponding to the product information in response to a received product information verification request, wherein the anti-counterfeiting information is generated using the anti-counterfeiting information generation method described above.
[0160] The query module 1020 is configured to obtain the embedding position information of the digital field by querying the anti-counterfeiting information library according to the product information.
[0161] The obtaining module 1030 is configured to obtain the numeric field and the initial anti-counterfeiting field from the anti-counterfeiting information according to the embedding position information of the numeric field.
[0162] The decryption module 1040 is configured to decrypt the initial anti-counterfeiting field to obtain a random number, a digital field, and a coding field.
[0163] The decoding module 1050 is configured to decode the coded field to obtain a text field.
[0164] The comparison module 1060 is configured to obtain a verification result of the product information by comparing the product information, the numeric field and the text field.
[0165] According to an embodiment of the present disclosure, the decryption module 1040 may include a query submodule and a decryption submodule. The query submodule is configured to obtain a random number and a target key by querying an anti-counterfeiting information library based on product information. The decryption submodule is configured to decrypt the initial anti-counterfeiting field using the target key to obtain a random number, a numeric field, and a coded field.
[0166] According to an embodiment of the present disclosure, the decryption submodule may include a seventh determination unit and a decryption unit. The seventh determination unit is configured to determine a target encryption algorithm based on the key type of the target key. The decryption unit is configured to decrypt the initial anti-counterfeiting field using the target key based on the target encryption algorithm to obtain a random number, a numeric field, and a coded field.
[0167] According to the modules, submodules, and units of the embodiments of the present invention, any multiple or at least part of the functions of any multiple thereof can be implemented in one module. According to the modules, submodules, and units of the embodiments of the present invention, any one or more can be split into multiple modules for implementation. According to the modules, submodules, and units of the embodiments of the present invention, any one or more can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware, and firmware or in an appropriate combination of any of them. Alternatively, according to the modules, submodules, and units of the embodiments of the present invention, one or more can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is run.
[0168] For example, any of the classification module 910, encoding module 920, first generation module 930, encryption module 940, and second generation module 950, or the acquisition module 1010, query module 1020, acquisition module 1030, decryption module 1040, decoding module 1050, and comparison module 1060 may be combined into one module / submodule / unit for implementation, or any of the modules / submodules / units may be split into multiple modules / submodules / units. Alternatively, at least part of the functionality of one or more of these modules / submodules / units may be combined with at least part of the functionality of other modules / submodules / units and implemented in one module / submodule / unit. According to an embodiment of the present disclosure, at least one of the classification module 910, the encoding module 920, the first generation module 930, the encryption module 940 and the second generation module 950 or the acquisition module 1010, the query module 1020, the acquisition module 1030, the decryption module 1040, the decoding module 1050 and the comparison module 1060 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the classification module 910, encoding module 920, first generation module 930, encryption module 940 and second generation module 950 or the acquisition module 1010, query module 1020, acquisition module 1030, decryption module 1040, decoding module 1050 and comparison module 1060 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0169] It should be noted that the target detection device and the training device part of the deep learning model in the embodiments of the present disclosure correspond to the target detection method and the training method part of the deep learning model in the embodiments of the present disclosure. The description of the target detection device and the training device part of the deep learning model specifically refers to the target detection method and the training method part of the deep learning model, which will not be repeated here.
[0170] Figure 11 schematically shows a block diagram of an electronic device suitable for implementing the target detection method and the training method of the deep learning model according to an embodiment of the present disclosure. The electronic device shown in Figure 11 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.
[0171] As shown in Figure 11, the electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage part 1108 into a random access memory (RAM) 1103. The processor 1101 may, for example, include a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1101 may also include an onboard memory for caching purposes. The processor 1101 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0172] Various programs and data required for the operation of the electronic device 1100 are stored in the RAM 1103. The processor 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. The processor 1101 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 1102 and / or the RAM 1103. It should be noted that the programs may also be stored in one or more memories other than the ROM 1102 and the RAM 1103. The processor 1101 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.
[0173] According to an embodiment of the present disclosure, electronic device 1100 may further include an input / output (I / O) interface 1105, which is also connected to bus 1104. System 1100 may also include one or more of the following components connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1108 including a hard disk; and a communication section 1109 including a network interface card such as a LAN card or a modem. Communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in drive 1110 as needed, so that computer programs read from the removable media can be installed into storage section 1108 as needed.
[0174] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the processor 1101, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0175] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.
[0176] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0177] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 1102 and / or the RAM 1103 described above and / or one or more memories other than the ROM 1102 and the RAM 1103 .
[0178] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, which contains program code for executing the method provided by the embodiment of the present disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the target detection method and deep learning model training method provided by the embodiment of the present disclosure.
[0179] When the computer program is executed by the processor 1101, the above functions defined in the system / device of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0180] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 1109, and / or installed from removable media 1111. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0181] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0182] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, as well as the combination of boxes in the block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or may be implemented using a combination of dedicated hardware and computer instructions. It will be understood by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or coupled in various ways, and all such combinations and / or couplings fall within the scope of the present disclosure.
[0183] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for generating anti-counterfeiting information, comprising: Classifying the product information according to the field type of the product information to obtain a numeric field and a text field; Encoding the text field to obtain an encoded field; Generate a field to be processed according to the random number, the digital field and the coding field; Encrypting the field to be processed to obtain an initial anti-counterfeiting field; as well as Target anti-counterfeiting information is generated according to the initial anti-counterfeiting field and the digital field.
2. The method according to claim 1, wherein: The step of generating a field to be processed according to the random number, the digital field and the coding field comprises: Obtaining the field length of the product information according to the digital field and the code field; Obtaining a target random field from the random number according to the field length and the field length threshold; and The field to be processed is generated according to the target random field, the digital field and the coding field.
3. The method according to claim 2, wherein: The obtaining the field length of the product information according to the digital field and the coding field includes: According to the digital field, determining the length of the digital field; Determining the length of the coding field according to the coding field; and The field length of the product information is obtained according to the length of the digital field and the length of the coding field.
4. The method according to claim 2, wherein: The step of obtaining a target random field from the random number according to the field length and the field length threshold comprises: Determining a target number of bytes according to the field length and the field length threshold; and Based on the field query strategy, a target random field is obtained from the random number according to the target number of bytes.
5. The method according to claim 4, wherein: The field-based query strategy, according to the target number of bytes, obtains a target random field from the random number, including: Based on the field query strategy, determine the query starting position and query direction; Determining a query end position according to the query start position, the query direction and the target number of bytes; and The target random field is queried from the random number according to the query start position and the query end position.
6. The method according to claim 2, wherein: The step of generating the field to be processed according to the target random field, the digital field and the coding field comprises: Generate information code according to the digital field and the code field; Determining the embedding position information of the target random field; and According to the embedding position information, the target random field is embedded into the information code to generate the field to be processed.
7. The method according to claim 1, wherein: The encrypting the field to be processed to obtain the initial anti-counterfeiting field includes: According to the random number, determining the target key by querying an anti-counterfeiting information library; and The target key is used to encrypt the field to be processed to obtain an initial anti-counterfeiting field.
8. The method according to claim 7, wherein: The step of encrypting the field to be processed by using the target key to obtain an initial anti-counterfeiting field includes: Determining a target encryption algorithm according to the key type of the target key; and Based on the target encryption algorithm, the field to be processed is encrypted using the target key to obtain an initial anti-counterfeiting field.
9. The method according to claim 1, wherein: The step of generating target anti-counterfeiting information according to the initial anti-counterfeiting field and the digital field includes: Determining the embedding position information of the digital field; and According to the embedding position information, the digital field is embedded into the initial anti-counterfeiting field to generate the target anti-counterfeiting information.
10. The method according to claim 9, wherein: The step of embedding the digital field into the initial anti-counterfeiting field according to the embedding position information to generate the target anti-counterfeiting information includes: According to the embedding position information, embedding the digital field into the initial anti-counterfeiting field to obtain a target anti-counterfeiting field; Determining the display type of the target anti-counterfeiting field according to the product information; and Based on the display type, the target anti-counterfeiting field is processed to obtain the target anti-counterfeiting information.
11. A product verification method, comprising: In response to the received product information verification request, obtaining the product information and anti-counterfeiting information corresponding to the product information, wherein the anti-counterfeiting information is generated using the method according to any one of claims 1 to 10; According to the product information, by querying the anti-counterfeiting information library, the embedded position information of the digital field is obtained; According to the embedding position information of the digital field, the digital field and the initial anti-counterfeiting field are obtained from the anti-counterfeiting information; Decrypting the initial anti-counterfeiting field to obtain the random number, the digital field and the coding field; Decoding the coded field to obtain a text field; and By comparing the product information, the numeric field and the text field, a verification result of the product information is obtained.
12. The method according to claim 11, wherein: The decrypting process of the initial anti-counterfeiting field to obtain the random number, the digital field and the coding field includes: According to the product information, obtaining a random number and a target key by querying the anti-counterfeiting information library; and The initial anti-counterfeiting field is decrypted using the target key to obtain the random number, the digital field and the coding field.
13. The method according to claim 12, wherein: The decrypting the initial anti-counterfeiting field by using the target key to obtain the random number, the digital field and the coding field includes: Determining a target encryption algorithm according to the key type of the target key; and Based on the target encryption algorithm, the initial anti-counterfeiting field is decrypted using the target key to obtain the random number, the digital field and the coding field.
14. An anti-counterfeiting information generating device, comprising: A classification module, used to classify the product information according to the field type of the product information to obtain a numeric field and a text field; An encoding module, used for encoding the text field to obtain an encoding field; A first generating module, used for generating a field to be processed according to a random number, the digital field and the coding field; An encryption module, used for encrypting the field to be processed to obtain an initial anti-counterfeiting field; as well as The second generating module is used to generate target anti-counterfeiting information according to the initial anti-counterfeiting field and the digital field.
15. A product verification device, comprising: an acquisition module, configured to acquire the product information and anti-counterfeiting information corresponding to the product information in response to a received product information verification request, wherein the anti-counterfeiting information is generated by using the method according to any one of claims 1 to 10; A query module, used to obtain the embedded position information of the digital field by querying the anti-counterfeiting information library according to the product information; An obtaining module, used for obtaining the digital field and the initial anti-counterfeiting field from the anti-counterfeiting information according to the embedding position information of the digital field; A decryption module, used for decrypting the initial anti-counterfeiting field to obtain the random number, the digital field and the coding field; A decoding module, used for decoding the encoding field to obtain a text field; and The comparison module is used to obtain the verification result of the product information by comparing the product information, the numeric field and the text field.
16. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 13.
17. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 13.
18. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 13.