CN112348535A - Traceability application method and system based on block chain technology - Google Patents

Traceability application method and system based on block chain technology Download PDF

Info

Publication number
CN112348535A
CN112348535A CN202011217318.7A CN202011217318A CN112348535A CN 112348535 A CN112348535 A CN 112348535A CN 202011217318 A CN202011217318 A CN 202011217318A CN 112348535 A CN112348535 A CN 112348535A
Authority
CN
China
Prior art keywords
traceability
target
traceability information
information file
proxy server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011217318.7A
Other languages
Chinese (zh)
Other versions
CN112348535B (en
Inventor
向艳丽
李伟
蔡津津
王胜先
闫蕾
汪浩
王小伟
崔傅成
孔成兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinhua Zhongjing Credit Management Co ltd
Original Assignee
Xinhua Zhongjing Credit Management Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xinhua Zhongjing Credit Management Co ltd filed Critical Xinhua Zhongjing Credit Management Co ltd
Priority to CN202011217318.7A priority Critical patent/CN112348535B/en
Publication of CN112348535A publication Critical patent/CN112348535A/en
Application granted granted Critical
Publication of CN112348535B publication Critical patent/CN112348535B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9554Retrieval from the web using information identifiers, e.g. uniform resource locators [URL] by using bar codes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses a traceability application method and a traceability application system based on a block chain technology, wherein the traceability application method comprises the following steps: obtaining traceability information of products corresponding to a preset number of product terminals, storing the preset number of traceability information into a preset number of traceability information files in a block chain database, determining the association degree of each first traceability information file and the rest of second traceability information files, associating target second traceability information files of which the association degree with the first traceability information files is more than or equal to a preset threshold value, generating traceability labels for the first traceability information files, uploading the traceability labels into N preset proxy servers, obtaining preset signature traceability labels of the N preset proxy servers, receiving a scanning instruction sent by the current proxy server, providing the target traceability labels of the target products to the current proxy server, determining whether to transmit the target traceability information files of the target products according to the scanning result, and avoiding the requirement of scanning and inquiring the traceability information of each product by a user, the working efficiency is improved.

Description

Traceability application method and system based on block chain technology
Technical Field
The invention relates to the technical field of block chains, in particular to a traceability application method and a traceability application system based on a block chain technology.
Background
At present, with the rapid development of social economy and the continuous improvement of the quality of the living standard of people, the safety problem of commodities arouses the wide attention of society, so that various production merchants print and print traceability information two-dimensional codes of the commodities on packaging surfaces when packaging the commodities so as to enable consumers to know the traceability information of the commodities at any time, but the method is utilized by various hackers or lawless persons, the hackers and the lawless persons tamper on webpages of the commodities so as to enable the traceability information of the commodities to be seriously inconsistent with original information, so that the clearance between the consumers and the production merchants is larger and larger, and then, the storage and the calling of the traceability information are realized by utilizing a block chain technology in the prior art, the lawless persons cannot crack and modify due to the tightness and ultrahigh safety, the safety and the accuracy of the traceability information of the commodities are greatly improved, however, this method has the following disadvantages: because the server is connected with the blockchain client and each product has a respective traceability label, if a consumer purchases a large number of products of the same category at one time, the traceability labels of each product need to be scanned for security verification, thereby greatly consuming the time of the consumer and seriously influencing the experience of the consumer.
Disclosure of Invention
In view of the above-mentioned problems, the present invention provides a traceability application method and system based on a blockchain technology, so as to solve the problems mentioned in the background art that since a server is connected to a blockchain client and each product has a respective traceability tag, if a consumer purchases a large number of products of the same category at one time, the traceability tags of each product need to be scanned for security verification, thereby greatly consuming the time of the consumer and seriously affecting the experience of the consumer.
A tracing application method based on a block chain technology comprises the following steps:
obtaining traceability information of products corresponding to a preset number of product terminals, storing the preset number of traceability information into a preset number of traceability information files in a block chain database, and determining the association degree of each first traceability information file and the rest second traceability information files;
associating the target second traceability information file with the first traceability information file, wherein the association degree of the target second traceability information file is greater than or equal to a preset threshold value;
generating a traceability label for the first traceability information file;
uploading the traceability tags to N preset proxy servers to obtain preset signature traceability tags of the N preset proxy servers;
receiving a scanning instruction sent by a current proxy server, providing a target traceability label of a target product to the current proxy server, and determining whether to transmit a target traceability information file of the target product according to a scanning result of the current proxy server.
Preferably, the obtaining of the traceability information of the products corresponding to the preset number of product terminals, storing the preset number of traceability information in the preset number of traceability information files in the block chain database, and determining the association degree between each first traceability information file and the rest of second traceability information files includes:
detecting terminal identifications of the preset number of product terminals and a connection base station;
acquiring a delivery parameter, a manufacturing parameter and an identification parameter of each product, wherein the delivery parameter comprises a product origin, the manufacturing parameter comprises a product production batch and a production date, and the identification parameter comprises a product composition and a product picture;
taking the delivery parameters, the manufacturing parameters and the identification parameters of each product as initial traceability information of each product, adding a terminal identification and a connection base station of a product terminal corresponding to each product into the initial traceability information of each product, and obtaining final traceability information of each product;
storing a preset number of final tracing information into a preset number of tracing information files in a block chain database;
comparing the delivery parameters, the manufacturing parameters and the identification parameters in each traceability information file, the terminal identification of the product terminal to which the traceability information file belongs and the connection base station to obtain the similarity between each first traceability information file and the rest second traceability information files;
and determining the association degree of each first traceability information file and the rest second traceability information files according to a preset similarity association degree conversion algorithm.
Preferably, the associating the target second traceability information file with the first traceability information file with the degree of association being greater than or equal to a preset threshold value includes;
extracting a first keyword in the first tracing information file and a second keyword in a target second tracing information file;
determining a common keyword of the first keyword and the second keyword which are the same;
establishing an initial network model, inputting the common keywords into the initial network model, and establishing data nodes for each common keyword;
and connecting the data nodes of each common keyword.
Preferably, the traceability label comprises one or more of a two-dimensional code label or a bar code label.
Preferably, the uploading the traceability label to N preset proxy servers to obtain the traceability labels of the preset signatures of the N preset proxy servers includes:
acquiring network addresses of N preset proxy servers;
carrying out security verification on the N network addresses, and setting a key of a connection block link database for each preset proxy server after the verification is passed;
after the setting is finished, connecting the block chain database with the network connection of N preset proxy servers;
uploading the traceability tags to N preset proxy servers for the N preset proxy servers to perform system entry of traceability tags;
and after the input is finished, receiving the preset signature traceability labels fed back by the N preset proxy servers.
Preferably, the method comprises the steps of receiving a scanning instruction sent by a current proxy server, providing a target traceability label of a target product to the current proxy server, and determining whether to transmit a target traceability information file of the target product according to a scanning result of the current proxy server;
analyzing the scanning instruction to determine a target product;
searching whether the target product has a traceability information file in the block chain database, if so, acquiring a target traceability label corresponding to the target traceability file, otherwise, sending a prompt that the target product has no traceability information to the current proxy server;
transmitting the target tracing label to the current proxy server for scanning, detecting whether the current proxy server feeds back the current signature tracing label, if so, transmitting a target tracing information file of a target product to the current proxy server, otherwise, confirming that the current proxy server is invalid, and verifying a current connection key of the current proxy server;
and when the current connection key passes the verification, transmitting the target traceability information file to the current proxy server, and when the current connection key fails the verification for three times, disconnecting the network connection state with the current proxy server.
Preferably, the method further comprises:
subsequently obtaining the source tracing update information of the products corresponding to the preset number of product terminals;
and storing the traceability updating information into a traceability information file corresponding to each product.
Preferably, the verifying the current connection key of the current proxy server includes:
acquiring a target tracing file of the target product, analyzing the target tracing file, and acquiring a target keyword in the target tracing file;
determining a target data node corresponding to the target keyword, determining whether the current proxy server is a common connection proxy server according to a historical connection record of the target node, if so, determining that the current proxy server is safe in connection, and acquiring a current connection key provided by the current proxy server for verification, otherwise, determining that the current proxy server is unsafe;
when the current proxy server is determined to be unsafe, acquiring a current connection key provided by the current proxy server and signature information of the current proxy server;
and verifying the current connection key, storing the signature information of the current proxy server after the verification is passed, and marking the current proxy server as a safe proxy server.
Preferably, the determining the association degree between each first traceability information file and the rest of the second traceability information files comprises:
extracting a first keyword in the first traceability information file and a second keyword in the second traceability information file;
calculating an importance coefficient of each of the first keywords:
Figure BDA0002760825700000051
wherein k isiExpressed as the importance coefficient of the ith first keyword, M is expressed as the number of first keywords, SiThe frequency of the ith first keyword appearing in the first traceability information file is represented as [0.1,0.3 ]]Ln is expressed as a natural logarithm, QiThe text length is expressed as the ith first keyword, theta is expressed as the number of times of the ith first keyword appearing in the first traceability information file, L is expressed as the total text length of the first traceability information file, beta is expressed as the influence factor of the remaining first keyword on the calculation importance coefficient of the ith first keyword, and the value is 0.3;
removing a first number of third keywords with the importance coefficients smaller than a preset threshold value from the first keywords, and remaining a second number of fourth keywords;
calculating the association degree of the first traceability information file and the rest of second traceability information files according to the second quantity of fourth keywords:
Figure BDA0002760825700000052
wherein, a is expressed as a first tracing information file, b is expressed as a second tracing information file, UbThe number of the second keywords expressed as the b-th second traceability information file, P is the number of the fourth keywords, TabExpressed as the number of keywords, ω, identical in the second keyword and the fourth keywordaExpressed as the weight, ω, of the same keyword among a second number of fourth keywordsbThe weight, G, of the same keyword in the second keyword of the b-th second tracing information fileabThe relevance degree of the first traceability information file and the b second traceability information file is represented;
and arranging the association degrees of the first traceability information file and the rest second traceability information files in a descending order.
A traceability application system based on a block chain technology comprises:
the system comprises a first acquisition module, a block chain database and a second acquisition module, wherein the first acquisition module is used for acquiring the traceability information of products corresponding to a preset number of product terminals, storing the preset number of traceability information into a preset number of traceability information files in the block chain database, and determining the association degree of each first traceability information file and the rest second traceability information files;
the association module is used for associating the target second traceability information file with the first traceability information file, wherein the association degree of the target second traceability information file is greater than or equal to a preset threshold;
the generating module is used for generating a traceability label for the first traceability information file;
the second acquisition module is used for uploading the traceability tags to N preset proxy servers and acquiring the preset signature traceability tags of the N preset proxy servers;
and the determining module is used for receiving a scanning instruction sent by the current proxy server, providing a target traceability label of the target product for the current proxy server, and determining whether to transmit a target traceability information file of the target product according to a scanning result of the current proxy server.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a flowchart of a tracing application method based on a block chain technique according to the present invention;
FIG. 2 is another flowchart of the tracing application method based on the blockchain technique according to the present invention;
FIG. 3 is a flowchart of another exemplary embodiment of a tracing application method based on a blockchain technique according to the present invention;
fig. 4 is a schematic structural diagram of a tracing application system based on the blockchain technique according to the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
At present, with the rapid development of social economy and the continuous improvement of the quality of the living standard of people, the safety problem of commodities arouses the wide attention of society, so that various production merchants print and print traceability information two-dimensional codes of the commodities on packaging surfaces when packaging the commodities so as to enable consumers to know the traceability information of the commodities at any time, but the method is utilized by various hackers or lawless persons, the hackers and the lawless persons tamper on webpages of the commodities so as to enable the traceability information of the commodities to be seriously inconsistent with original information, so that the clearance between the consumers and the production merchants is larger and larger, and then, the storage and the calling of the traceability information are realized by utilizing a block chain technology in the prior art, the lawless persons cannot crack and modify due to the tightness and ultrahigh safety, the safety and the accuracy of the traceability information of the commodities are greatly improved, however, this method has the following disadvantages: because the server is connected with the blockchain client and each product has a respective traceability label, if a consumer purchases a large number of products of the same category at one time, the traceability labels of each product need to be scanned for security verification, thereby greatly consuming the time of the consumer and seriously influencing the experience of the consumer. In order to solve the above problem, the present embodiment discloses a tracing application method based on a block chain technology.
A tracing application method based on the blockchain technology, as shown in fig. 1, includes the following steps:
step S101, obtaining traceability information of products corresponding to a preset number of product terminals, storing the preset number of traceability information into a preset number of traceability information files in a block chain database, and determining the association degree of each first traceability information file and the rest second traceability information files;
step S102, associating a target second traceability information file with the first traceability information file, wherein the association degree of the target second traceability information file is greater than or equal to a preset threshold value;
step S103, generating a traceability label for the first traceability information file;
step S104, uploading the traceability tags to N preset proxy servers, and acquiring the preset signature traceability tags of the N preset proxy servers;
step S105, receiving a scanning instruction sent by the current proxy server, providing a target traceability label of the target product to the current proxy server, and determining whether to transmit a target traceability information file of the target product according to a scanning result of the current proxy server;
in this embodiment, the consumer only needs to scan the traceability label of the first traceability information file to know the traceability information of the target product and know the traceability information of other products.
The working principle of the technical scheme is as follows: the method comprises the steps of obtaining traceability information of products corresponding to a preset number of product terminals, storing the preset number of traceability information into a preset number of traceability information files in a block chain database, determining the association degree of each first traceability information file and other second traceability information files, associating target second traceability information files with the association degree of the first traceability information files being larger than or equal to a preset threshold value, generating traceability labels for the first traceability information files, uploading the traceability labels into N preset proxy servers, obtaining preset signature traceability labels of the N preset proxy servers, receiving a scanning instruction sent by the current proxy server, providing the target traceability labels of target products for the current proxy server, and determining whether to transmit the target traceability information files of the target products according to the scanning result of the current proxy server.
The beneficial effects of the above technical scheme are: by determining the relevance of the traceability information corresponding to each product, when one product is produced to the traceability label, a user scans the traceability label to correlate the traceability information of other related products, the user does not need to scan and inquire the traceability information of each product, the working efficiency is improved, the problem that in the prior art, a server is connected with a block chain client, each product has a respective traceability label, if a consumer purchases a large number of products of the same type at one time, the traceability label of each product needs to be scanned to carry out security verification, the time of the consumer is greatly consumed is solved, the experience of the user is improved, meanwhile, the storage and calling of the traceability information by using a regional chain database also ensure the security of the data, and the situations that lawless persons modify or copy the traceability information and the like are avoided, furthermore, the safety of the tracing information of the product is further ensured by limiting the proxy server, virus invasion and the like to the regional chain database caused by calling the tracing information by the high-risk vulnerability server are avoided, and the safety is improved.
In one embodiment, the obtaining of the tracing information of the products corresponding to the preset number of product terminals, storing the preset number of tracing information into the preset number of tracing information files in the block chain database, and determining the association degree between each first tracing information file and the other second tracing information files includes:
detecting terminal identifications of the preset number of product terminals and a connection base station;
acquiring a delivery parameter, a manufacturing parameter and an identification parameter of each product, wherein the delivery parameter comprises a product origin, the manufacturing parameter comprises a product production batch and a production date, and the identification parameter comprises a product composition and a product picture;
taking the delivery parameters, the manufacturing parameters and the identification parameters of each product as initial traceability information of each product, adding a terminal identification and a connection base station of a product terminal corresponding to each product into the initial traceability information of each product, and obtaining final traceability information of each product;
storing a preset number of final tracing information into a preset number of tracing information files in a block chain database;
comparing the delivery parameters, the manufacturing parameters and the identification parameters in each traceability information file, the terminal identification of the product terminal to which the traceability information file belongs and the connection base station to obtain the similarity between each first traceability information file and the rest second traceability information files;
and determining the association degree of each first traceability information file and the rest second traceability information files according to a preset similarity association degree conversion algorithm.
The beneficial effects of the above technical scheme are: the terminal identification of the product terminal corresponding to each product, the connection base station and the self parameters of each product are jointly formed into the traceability information, so that consumers or more traceability information about the product can be enabled, the quality and the reliability of the product can be further ensured, meanwhile, the relevance between each traceability information file is obtained by utilizing the preset similarity relevance conversion algorithm, compared with the situation that the final result is determined by directly utilizing the similarity, the fault tolerance rate is improved, and the accuracy of the relevance between each traceability information file is ensured.
In an embodiment, as shown in fig. 2, the associating the target second traceability information file with the first traceability information file association degree being greater than or equal to a preset threshold includes;
step S201, extracting a first keyword in the first traceability information file and a second keyword in a target second traceability information file;
step S202, determining a common keyword of which the first keyword is the same as the second keyword;
step S203, constructing an initial network model, inputting the common keywords into the initial network model, and constructing data nodes for each common keyword;
and step S204, connecting the data nodes of each common keyword.
The beneficial effects of the above technical scheme are: the first traceability file information and the second traceability file information are associated by constructing a network model and further constructing nodes of common keywords, so that a user can quickly inquire the second traceability file related to the first traceability file when scanning the traceability label corresponding to the first traceability file, and the stability is improved.
In one embodiment, the traceability label comprises one or more of a two-dimensional code label or a bar code label.
In an embodiment, as shown in fig. 3, the uploading the traceability tag to N preset proxy servers to obtain the traceability tags of the preset signatures of the N preset proxy servers includes:
s301, acquiring network addresses of N preset proxy servers;
step S302, carrying out security verification on the N network addresses, and setting a key of a connection block link database for each preset proxy server after the verification is passed;
step S303, after the setting is finished, connecting the block chain database with the network connection of N preset proxy servers;
step S304, uploading the traceability label to N preset proxy servers for the system entry of the traceability label by the N preset proxy servers;
and step S305, after the recording is finished, receiving the preset signature traceability labels fed back by the N preset proxy servers.
The beneficial effects of the above technical scheme are: the safety of the network connection of the preset proxy server and the regional chain database can be ensured by verifying the safety of the network address of each preset proxy server, the damage of viruses to files in the regional chain database is further avoided, the safety is improved, meanwhile, the safety login of the proxy server can be verified by setting a connection key for each preset proxy server, the safety of the files in the database is further ensured, further, the tracing labels of the products can be accurately known by the proxy server through receiving the tracing labels of the preset signatures fed back by the N preset proxy servers, and then the tracing information of the products can be quickly called subsequently.
In one embodiment, a scanning instruction sent by a current proxy server is received, a target traceability label of a target product is provided for the current proxy server, and whether a target traceability information file of the target product is transmitted or not is determined according to a scanning result of the current proxy server;
analyzing the scanning instruction to determine a target product;
searching whether the target product has a traceability information file in the block chain database, if so, acquiring a target traceability label corresponding to the target traceability file, otherwise, sending a prompt that the target product has no traceability information to the current proxy server;
transmitting the target tracing label to the current proxy server for scanning, detecting whether the current proxy server feeds back the current signature tracing label, if so, transmitting a target tracing information file of a target product to the current proxy server, otherwise, confirming that the current proxy server is invalid, and verifying a current connection key of the current proxy server;
and when the current connection key passes the verification, transmitting the target traceability information file to the current proxy server, and when the current connection key fails the verification for three times, disconnecting the network connection state with the current proxy server.
The beneficial effects of the above technical scheme are: the identity safety of the current proxy server can be ensured by carrying out key verification on the current proxy server, when the key passes the verification, the target traceability information file is transmitted to the current proxy server, and when the key fails the verification for three times, the network connection with the current proxy server is disconnected, so that the connection state with the current proxy server can be automatically realized according to the actual condition, the intellectualization is realized, and the safety of data in a database is further ensured.
In one embodiment, the method further comprises:
subsequently obtaining the source tracing update information of the products corresponding to the preset number of product terminals;
and storing the traceability updating information into a traceability information file corresponding to each product.
The beneficial effects of the above technical scheme are: the user can know the latest traceability information about the product at any time by updating the traceability information of each product, the authenticity of data is ensured, and the experience of the consumer is further improved.
In one embodiment, said verifying the current connection key of the current proxy server comprises:
acquiring a target tracing file of the target product, analyzing the target tracing file, and acquiring a target keyword in the target tracing file;
determining a target data node corresponding to the target keyword, determining whether the current proxy server is a common connection proxy server according to a historical connection record of the target node, if so, determining that the current proxy server is safe in connection, and acquiring a current connection key provided by the current proxy server for verification, otherwise, determining that the current proxy server is unsafe;
when the current proxy server is determined to be unsafe, acquiring a current connection key provided by the current proxy server and signature information of the current proxy server;
and verifying the current connection key, storing the signature information of the current proxy server after the verification is passed, and marking the current proxy server as a safe proxy server.
The beneficial effects of the above technical scheme are: the safety condition of the current proxy server is preliminarily judged by judging whether the current proxy server is a commonly-used connection proxy server, so that the monitoring of the proxy server can be realized, and the safety of data in a database is further ensured. Further, marking the current proxy server as a secure proxy server by obtaining signature information of the current proxy server may determine the security of the current proxy server from external factors of the signature information and internal factors of the current proxy server itself. And further, the security verification of each proxy server can be effectively realized, and the security is further improved.
In one embodiment, the determining the association degree of each first traceability information file with the rest of the second traceability information files comprises:
extracting a first keyword in the first traceability information file and a second keyword in the second traceability information file;
calculating an importance coefficient of each of the first keywords:
Figure BDA0002760825700000131
wherein k isiExpressed as the importance coefficient of the ith first keyword, M is expressed as the number of first keywords, SiThe frequency of the ith first keyword appearing in the first traceability information file is represented as [0.1,0.3 ]]Ln is expressed as a natural logarithm, QiThe text length is expressed as the ith first keyword, theta is expressed as the number of times of the ith first keyword appearing in the first traceability information file, L is expressed as the total text length of the first traceability information file, beta is expressed as the influence factor of the remaining first keyword on the calculation importance coefficient of the ith first keyword, and the value is 0.3;
removing a first number of third keywords with the importance coefficients smaller than a preset threshold value from the first keywords, and remaining a second number of fourth keywords;
calculating the association degree of the first traceability information file and the rest of second traceability information files according to the second quantity of fourth keywords:
Figure BDA0002760825700000132
wherein, a is expressed as a first tracing information file, b is expressed as a second tracing information file, UbThe number of the second keywords is expressed as the number of the second traceability information files of the b-th, and P is expressed as the number of the second keywordsNumber of four keywords, TabExpressed as the number of keywords, ω, identical in the second keyword and the fourth keywordaExpressed as the weight, ω, of the same keyword among a second number of fourth keywordsbThe weight, G, of the same keyword in the second keyword of the b-th second tracing information fileabThe relevance degree of the first traceability information file and the b second traceability information file is represented;
and arranging the association degrees of the first traceability information file and the rest second traceability information files in a descending order.
The beneficial effects of the above technical scheme are: the useless keywords are eliminated by calculating the important coefficient of each first keyword in the first traceability information file, the calculation amount can be reduced for the calculation of the subsequent association degree, meanwhile, the influence of the useless keywords on the calculation result is also eliminated, the accuracy of the calculation result is improved, further, the second traceability file can be associated with the first traceability information file by calculating the association degree of the first traceability information file and each second traceability information file, the user can browse the second traceability information file while browsing the first traceability information file, and the experience of the user is further improved.
In this embodiment, a tracing application system based on the blockchain technology is further provided, as shown in fig. 4, the system includes:
the system comprises a first acquisition module, a block chain database and a second acquisition module, wherein the first acquisition module is used for acquiring the traceability information of products corresponding to a preset number of product terminals, storing the preset number of traceability information into a preset number of traceability information files in the block chain database, and determining the association degree of each first traceability information file and the rest second traceability information files;
the association module is used for associating the target second traceability information file with the first traceability information file, wherein the association degree of the target second traceability information file is greater than or equal to a preset threshold;
the generating module is used for generating a traceability label for the first traceability information file;
the second acquisition module is used for uploading the traceability tags to N preset proxy servers and acquiring the preset signature traceability tags of the N preset proxy servers;
and the determining module is used for receiving a scanning instruction sent by the current proxy server, providing a target traceability label of the target product for the current proxy server, and determining whether to transmit a target traceability information file of the target product according to a scanning result of the current proxy server.
The working principle and the advantageous effects of the above technical solution have been explained in the method claims, and are not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A tracing application method based on block chain technology is characterized by comprising the following steps:
obtaining traceability information of products corresponding to a preset number of product terminals, storing the preset number of traceability information into a preset number of traceability information files in a block chain database, and determining the association degree of each first traceability information file and the rest second traceability information files;
associating the target second traceability information file with the first traceability information file, wherein the association degree of the target second traceability information file is greater than or equal to a preset threshold value;
generating a traceability label for the first traceability information file;
uploading the traceability tags to N preset proxy servers to obtain preset signature traceability tags of the N preset proxy servers;
receiving a scanning instruction sent by a current proxy server, providing a target traceability label of a target product to the current proxy server, and determining whether to transmit a target traceability information file of the target product according to a scanning result of the current proxy server.
2. The method for tracing to the source based on the blockchain technology according to claim 1, wherein the obtaining of the tracing information of the products corresponding to the predetermined number of product terminals, the storing of the predetermined number of tracing information into the predetermined number of tracing information files in the blockchain database, and the determining of the association degree between each first tracing information file and the other second tracing information files comprises:
detecting terminal identifications of the preset number of product terminals and a connection base station;
acquiring a delivery parameter, a manufacturing parameter and an identification parameter of each product, wherein the delivery parameter comprises a product origin, the manufacturing parameter comprises a product production batch and a production date, and the identification parameter comprises a product composition and a product picture;
taking the delivery parameters, the manufacturing parameters and the identification parameters of each product as initial traceability information of each product, adding a terminal identification and a connection base station of a product terminal corresponding to each product into the initial traceability information of each product, and obtaining final traceability information of each product;
storing a preset number of final tracing information into a preset number of tracing information files in a block chain database;
comparing the delivery parameters, the manufacturing parameters and the identification parameters in each traceability information file, the terminal identification of the product terminal to which the traceability information file belongs and the connection base station to obtain the similarity between each first traceability information file and the rest second traceability information files;
and determining the association degree of each first traceability information file and the rest second traceability information files according to a preset similarity association degree conversion algorithm.
3. The method for applying traceability based on blockchain technology of claim 1, wherein associating the target second traceability information file with the first traceability information file with an association degree greater than or equal to a preset threshold comprises;
extracting a first keyword in the first tracing information file and a second keyword in a target second tracing information file;
determining a common keyword of the first keyword and the second keyword which are the same;
establishing an initial network model, inputting the common keywords into the initial network model, and establishing data nodes for each common keyword;
and connecting the data nodes of each common keyword.
4. The method as claimed in claim 1, wherein the traceability application program comprises one or more of a two-dimensional code label and a barcode label.
5. The method for tracing to the source based on the blockchain technology according to claim 1, wherein the uploading the tracing label to N preset proxy servers to obtain the preset signature tracing label of the N preset proxy servers includes:
acquiring network addresses of N preset proxy servers;
carrying out security verification on the N network addresses, and setting a key of a connection block link database for each preset proxy server after the verification is passed;
after the setting is finished, connecting the block chain database with the network connection of N preset proxy servers;
uploading the traceability tags to N preset proxy servers for the N preset proxy servers to perform system entry of traceability tags;
and after the input is finished, receiving the preset signature traceability labels fed back by the N preset proxy servers.
6. The traceability application method based on the blockchain technology as claimed in claim 3, wherein a scanning instruction sent by a current proxy server is received, a target traceability tag of a target product is provided to the current proxy server, and whether a target traceability information file of the target product is transmitted or not is determined according to a scanning result of the current proxy server, including;
analyzing the scanning instruction to determine a target product;
searching whether the target product has a traceability information file in the block chain database, if so, acquiring a target traceability label corresponding to the target traceability file, otherwise, sending a prompt that the target product has no traceability information to the current proxy server;
transmitting the target tracing label to the current proxy server for scanning, detecting whether the current proxy server feeds back the current signature tracing label, if so, transmitting a target tracing information file of a target product to the current proxy server, otherwise, confirming that the current proxy server is invalid, and verifying a current connection key of the current proxy server;
and when the current connection key passes the verification, transmitting the target traceability information file to the current proxy server, and when the current connection key fails the verification for three times, disconnecting the network connection state with the current proxy server.
7. The method for source-tracing application based on blockchain technology of claim 1, wherein the method further comprises:
subsequently obtaining the source tracing update information of the products corresponding to the preset number of product terminals;
and storing the traceability updating information into a traceability information file corresponding to each product.
8. The method as claimed in claim 6, wherein the verifying the current connection key of the current proxy server comprises:
acquiring a target tracing file of the target product, analyzing the target tracing file, and acquiring a target keyword in the target tracing file;
determining a target data node corresponding to the target keyword, determining whether the current proxy server is a common connection proxy server according to a historical connection record of the target node, if so, determining that the current proxy server is safe in connection, and acquiring a current connection key provided by the current proxy server for verification, otherwise, determining that the current proxy server is unsafe;
when the current proxy server is determined to be unsafe, acquiring a current connection key provided by the current proxy server and signature information of the current proxy server;
and verifying the current connection key, storing the signature information of the current proxy server after the verification is passed, and marking the current proxy server as a safe proxy server.
9. The method for tracing application based on blockchain technology according to claim 1, wherein said determining the association degree between each first tracing information file and the remaining second tracing information files comprises:
extracting a first keyword in the first traceability information file and a second keyword in the second traceability information file;
calculating an importance coefficient of each of the first keywords:
Figure FDA0002760825690000041
wherein k isiExpressed as the importance coefficient of the ith first keyword, M is expressed as the number of first keywords, SiThe frequency of the ith first keyword appearing in the first traceability information file is represented as [0.1,0.3 ]]Ln is expressed as a natural logarithm, QiThe length of the text is expressed as the ith first keyword, and theta is expressed as the ithThe number of times that i first keywords appear in the first traceability information file, L represents the total text length of the first traceability information file, and beta represents an influence factor of the remaining first keywords on the calculation importance coefficient of the ith first keyword, and the value is 0.3;
removing a first number of third keywords with the importance coefficients smaller than a preset threshold value from the first keywords, and remaining a second number of fourth keywords;
calculating the association degree of the first traceability information file and the rest of second traceability information files according to the second quantity of fourth keywords:
Figure FDA0002760825690000042
wherein, a is expressed as a first tracing information file, b is expressed as a second tracing information file, UbThe number of the second keywords expressed as the b-th second traceability information file, P is the number of the fourth keywords, TabExpressed as the number of keywords, ω, identical in the second keyword and the fourth keywordaExpressed as the weight, ω, of the same keyword among a second number of fourth keywordsbThe weight, G, of the same keyword in the second keyword of the b-th second tracing information fileabThe relevance degree of the first traceability information file and the b second traceability information file is represented;
and arranging the association degrees of the first traceability information file and the rest second traceability information files in a descending order.
10. A traceability application system based on a block chain technology is characterized in that the system comprises:
the system comprises a first acquisition module, a block chain database and a second acquisition module, wherein the first acquisition module is used for acquiring the traceability information of products corresponding to a preset number of product terminals, storing the preset number of traceability information into a preset number of traceability information files in the block chain database, and determining the association degree of each first traceability information file and the rest second traceability information files;
the association module is used for associating the target second traceability information file with the first traceability information file, wherein the association degree of the target second traceability information file is greater than or equal to a preset threshold;
the generating module is used for generating a traceability label for the first traceability information file;
the second acquisition module is used for uploading the traceability tags to N preset proxy servers and acquiring the preset signature traceability tags of the N preset proxy servers;
and the determining module is used for receiving a scanning instruction sent by the current proxy server, providing a target traceability label of the target product for the current proxy server, and determining whether to transmit a target traceability information file of the target product according to a scanning result of the current proxy server.
CN202011217318.7A 2020-11-04 2020-11-04 Traceability application method and system based on blockchain technology Active CN112348535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011217318.7A CN112348535B (en) 2020-11-04 2020-11-04 Traceability application method and system based on blockchain technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011217318.7A CN112348535B (en) 2020-11-04 2020-11-04 Traceability application method and system based on blockchain technology

