A code generation method, a code verification method and an electronic device
By implementing encoding generation and verification methods on electronic devices, and using servers to verify the encoding associated with products, the problem of difficult to identify the authenticity of products in the prior art is solved, and efficient product verification and user experience improvement are achieved.
Patent Information
- Application Number
- CN202010523785.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-10
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-06-10
AI Technical Summary
The prior art is difficult to effectively identify the authenticity of goods, resulting in the copying and use of the same anti-counterfeiting code for counterfeit and shoddy goods.
By implementing the encoding generation and verification method on the electronic device, the server uses the verification request processing of the encoding information, and generates and verifies the encoding associated with the product, ensuring the security and effectiveness of the encoding.
It realizes the use of a single encoding to meet the needs of product query and verify preset attributes at the same time, improves the user experience, and effectively prevents the use of counterfeit products.
Smart Images

Figure CN113781060B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a code generation method, a code verification method and an electronic device. Background Art
[0002] In order to prevent counterfeit goods, each manufacturer sets an anti-counterfeiting code for the goods they produce, and affixes the anti-counterfeiting code to the product or product packaging. Consumers only need to enter the anti-counterfeiting code through the designated anti-counterfeiting code system to obtain a series of genuine safety information about the product, thereby achieving the purpose of rest assured purchase and supervision and anti-counterfeiting. However, due to the reproducibility and portability of the anti-counterfeiting code pattern, counterfeit and inferior goods can copy and use the same anti-counterfeiting code as genuine goods.
[0003] Therefore, how to effectively identify the authenticity of goods is an urgent problem that the existing technology needs to solve. Summary of the invention
[0004] The embodiments of the present application provide a code generation method, a code verification method and an electronic device, which at least solve the above-mentioned problems.
[0005] An embodiment of the present application also provides a coding verification method, which is applied to an electronic device and includes: after an application with a picture reading function is started, obtaining a coding picture associated with an object; by scanning the coding picture, sending a verification request including coding information to a server, so that the server obtains from the coding information: attribute information for sending to the electronic device and displaying on the electronic device; and verification information for verifying whether the object has preset attributes after receiving the query request.
[0006] An embodiment of the present application also provides a coding verification method, which is applied to a server and includes: receiving a verification request including coding information from an electronic device; obtaining from the coding information: attribute information, which is sent to the electronic device and displayed on the electronic device; and verification information, which is used to verify whether the object is a preset attribute after receiving a query request; and sending the attribute information to the electronic device.
[0007] An embodiment of the present application also provides a code generation method, which includes: determining initial information corresponding to an object; encrypting the initial information using a preset public key to generate verification information; and generating a code for the object using the attribute information of the object and the verification information, wherein the security level of the verification information is set to be higher than that of the attribute information.
[0008] An embodiment of the present application also provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, enable the processor to perform the above method.
[0009] The embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored, and the above method is implemented when the instructions are executed.
[0010] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0011] By adopting this application, a single code can be used to simultaneously satisfy product queries and verify preset attributes for products, thereby improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0013] Figure 1 is a schematic diagram showing a coding processing system 1000 according to an exemplary embodiment of the present application;
[0014] Figure 2 is a framework diagram showing an encoding processing system according to an exemplary embodiment of the present application;
[0015] Figure 3 is a diagram illustrating code verification according to an exemplary embodiment of the present application;
[0016] Figure 4 is a diagram illustrating coding verification according to another exemplary embodiment of the present application;
[0017] Figure 5 is a flow chart illustrating a coding verification method according to an exemplary embodiment of the present application;
[0018] Figure 6 is a flowchart illustrating a code generation method according to an exemplary embodiment of the present application;
[0019] Figure 7 is a block diagram illustrating an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0021] The system will be described in more detail with reference to the accompanying drawings. In the following, embodiments will be described in more detail with reference to the accompanying drawings. Like reference numerals refer to like elements throughout.
[0022] Figure 1 1 is a schematic diagram showing a coding processing system 1000 according to an exemplary embodiment of the present application. Figure 1 As shown, the system 1000 may include a server 100, a network 200, an intelligent terminal 300, a computer 400, etc. The system 1000 may be used to perform various interactive operations between merchants and consumers.
[0023] The server 100 may be a physical server including an independent host, or the server 100 may be a virtual server hosted by a host cluster; the server 100 may be an application platform hosting various applications, such as a verification platform, a query platform, and a payment platform.
[0024] The smart terminal 300 can be a terminal used by a user (e.g., a consumer), and various application clients are running on the smart terminal 300. The user can start the client by clicking the icon corresponding to the client on the screen, and then the user can select the required function on the user interface. The smart terminal 300 described here can also be a computer, a tablet device, a laptop, a PDA, a wearable device (such as smart glasses, smart watches, etc.), and other types of terminal devices are not limited in this specification.
[0025] The computer 400 may be a terminal device used by the merchant to which the object 10 belongs. The merchant may use the computer 400 to send the commodity information of the object 10 to the server 100 through the network 200 through a dedicated application, and the server 100 may store the commodity and the commodity information together. In addition to the computer 400, the merchant may also use other types of terminal devices such as mobile phones, tablet devices, laptops, PDAs, wearable devices (such as smart glasses, smart watches, etc.), and this specification does not limit this.
[0026] The intelligent terminal 300, the computer 400 and the server 100 interact with each other through the network 200, and the network 200 may include various types of wired or wireless networks, for example, the network 200 may include a public switched telephone network (PSTN) and the Internet.
[0027] According to the embodiment of the present specification, at the stage of generating a code, the computer 400 sends a request for generating a code to the server 100. The server 100 generates a code corresponding to the commodity according to the code generation method of the exemplary embodiment of the present application, and sends the code to the computer 400. The merchant can output the code from the computer 400, and print and attach (e.g., paste) the code to the surface of the object 10.
[0028] According to an exemplary embodiment of the present application, the encoding refers to representing various information in a graphic format. The encoding may include one-dimensional codes (e.g., barcodes), two-dimensional codes, and three-dimensional codes. One-dimensional codes refer to expressing information only in a single direction, two-dimensional codes refer to black and white, recording data symbol information distributed in a plane (two-dimensional direction) according to a certain rule using a certain geometric figure, and three-dimensional codes refer to text compiling a string of binary digits, and then encoding the binary digit string and image information into a set of arrays that can be interpreted by specific rules through a specific algorithm and combined with the color content of the entire picture. In the present application, a two-dimensional code is preferably used.
[0029] During the code verification stage, for example, consumers can determine whether the object meets preset attributes by scanning the code of the object, such as whether the object is originated abroad, whether the object is within the shelf life, or whether the object is suitable for consumption by infants and young children.
[0030] In an exemplary embodiment of the present application, the preset attribute may refer to whether the object is authentic. That is, when the object is authentic, the smart terminal 300 scans the code on the object 10, reads the code, and sends the read code information to the server 100. The server 100 decodes the code according to the code verification method of the exemplary embodiment of the present application. If it is determined that the verification is passed, it means that the object 10 is authentic.
[0031] In addition, the consumer can also scan the code on the object 10 to read the code and send the read code information to the server 100. The server 100 decodes the code according to the code verification method of the exemplary embodiment of the present application, obtains the commodity information of the object 10, such as the edible information of the object 10, the origin of the object 10, etc., and sends the commodity information of the object 10 to the smart terminal 300, so that the consumer can understand the object 10.
[0032] It should be noted that: Figure 1 The system 1000 shown and the related description are only exemplary. For example, the system 1000 may include a plurality of terminals 400 of merchants corresponding to a plurality of objects respectively and a plurality of terminals 300 corresponding to a plurality of users respectively.
[0033] Figure 2 A framework diagram of a coding processing system according to an exemplary embodiment of the present application is shown. For ease of description, a terminal to which a merchant producing or owning an object sends a coding generation request for the object may be described as a first user terminal, and a terminal to which a user purchasing or browsing the object sends a coding verification request for the object may be described as a second user terminal.
[0034] The first user terminal may send a code generation request for an object to the server, where the object may indicate various physical goods and virtual goods. Physical goods may include various types of goods such as clothing, food, cosmetics, etc., and virtual goods may include various virtual currencies, e-books, virtual tickets, etc.
[0035] The first user terminal can use the object association application to send the attribute information of the object to the server, and the server can manage and store the object and its attribute information, wherein the attribute information may include traceability information, brand knowledge information, product description information and the like. The traceability information includes the name, specifications, origin, raw material origin and the like of the object, the brand knowledge information includes information about the brand to which the object belongs, and the product description information includes various performance parameters used to describe the object.
[0036] Subsequently, the first user terminal may send a code generation request to the server. After receiving the request, the server may generate initial information corresponding to the object. In implementation, in order to enable the code of the object to verify the preset attributes of the object, the server usually generates a string corresponding to the object (for example, a 64-bit string) in a random manner. Subsequently, the string is encrypted.
[0037] As an example, an asymmetric algorithm may be used to encrypt the string, including but not limited to RSA algorithm, Elgamal algorithm, backpack algorithm, Rabin algorithm, DH algorithm, and ECC algorithm (elliptic curve cryptography algorithm).
[0038] Asymmetric encryption algorithms require two keys: a public key and a private key. The public key and the private key are a pair. If the data is encrypted with the public key, it can only be decrypted with the corresponding private key. Because encryption and decryption use two different keys, this algorithm is called an asymmetric encryption algorithm.
[0039] In the present application, the server may randomly generate a pair of keys and disclose one of them as a public key to the first user terminal, and use the key to encrypt the initial information to generate verification information.
[0040] In implementation, the server may correspond to multiple first user terminals, that is, the server may generate different key pairs for different objects, and store the corresponding private keys while encrypting the generated initial information using the public keys therein.
[0041] Then, the verification information and the attribute information of the object can be used to generate the code of the object. Since the encoding and decoding methods for the code are known to those skilled in the art, they will not be described here. It can be seen that the security levels of the verification information and the attribute information are different, and the security level of the verification information is higher than that of the attribute information.
[0042] Subsequently, the server may send the generated code to the first user terminal, and the first user terminal may output and place the code on the outer surface of each object. When the object is a virtual object, the code may be displayed near the object.
[0043] As an example, when a user is browsing an object, he may see the code of the object. For example, when a user is shopping, he may see the code of a certain product, or after the user has purchased a certain product, he may verify the preset attributes of the product.
[0044] Based on this, the user can use the second user terminal to obtain the coded picture with the object. In implementation, the user can start an application with a picture reading function on the second user terminal.
[0045] As an example, the user can touch the shortcut icon displayed on the screen of the display unit, in which case the second user terminal runs an application corresponding to the icon, for example, a shopping application, and at the same time, displays the application interface of the application containing the code on the display unit of the mobile terminal, and then the user can directly touch the virtual component displayed on the display unit with a finger or a stylus to call the picture reading function in the application. The picture can be a picture that has been stored in the second user terminal, or a picture obtained by calling the image acquisition unit in the second user terminal device.
[0046] Then, the code may be scanned to identify the code information in the picture. As an example, the picture may be scanned in full screen to identify the code included in the picture, and then, based on the scanned code information, a code verification request is sent to the server.
[0047] The server may decode the coded information using existing coding and decoding technology to obtain the attribute information and verification information of the object. The attribute information may be sent to the second user terminal, and after receiving the attribute information, the second user terminal may display the attribute information according to the preset interface layout method. As an example, the product information of the product may be displayed on the preset layout interface, and at the same time, the verification area may be reserved / displayed on the preset layout interface.
[0048] Subsequently, the user may send a query request for the preset attribute of the object to the server. As an example, the user may perform various operations on the verification area to send the query request, for example, the user may perform input by scratching the code according to the prompt in the verification area, or may perform input by inputting the obtained verification code.
[0049] In implementation, the server may decode the verification information after receiving the query request. If the decoding is successful, it is determined that the object meets the preset attribute. In an example, it can be determined that the object is authentic, and if the decoding fails, it means that the object is fake. Since the private key corresponding to the object has been pre-stored in the server, the private key can be used to decode the verification information after receiving the query request.
[0050] In addition, in order to further improve security and verification speed, after purchasing the object, the user can obtain the private key corresponding to the object. In this case, the query request sent by the user can include the private key input by the user. In this way, the server can directly decode the verification information using the private key to determine whether the decoding is successful. If the decoding is successful, it is determined that the object is authentic. If the decoding fails, it means that the object is fake.
[0051] Finally, the second user terminal may display the verification result according to the verification situation, for example, it may display information such as "this product is authentic" in the verification area, or it may display information such as "this product was not found" in the verification area. In addition, the server may also determine the number of verifications that have been performed on the object using the same private key, and send and display the verification number on the second user terminal.
[0052] In implementation, the above-mentioned coded image may also include a coating area covered by a coating. The user can scratch the coating to obtain a verification code, and then compare the verification code with the above-mentioned character string. If they are consistent, it is determined that the object is authentic. If they are inconsistent, it is determined that the object is fake.
[0053] In order to make it easier to understand this application, the following Figure 3 and Figure 4 Give a description. Figure 3 is a diagram illustrating code verification according to an exemplary embodiment of the present application; Figure 4is a diagram showing coding verification according to another exemplary embodiment of the present application. For ease of description, Figure 3 and Figure 4 The preset attributes in indicate the authenticity of the product.
[0054] like Figure 3 As shown in the user interface 320, after launching an application with a scanning function, the user can start the scanning service in the application to scan the encoded image 310. In addition, as shown in the user interface 320, the user can select the encoded image by selecting a picture stored in the album.
[0055] Subsequently, as shown in the user interface 330 , the attribute information of the commodity corresponding to the code is displayed on the display unit, including the rules, origin, commodity details, etc. of the commodity, and the user interface 330 also includes a verification area 301 .
[0056] That is to say, after scanning the code of the commodity, only the attribute information of the commodity can be obtained to facilitate the user to understand the commodity, and there is no need to verify the preset attributes of the commodity. Subsequently, if the user needs to determine the preset attributes of the commodity (for example, to determine whether the commodity is genuine), it can be operated through the indication information on the verification area 301. To this end, the user input corresponding to the triggering verification request can be pre-set. As an example, the user's scratching operation can be determined as a triggering action, wherein the scratching operation indicates that the user continues to touch a certain point on the verification area for a predetermined distance in a specific direction. For example, after the user touches the verification area, it can be detected that the user continues to touch in the horizontal direction for more than a predetermined distance (for example, one centimeter), it is determined that the user has performed a triggering action, and then a query request is sent to the server.
[0057] Subsequently, after receiving the query request, the server determines the authenticity of the commodity and displays the indication information indicating the authenticity of the object on the verification area 301 as shown in interface 340. In addition, as shown in interface 350, the verification number can be displayed on the verification area 301 to help the user determine the authenticity.
[0058] In addition, this application can also provide Figure 4 The code verification method described above. The image 410 may include the code of the product and a scratch code area, and the scratch code area may prompt the user to verify the authenticity by scratching the code.
[0059] like Figure 4 As shown in the user interface 420, after launching an application with a scanning function, the user can start the scanning service in the application to scan the encoded image 410. In addition, as shown in the user interface 420, the user can select the encoded image by selecting a picture stored in the album.
[0060] As shown in the user interface 430 , the attribute information of the commodity corresponding to the code is displayed on the display unit, including the rules, origin, commodity details, etc. of the commodity, and the user interface 430 also includes a verification area 402 .
[0061] After the user performs an operation according to the information displayed on the verification area 402, as shown in interface 440, a character string is displayed on the verification area 402, and the character string is compared with the verification code displayed on 401. If they are consistent, the product is determined to be authentic.
[0062] Figure 5 is a flowchart illustrating a coding verification method according to an exemplary embodiment of the present application.
[0063] In step S510, after an application having a picture reading function is started, a coded picture having an object is obtained.
[0064] In step S520, by scanning the coded image, a verification request including coded information is sent to the server, so that the server obtains from the coded information: attribute information, which is used to be sent to the electronic device and displayed on the electronic device; and verification information, which is used to verify whether the object has preset attributes after receiving the query request.
[0065] According to an exemplary embodiment, the preset attribute is a specific attribute set in advance. In implementation, the preset attribute may include the origin, shelf life, edible objects, main ingredients, etc. of the object. For example, in the present application, it can be verified whether the origin of the object is abroad, or whether the object is within the shelf life, or whether the object is suitable for consumption by infants and young children, etc.
[0066] Optionally, the method further includes: displaying the attribute information and the verification area of the object in a preset interface layout manner.
[0067] Optionally, the method further includes: receiving user input for verifying a preset attribute of the object in the verification area; and sending a query request to the server in response to the user input.
[0068] Optionally, the method further includes: receiving initial information obtained after the server decodes the verification information using a preset private key.
[0069] Optionally, the method further includes: displaying indication information indicating a preset attribute of the object on the verification area according to the decoded information.
[0070] Optionally, the method further comprises: receiving and displaying from the server the number of verifications that have been performed using the private key.
[0071] Optionally, the image also includes a coating area where the verification code is covered by the coating.
[0072] Optionally, the method further includes: determining whether the verification code is consistent with the initial information, thereby determining a preset attribute of the object.
[0073] According to the coding verification method of the exemplary embodiment of the present application, a single code can be used to simultaneously satisfy the commodity query and verification of preset attributes for commodities. Furthermore, the number of times to verify the preset attributes can be provided to the user, so that the user can more accurately judge the preset attributes. Furthermore, after receiving user input such as a user scratch code, the preset attributes of the object can be verified, thereby enhancing the user's psychological suggestion to verify the preset attributes and stimulating the user to verify the preset attributes by scratching the code online. Furthermore, the initial information can be directly displayed as an anti-counterfeiting code in the verification area, and the preset attributes of the object can be more accurately determined by comparing the anti-counterfeiting code online and offline.
[0074] Figure 6 is a flowchart illustrating a code generation method according to an exemplary embodiment of the present application.
[0075] In step S610, initial information corresponding to the object is determined.
[0076] In step S620, the initial information is encrypted using a preset public key to generate verification information.
[0077] In step S630, a code of the object is generated using the attribute information of the object and the verification information.
[0078] Optionally, the initial information includes a randomly generated character string.
[0079] Optionally, encrypting the initial information using a preset public key includes generating verification information: generating the public key and a corresponding private key based on an asymmetric encryption algorithm; and encrypting the initial information using the public key to generate verification information.
[0080] According to the code generation method of the exemplary embodiment of the present application, the attribute information and verification information of the object can generate a single code, thereby simultaneously satisfying the commodity query and verification of the preset attributes of the commodity. Furthermore, the security levels of the attribute information and the verification information are set to different levels, thereby satisfying the needs of different users. Furthermore, the initial information indicating the preset attributes of the object is encrypted using a private key, effectively preventing the initial information from being tampered with.
[0081] Figure 7 is a block diagram showing an electronic device according to an exemplary embodiment of the present application. Figure 7At the hardware level, the electronic device may include a processor, an internal bus, and a computer-readable storage medium, wherein the computer-readable storage medium includes a volatile memory and a non-volatile memory. The processor reads the corresponding computer program from the non-volatile memory and then runs it. Of course, in addition to the software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0082] Specifically, the processor performs the following operations: after an application with a picture reading function is started, obtains a coded picture associated with an object; by scanning the coded picture, sends a verification request including coded information to a server, so that the server obtains from the coded information: attribute information, which is used to be sent to the electronic device and displayed on the electronic device; and verification information, which is used to verify whether the object is a preset attribute after receiving the query request.
[0083] Optionally, the processor may further perform the following steps: displaying the attribute information and the verification area of the object according to a preset interface layout.
[0084] Optionally, the processor may further perform the following steps: receiving user input for verifying a preset attribute of the object within the verification area; and sending the query request to the server in response to the user input.
[0085] Optionally, the processor may further perform the following steps: receiving initial information obtained after the server decodes the verification information using a preset private key.
[0086] Optionally, the processor may further perform the following step: displaying indication information indicating a preset attribute of the object on the verification area.
[0087] Optionally, the processor may further perform the following steps: receiving and displaying the number of verifications performed using the private key from the server.
[0088] Optionally, the coded image also includes a coating area where the verification code is covered by the coating.
[0089] Optionally, the processor may further perform the following steps: determining whether the verification code is consistent with the initial information, thereby determining the preset attribute of the object.
[0090] According to an exemplary embodiment of the present application, the processor may further perform the following steps: receiving a verification request including coding information from an electronic device; decoding the coding information to obtain attribute information and verification information of the object; and sending the attribute information to the electronic device.
[0091] Optionally, the processor may further perform the following steps: receiving a query request for the object from the electronic device; and determining a preset attribute of the object by determining whether the verification information is successfully decoded using a preset private key.
[0092] According to an exemplary embodiment of the present application, the processor may further perform the following steps: determining initial information corresponding to the object; encrypting the initial information using a preset public key to generate verification information; and generating a code for the object using the attribute information of the object and the verification information.
[0093] Optionally, the initial information includes a randomly generated character string.
[0094] Optionally, the processor encrypts the initial information using a preset public key in the implementation step, including generating verification information: generating the public key and the corresponding private key based on an asymmetric encryption algorithm; and encrypting the initial information using the public key to generate verification information.
[0095] According to the electronic terminal of the exemplary embodiment of the present application, the attribute information and verification information of the object can generate a single code, thereby satisfying the commodity query and verification of the preset attributes for the commodity at the same time. Furthermore, the security levels of the attribute information and the verification information are set to be different, thereby satisfying the needs of different users. Furthermore, the initial information indicating the preset attributes of the object is encrypted using a private key to effectively prevent the initial information from being tampered with. Furthermore, the number of times the preset attributes are verified can be provided to the user, so that the user can more accurately judge the preset attributes. Furthermore, after receiving user input such as a user scratch code, the preset attributes of the object can be verified, thereby enhancing the user's psychological suggestion to verify the preset attributes and stimulating the user's online scratch code to verify the preset attributes. Furthermore, the initial information can be directly displayed as an anti-counterfeiting code in the verification area, and the preset attributes of the object can be more accurately determined by comparing the anti-counterfeiting code online and offline.
[0096] It should be noted that the execution subject of each step of the method provided in Example 1 can be the same device, or the method can be executed by different devices. For example, the execution subject of step 21 and step 22 can be device 1, and the execution subject of step 23 can be device 2; for another example, the execution subject of step 21 can be device 1, and the execution subject of step 22 and step 23 can be device 2; and so on.
[0097] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0098] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0099] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0101] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0102] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0103] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0104] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0106] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A code verification method, which is applied to an electronic device and is used to verify a single code, characterized in that: include: After the application with the image reading function is started, the coded image associated with the object is obtained; By scanning the coded image, a verification request including a single coded information is sent to the server, so that the server obtains from the single coded information: attribute information, for sending to the electronic device and displaying on the electronic device; as well as Verification information is used to verify whether the object is a preset attribute after receiving a query request.
2. The method according to claim 1, characterized in that Also includes: The attribute information and verification area of the object are displayed according to a preset interface layout.
3. The method according to claim 2, characterized in that Also includes: receiving, within the verification area, a user input for verifying the preset attribute of the object; In response to the user input, the query request is sent to the server.
4. The method according to claim 3, characterized in that Also includes: Receive initial information obtained after the server decodes the verification information using a preset private key.
5. The method according to claim 4, characterized in that Also includes: Indication information for indicating the preset attribute of the object is displayed on the verification area.
6. The method according to claim 4, characterized in that Also includes: The number of authentications that have been performed using the private key is received from the server and displayed.
7. The method according to claim 4, characterized in that The coded image also includes a coating area where the verification code is covered by the coating.
8. The method according to claim 7, characterized in that Also includes: It is determined whether the verification code is consistent with the initial information, thereby determining the preset attribute of the object.
9. A coding verification method, the method being applied to a server, characterized in that: Used to verify a single code, including: receiving, from an electronic device, a verification request including a single coded message; From the single coded information: attribute information, for sending to the electronic device and displaying on the electronic device; and Verification information, used to verify whether the object is a preset attribute after receiving a query request; The attribute information is sent to the electronic device.
10. The method according to claim 9, characterized in that Also includes: receiving the query request from the electronic device; The preset attribute of the object is determined by whether the verification information is successfully decoded using a preset private key.
11. A method for generating a code, characterized in that: Used to generate a single code, including: Determining initial information corresponding to the object; Encrypting the initial information using a preset public key to generate verification information; A single code of the object is generated using the attribute information of the object and the verification information, wherein the security level of the verification information is set higher than that of the attribute information.
12. The method according to claim 11, characterized in that The initial information includes a randomly generated character string.
13. The method according to claim 11, characterized in that Encrypting the initial information using a preset public key includes generating verification information: Generate the public key and the corresponding private key based on an asymmetric encryption algorithm; The initial information is encrypted using the public key to generate verification information.
14. An electronic device, characterized in that: include: processor; as well as A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any one of claims 1 to 13.
15. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed, the method of any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Two-dimensional code-based anti-counterfeiting and encryption methods, electronic device and storage medium
CN108334915A