Disclosure of Invention
Aiming at the technical problems, the invention provides a commodity anti-counterfeiting query method, a commodity anti-counterfeiting query device and a storage medium, and provides a solution for identifying the authenticity of a product by scanning a two-dimensional code to obtain commodity information. The technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for anti-counterfeit query of a commodity, including:
acquiring product two-dimension code information;
inquiring a product bar code associated with the product two-dimension code information;
after receiving an inquiry request sent by a client, determining target information to be inquired by the inquiry request, wherein the target information is any one or more of production information, quality inspection information, logistics information and warehousing information;
finding out product information and a server where the product information is located according to the product bar code and the target information;
sending an access request to the server to acquire the product information; and when the product information fed back by the server is received, sending the product information to the client.
In a first possible implementation manner of the first aspect of the present invention, the finding, according to the product barcode and the target information, product information and a server where the product information is located further includes:
detecting whether the server has access authority; and if so, allowing to connect the server, otherwise, preventing to connect the server.
In a second possible implementation manner of the first aspect of the present invention, the product barcode associated with the product two-dimensional code information, specifically, the association manner of the product barcode and the product two-dimensional code information is as follows:
at least the name of the product, the product attribute, the packaging type, the product description and the product bar code are input to generate the two-dimensional code.
In a third possible implementation manner of the first aspect of the present invention, before sending the access request to the server to obtain the product information, the method further includes:
and detecting whether the two-dimension code information and the product bar code are valid, and if one of the two-dimension code information and the product bar code is invalid, stopping the query operation and informing the client.
In a second aspect, an embodiment of the present invention provides an anti-counterfeit inquiry apparatus for goods, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor, when executing the computer program, implements the anti-counterfeit inquiry method for goods as described above.
In a third aspect, an embodiment of the present invention provides a device for anti-counterfeit inquiry of a commodity, including:
the input module is used for acquiring product two-dimension code information;
the matching module is used for inquiring the product bar code related to the product two-dimension code information;
the source tracing module is used for determining target information to be inquired by an inquiry request after receiving the inquiry request sent by a client, wherein the target information is any one or more of production information, quality inspection information, logistics information and warehousing information;
the retrieval module is used for finding out product information and a server where the product information is located according to the product bar code and the target information;
the sending module is used for sending an access request to the server to acquire the product information; and when the product information fed back by the server is received, sending the product information to the client.
In a first possible implementation manner of the third aspect of the present invention, the merchandise anti-counterfeiting query device further includes a security module, where the security module is configured to:
detecting whether the server has access authority; and if so, allowing to connect the server, otherwise, preventing to connect the server.
In a second possible implementation manner of the third aspect of the present invention, the merchandise anti-counterfeiting query device further includes a creating module, where the creating module is configured to:
at least the name of the product, the product attribute, the packaging type, the product description and the product bar code are input to generate the two-dimensional code.
In a third possible implementation manner of the third aspect of the present invention, the merchandise anti-counterfeiting query device further includes a self-checking module, where the self-checking module is configured to:
and detecting whether the two-dimension code information and the product bar code are valid, and if one of the two-dimension code information and the product bar code is invalid, stopping the query operation and informing the client.
In a fourth aspect, an embodiment of the present invention provides a storage medium of a merchandise anti-counterfeiting query method, where the storage medium is used to store one or more computer programs, where the one or more computer programs include program codes, and when the computer programs are run on a computer, the program codes are used to execute the merchandise anti-counterfeiting query method.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the invention provides a commodity anti-counterfeiting query method, a commodity anti-counterfeiting query device and a storage medium. And the server can find complete product information according to the product bar code by inquiring the product bar code associated with the product two-dimensional code information. After receiving a query request sent by a client, finding product information and a server where the product information is located according to target information to be queried of the query request, and sending an access request to the server to acquire the product information; when receiving the product information fed back by the server, the product information is sent to the client, so that the client can acquire the commodity information, and the user can randomly inquire any one or more of production information, quality inspection information, logistics information and warehousing information from each link in an industrial chain, so that the client can acquire enough information to distinguish the authenticity of the product.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present disclosure provides an exemplary embodiment of a method for anti-counterfeit query of a commodity, including the steps of:
s101, acquiring two-dimension code information of a product;
s102, inquiring a product bar code associated with the product two-dimension code information;
s103, after receiving an inquiry request sent by a client, determining target information to be inquired by the inquiry request, wherein the target information is any one or more of production information, quality inspection information, logistics information and warehousing information;
s104, finding out product information and a server where the product information is located according to the product bar code and the target information;
s105, sending an access request to the server to acquire the product information; and when the product information fed back by the server is received, sending the product information to the client.
It is understood that the production information is provided by the product manufacturer; the quality inspection information is provided by a relevant quality inspection department; the logistics information is provided by a logistics company responsible for transporting the product; the warehousing information is provided by a distributor.
In this embodiment, the finding of the server where the product information is located according to the product barcode and the target information specifically includes:
determining complete product information according to the product bar code, and determining corresponding part of product information on the basis of the product information according to the target information, wherein the corresponding part of product information is any one or more of production information, quality inspection information, logistics information and warehousing information;
and determining a server needing to be accessed according to the corresponding part of the product information, wherein the server needing to be accessed comprises any one or more of a manufacturer system, a quality inspection system, a logistics system and a sales system.
In this embodiment, the finding the product information and the server where the product information is located according to the product barcode and the target information further includes:
detecting whether the server has access authority; and if so, allowing to connect the server, otherwise, preventing to connect the server.
It can be understood that, in order to protect the security of the internal data of the company, the two-dimensional code information is placed in an internal system, and then an external network API interface is independently opened for access. That is, the authority of accessing the internal system by the external network address is opened in a targeted manner, and an IP which does not record the access authority of the internal system cannot be accessed.
In this embodiment, the product barcode associated with the product two-dimensional code information, specifically, the association manner of the product barcode and the product two-dimensional code information is as follows:
at least the name of the product, the product attribute, the packaging type, the product description and the product bar code are input to generate the two-dimensional code.
Preferably, before sending the access request to the server to obtain the product information, the method further includes:
and detecting whether the two-dimension code information and the product bar code are valid, and if one of the two-dimension code information and the product bar code is invalid, stopping the query operation and informing the client.
In this embodiment, when generating a two-dimensional code, if the two-dimensional code information and the product barcode are both valid, the two-dimensional code information and the product barcode may be set to be enabled; if any one of the two-dimension code information and the product bar code is invalid, the two-dimension code information and the product bar code can be set to be forbidden.
The embodiment of the invention provides a commodity anti-counterfeiting query device, which comprises a processor, a memory and a computer program which is stored in the memory and configured to be executed by the processor, wherein the processor realizes the commodity anti-counterfeiting query method when executing the computer program.
Referring to fig. 2, the present disclosure further provides an exemplary embodiment of a merchandise anti-counterfeiting query device, including:
the input module 201 is used for acquiring product two-dimension code information;
the matching module 202 is used for inquiring the product bar code associated with the product two-dimension code information;
the source tracing module 203 is configured to determine target information to be queried by a query request after receiving the query request sent by a client, where the target information is any one or more of production information, quality inspection information, logistics information, and warehousing information;
the retrieval module 204 is configured to find product information and a server where the product information is located according to the product barcode and the target information;
a sending module 205, configured to send an access request to the server to obtain the product information; and when the product information fed back by the server is received, sending the product information to the client.
It is understood that the production information is provided by the product manufacturer; the quality inspection information is provided by a relevant quality inspection department; the logistics information is provided by a logistics company responsible for transporting the product; the warehousing information is provided by a distributor.
In this embodiment, the finding of the server where the product information is located according to the product barcode and the target information specifically includes:
determining complete product information according to the product bar code, and determining corresponding part of product information on the basis of the product information according to the target information, wherein the corresponding part of product information is any one or more of production information, quality inspection information, logistics information and warehousing information;
and determining a server needing to be accessed according to the corresponding part of the product information, wherein the server needing to be accessed comprises any one or more of a manufacturer system, a quality inspection system, a logistics system and a sales system.
In this embodiment, the merchandise anti-counterfeiting query device further includes a security module, where the security module is configured to:
detecting whether the server has access authority; and if so, allowing to connect the server, otherwise, preventing to connect the server.
It can be understood that, in order to protect the security of the internal data of the company, the two-dimensional code information is placed in an internal system, and then an external network API interface is independently opened for access. That is, the authority of accessing the internal system by the external network address is opened in a targeted manner, and an IP which does not record the access authority of the internal system cannot be accessed.
In this embodiment, the merchandise anti-counterfeiting query device further includes a creating module, where the creating module is configured to:
at least the name of the product, the product attribute, the packaging type, the product description and the product bar code are input to generate the two-dimensional code.
Preferably, the commodity anti-counterfeiting query device further comprises a self-checking module, and the self-checking module is used for:
and detecting whether the two-dimension code information and the product bar code are valid, and if one of the two-dimension code information and the product bar code is invalid, stopping the query operation and informing the client.
In this embodiment, when generating a two-dimensional code, if the two-dimensional code information and the product barcode are both valid, the two-dimensional code information and the product barcode may be set to be enabled; if any one of the two-dimension code information and the product bar code is invalid, the two-dimension code information and the product bar code can be set to be forbidden.
The invention provides an exemplary embodiment, a storage medium of a commodity anti-counterfeiting query method, the storage medium of the commodity anti-counterfeiting query method is used for storing one or more computer programs, the one or more computer programs comprise program codes, and when the computer programs run on a computer, the program codes are used for executing the commodity anti-counterfeiting query method.
The computer readable media of the embodiments of the present application may be computer readable signal media or computer readable storage media or any combination of the two. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). Additionally, the computer-readable storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The invention provides a commodity anti-counterfeiting query method, a commodity anti-counterfeiting query device and a storage medium. And the server can find complete product information according to the product bar code by inquiring the product bar code associated with the product two-dimensional code information. After receiving a query request sent by a client, finding product information and a server where the product information is located according to target information to be queried of the query request, and sending an access request to the server to acquire the product information; when receiving the product information fed back by the server, the product information is sent to the client, so that the client can acquire the commodity information, and the user can randomly inquire any one or more of production information, quality inspection information, logistics information and warehousing information from each link in an industrial chain, so that the client can acquire enough information to distinguish the authenticity of the product.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.