Publications (2)

Publication Number Publication Date
CN112348535A true CN112348535A (en) 2021-02-09
CN112348535B CN112348535B (en) 2023-09-12

Family

ID=74428384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011217318.7A Active CN112348535B (en) 2020-11-04 2020-11-04 Traceability application method and system based on blockchain technology

Country Status (1)

Country Link
CN (1) CN112348535B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282828A (en) * 2021-06-02 2021-08-20 万达信息股份有限公司 Method and system for determining frequent location of user and electronic equipment
CN113610550A (en) * 2021-08-26 2021-11-05 盐城一方信息技术有限公司 Product tracing method and system based on block chain

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373091A (en) * 2014-08-11 2016-03-02 费希尔-罗斯蒙特系统公司 Securing Devices to Process Control Systems
CN105893542A (en) * 2016-03-31 2016-08-24 华中科技大学 Method and system for redistributing cold data files in cloud storage system
CN106598940A (en) * 2016-11-01 2017-04-26 四川用联信息技术有限公司 Text similarity solution algorithm based on global optimization of keyword quality
CN106610951A (en) * 2016-09-29 2017-05-03 四川用联信息技术有限公司 Improved text similarity solving algorithm based on semantic analysis
US20170262862A1 (en) * 2015-12-21 2017-09-14 Mohamed Alaa Aljawhari Method and apparatus for managing and providing provenance of product using blockchain
CN108198051A (en) * 2018-03-01 2018-06-22 口碑(上海)信息技术有限公司 Across the Method of Commodity Recommendation and device of merchandise classification
CN108346055A (en) * 2017-01-24 2018-07-31 上海中信信息发展股份有限公司 Food information retroactive method based on prefabricated single-stranded list data structure
US20190065709A1 (en) * 2017-08-24 2019-02-28 Oracle International Corporation Digital asset traceability and assurance using a distributed ledger
CN109726246A (en) * 2018-12-13 2019-05-07 贵州电网有限责任公司 One kind being associated with reason retrogressive method with visual power grid accident based on data mining
CN110110547A (en) * 2019-04-08 2019-08-09 智链万源(北京)数字科技有限公司 Data processing method of tracing to the source and device
CN110288230A (en) * 2019-06-25 2019-09-27 北京慧眼智行科技有限公司 A kind of method and device of batch related product information
CN110674360A (en) * 2019-09-27 2020-01-10 厦门美亚亿安信息科技有限公司 Method and system for constructing data association graph and tracing data
CN110866461A (en) * 2019-10-29 2020-03-06 上海躲猫猫信息技术有限公司 Commodity automatic identification tracing anti-counterfeiting method and system based on texture partition
CN110930168A (en) * 2019-11-21 2020-03-27 山东爱城市网信息技术有限公司 Anti-counterfeiting method and device for anti-counterfeiting label based on block chain and storage medium
CN111047335A (en) * 2019-12-24 2020-04-21 天津理工大学 Article circulation system tracing method and system
CN111062768A (en) * 2019-10-28 2020-04-24 林佳 Commodity recommendation method and commodity recommendation system for online shopping mall
CN111127034A (en) * 2019-12-02 2020-05-08 北京海益同展信息科技有限公司 Commodity tracing method and device, client and storage medium
CN111242652A (en) * 2020-04-24 2020-06-05 支付宝(杭州)信息技术有限公司 Block chaining method of tracing information and related equipment
CN111681015A (en) * 2020-06-10 2020-09-18 复旦大学 Product tracing method, system and equipment based on alliance chain
CN111681017A (en) * 2020-08-14 2020-09-18 支付宝(杭州)信息技术有限公司 Goods batch true checking method and device based on block chain and electronic equipment

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373091A (en) * 2014-08-11 2016-03-02 费希尔-罗斯蒙特系统公司 Securing Devices to Process Control Systems
US20170262862A1 (en) * 2015-12-21 2017-09-14 Mohamed Alaa Aljawhari Method and apparatus for managing and providing provenance of product using blockchain
CN105893542A (en) * 2016-03-31 2016-08-24 华中科技大学 Method and system for redistributing cold data files in cloud storage system
CN106610951A (en) * 2016-09-29 2017-05-03 四川用联信息技术有限公司 Improved text similarity solving algorithm based on semantic analysis
CN106598940A (en) * 2016-11-01 2017-04-26 四川用联信息技术有限公司 Text similarity solution algorithm based on global optimization of keyword quality
CN108346055A (en) * 2017-01-24 2018-07-31 上海中信信息发展股份有限公司 Food information retroactive method based on prefabricated single-stranded list data structure
US20190065709A1 (en) * 2017-08-24 2019-02-28 Oracle International Corporation Digital asset traceability and assurance using a distributed ledger
CN108198051A (en) * 2018-03-01 2018-06-22 口碑(上海)信息技术有限公司 Across the Method of Commodity Recommendation and device of merchandise classification
CN109726246A (en) * 2018-12-13 2019-05-07 贵州电网有限责任公司 One kind being associated with reason retrogressive method with visual power grid accident based on data mining
CN110110547A (en) * 2019-04-08 2019-08-09 智链万源(北京)数字科技有限公司 Data processing method of tracing to the source and device
CN110288230A (en) * 2019-06-25 2019-09-27 北京慧眼智行科技有限公司 A kind of method and device of batch related product information
CN110674360A (en) * 2019-09-27 2020-01-10 厦门美亚亿安信息科技有限公司 Method and system for constructing data association graph and tracing data
CN111062768A (en) * 2019-10-28 2020-04-24 林佳 Commodity recommendation method and commodity recommendation system for online shopping mall
CN110866461A (en) * 2019-10-29 2020-03-06 上海躲猫猫信息技术有限公司 Commodity automatic identification tracing anti-counterfeiting method and system based on texture partition
CN110930168A (en) * 2019-11-21 2020-03-27 山东爱城市网信息技术有限公司 Anti-counterfeiting method and device for anti-counterfeiting label based on block chain and storage medium
CN111127034A (en) * 2019-12-02 2020-05-08 北京海益同展信息科技有限公司 Commodity tracing method and device, client and storage medium
CN111047335A (en) * 2019-12-24 2020-04-21 天津理工大学 Article circulation system tracing method and system
CN111242652A (en) * 2020-04-24 2020-06-05 支付宝(杭州)信息技术有限公司 Block chaining method of tracing information and related equipment
CN111681015A (en) * 2020-06-10 2020-09-18 复旦大学 Product tracing method, system and equipment based on alliance chain
CN111681017A (en) * 2020-08-14 2020-09-18 支付宝(杭州)信息技术有限公司 Goods batch true checking method and device based on block chain and electronic equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘芳;薛莲;: "农产品产业链安全溯源体系设计与实现", 江苏农业科学, no. 08 *
刘荣叁;张宇;王星;: "面向新浪微博的信息溯源技术研究", 智能计算机与应用, no. 02 *
张延华;杨兆鑫;杨睿哲;金凯;林波;司鹏搏;: "基于区块链的农产品溯源系统", 情报工程, no. 03 *
张艳丰;李贺;翟倩;彭丽徽;: "基于模糊TOPSIS分析的在线评论有用性排序过滤模型研究――以亚马逊手机评论为例", 图书情报工作, no. 13 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282828A (en) * 2021-06-02 2021-08-20 万达信息股份有限公司 Method and system for determining frequent location of user and electronic equipment
CN113282828B (en) * 2021-06-02 2024-03-26 万达信息股份有限公司 Method and system for determining places where users are often, and electronic equipment
CN113610550A (en) * 2021-08-26 2021-11-05 盐城一方信息技术有限公司 Product tracing method and system based on block chain

Also Published As

Publication number Publication date
CN112348535B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN109978573B (en) Information traceability system based on block chain
CN110489485B (en) Federated blockchain network, method and storage medium for storing product data therein
CN109255622B (en) Traceable anti-fake data storage system
EP3227853A1 (en) Cryptographic verification of provenance in a supply chain
CN112000730B (en) Tracing information writing and tracing information verification method and system based on block chain
CN111353180A (en) Block chain evidence storing method, evidence obtaining method and system
CN112348535B (en) Traceability application method and system based on blockchain technology
CN109191033A (en) Item Information retroactive method and system
CN104182878A (en) Method and system for product authentication
US20200151738A1 (en) Data Driven Product Authenticity Verification
CN110913397B (en) Short message verification method, device, storage medium and computer equipment
CN111159458A (en) Agricultural product image processing and block chain interactive identification method and system
CN112631884A (en) Pressure measurement method and device based on data synchronization, computer equipment and storage medium
CN112070508B (en) Block chain payment processing method based on block chain finance and block chain payment platform
US20230334609A1 (en) Information management method and non-transitory, computer readable, tangible storage medium storing information management program
CN112287393A (en) Credible identity authentication method and device based on Internet of things and block chain
CN116071090B (en) Product production information traceability system based on block chain
CN111831817A (en) Questionnaire generation and analysis method and device, computer equipment and readable storage medium
WO2023245978A1 (en) Logistics waybill monitoring method, apparatus and device
CN110991961A (en) Block chain-based article inspection method, device, equipment and readable storage medium
CN110689356A (en) Method for recording commodity circulation process by using nested digital twin
CN116228257A (en) Method and device for acquiring article traceability data, computer equipment and storage medium
CN109274681A (en) A kind of information synchronization method, device, storage medium and server
CN110472707A (en) Product certification system and product certification method
CN108075918A (en) Internet service alteration detection method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant