X-ray foreign matter detection system and method based on block chain and computer equipment

文档序号:1344899 发布日期:2020-07-21 浏览:32次 中文

阅读说明:本技术 基于区块链的x光异物检测系统、方法及计算机设备 (X-ray foreign matter detection system and method based on block chain and computer equipment ) 是由 李小飞 邰广银 李建峰 乐翠 于 2019-01-11 设计创作,主要内容包括:本发明提出一种基于区块链的X光异物检测系统、方法及计算机设备,其中,该系统能够实现将分布在不同地理位置的X光异物检测机联合在一起,以及将各台X光异物检测机输出的待检测物的标识码和对应的检测结果自动上传到公共区块链中,后续可以基于标识码从公共区块链中获取与标识码匹配的检测结果。由于区块链无数据中心,数据加密算法复杂,篡改成本极大,因而,将待检测物的检测结果存储在公共区块链中可以保障检测结果的真实性,解决相关技术中检测结果易丢失、易篡改、易造假的技术问题,极大地提高了检测结果的安全性。(The invention provides an X-ray foreign matter detection system, an X-ray foreign matter detection method and computer equipment based on a block chain, wherein the system can combine X-ray foreign matter detection machines distributed at different geographic positions, automatically upload identification codes of objects to be detected and corresponding detection results output by all the X-ray foreign matter detection machines to a public block chain, and subsequently acquire the detection results matched with the identification codes from the public block chain based on the identification codes. Because the block chain has no data center, the data encryption algorithm is complex, and the tampering cost is very high, the authenticity of the detection result can be ensured by storing the detection result of the object to be detected in the public block chain, the technical problems that the detection result is easy to lose, tamper and counterfeit in the related technology are solved, and the safety of the detection result is greatly improved.)

1. An X-ray foreign object detection system based on a block chain, comprising: the system comprises at least one X-ray foreign matter detector arranged at different geographic positions, an RFID reader-writer arranged on the X-ray foreign matter detector, an RFID tag arranged on an object to be detected, at least one private server and a public block chain;

the RFID reader-writer is in communication connection with the corresponding X-ray foreign matter detector, each private server is correspondingly connected with at least one X-ray foreign matter detector in the same geographical position, and the private servers are in communication connection with the public block chain;

the RFID reader-writer is used for reading the tag code in the RFID tag and sending the tag code to the corresponding X-ray foreign matter detector;

the X-ray foreign matter detector is used for detecting the object to be detected, generating detection related information, extracting a detection result from the detection related information, and sending the tag code and the detection result to the corresponding private server;

the private server is used for sending the tag code and the detection result to the public block chain;

and the public block chain is used for generating a current block according to the tag code, the detection result and the hash value of the last block and adding the current block into the public block chain.

2. The system as claimed in claim 1, wherein the public block chain is further configured to authenticate the private server, and receive the tag code and the detection result sent by the private server when authentication is successful.

3. The system of claim 1, wherein the current tile comprises a tile head and a tile body;

the block head comprises node number information of a current block, a hash value of a previous block, a hash value of the current block generated according to the hash value of the previous block and a Mercker tree, and ore mining random calculation number, difficulty and timestamp;

the block body comprises a label code and a detection result of the object to be detected.

4. The block chain based X-ray foreign object detection system of claim 1, further comprising: a client;

the client is used for sending a query request to the public block chain, wherein the query request comprises a tag code of an object to be queried;

the common block chain is also used for determining a target block matched with the tag code of the object to be inquired from each block according to the tag code of the object to be inquired and extracting a detection result matched with the tag code of the object to be inquired from the target block;

the client is further used for receiving a detection result which is returned by the public blockchain and matched with the tag code of the object to be inquired.

5. The block chain based X-ray foreign object detection system according to claim 1 or 4, further comprising: a cloud server;

the X-ray foreign matter detector is also used for extracting detection detailed information which does not comprise the detection result from the detection related information of the object to be detected and sending the tag code and the detection detailed information of the object to be detected to the cloud server;

and the cloud server is further used for correspondingly storing the tag code and the detection detailed information of the object to be detected into a source database.

6. The system according to claim 4, wherein the X-ray foreign object detection machine is further configured to send the running log to a cloud server.

7. The block chain-based X-ray foreign object detection system of claim 1, wherein the private server and the public block chain are communicatively connected via gigabit ethernet.

8. The system according to claim 4, wherein the X-ray foreign object detector and the cloud server are communicatively connected via a public communication network.

9. An X-ray foreign object detection method based on a block chain, which is applied to the X-ray foreign object detection system based on the block chain as claimed in any one of claims 1 to 8, and is characterized by comprising the following steps:

the RFID reader reads the label code in the RFID label and sends the label code to the corresponding X-ray foreign matter detector;

the X-ray foreign matter detector detects the object to be detected, generates detection related information, extracts a detection result from the detection related information, and sends the tag code and the detection result to the corresponding private server;

the private server sends the tag code and the detection result to the public block chain;

the common blockchain generates a current block according to the tag code, the detection result and the hash value of the last block, and adds the current block to the common blockchain.

10. A computer device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed implements the block chain based X-ray foreign object detection method as defined in claim 9.

11. A computer device according to claim 10, wherein the memory is a computer readable storage medium, on which a computer program is stored, which when executed by the processor implements the block chain based X-ray foreign object detection method according to claim 9.

Technical Field

The invention relates to the technical field of X-ray foreign matter detection, in particular to an X-ray foreign matter detection system and method based on a block chain and computer equipment.

Background

The X-ray foreign body detector is also called as an X-ray foreign body detector, which detects metal foreign bodies mixed in products, non-metal foreign bodies with higher density and the like by generating X-rays through equipment and applying the penetrating capability of the X-rays; in addition, the X-ray foreign matter detector can also perform product missing detection, damaged package detection, weight detection, and the like.

At present, each X-ray foreign matter detector is an independent working unit, data detected by the X-ray foreign matter detector are generally stored in the X-ray foreign matter detector, the data stored in the X-ray foreign matter detector need to be copied, backed up and stored manually at regular intervals, and the defects of low efficiency and low automation degree exist; also, the data can be manually accessed when the data is stored in the X-ray foreign matter detector and in the subsequent copying and backup processes. Therefore, the detection data has the risk of being easily lost and counterfeited.

Disclosure of Invention

The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.

The invention aims to provide an X-ray foreign matter detection system based on a block chain.

The second purpose of the invention is to provide an X-ray foreign matter detection method based on a block chain.

A third object of the invention is to propose a computer device.

In order to achieve the above object, a first embodiment of the present invention provides an X-ray foreign object detection system based on a block chain, including: the system comprises at least one X-ray foreign matter detector arranged at different geographic positions, an RFID reader-writer arranged on the X-ray foreign matter detector, an RFID tag arranged on an object to be detected, at least one private server and a public block chain;

the RFID reader-writer is in communication connection with the corresponding X-ray foreign matter detector, each private server is correspondingly connected with at least one X-ray foreign matter detector in the same geographical position, and the private servers are in communication connection with the public block chain;

the RFID reader-writer is used for reading the tag code in the RFID tag and sending the tag code to the corresponding X-ray foreign matter detector;

the X-ray foreign matter detector is used for detecting the object to be detected, generating detection related information, extracting a detection result from the detection related information, and sending the tag code and the detection result to the corresponding private server;

the private server is used for sending the tag code and the detection result to the public block chain;

and the public block chain is used for generating a current block according to the tag code, the detection result and the hash value of the last block and adding the current block into the public block chain.

Further, the public block chain is further configured to authenticate the private server, and receive the tag code and the detection result sent by the private server when the authentication is successful.

Further, the current block comprises a block head and a block body;

the block head comprises node number information of a current block, a hash value of a previous block, a hash value of the current block generated according to the hash value of the previous block and a Mercker tree, and ore mining random calculation number, difficulty and timestamp;

the block body comprises a label code and a detection result of the object to be detected.

Further, the system further comprises: a client;

the client is used for sending a query request to the public block chain, wherein the query request comprises a tag code of an object to be queried;

the common block chain is also used for determining a target block matched with the tag code of the object to be inquired from each block according to the tag code of the object to be inquired and extracting a detection result matched with the tag code of the object to be inquired from the target block;

the client is further used for receiving a detection result which is returned by the public blockchain and matched with the tag code of the object to be inquired.

Further, the system further comprises: a cloud server;

the X-ray foreign matter detector is also used for extracting detection detailed information which does not comprise the detection result from the detection related information of the object to be detected and sending the tag code and the detection detailed information of the object to be detected to the cloud server;

and the cloud server is further used for correspondingly storing the tag code and the detection detailed information of the object to be detected into a source database.

Further, the client is also used for sending a source tracing request to the cloud server, wherein the source tracing request comprises a tag code of a to-be-traced source;

the cloud server is also used for inquiring the tracing database to obtain tracing information matched with the tag code of the object to be traced;

the client is further used for receiving the tracing information which is returned by the cloud server and matched with the tag code of the object to be traced.

Further, the X-ray foreign matter detector is also used for sending the running log to a cloud server;

further, the private server is communicatively coupled to the public block chain via a gigabit ethernet.

Further, the X-ray foreign matter detector is in communication connection with the cloud server through a public communication network.

The X-ray foreign matter detection system based on the block chain comprises at least one X-ray foreign matter detection machine arranged at different geographic positions, an RFID reader-writer arranged on the X-ray foreign matter detection machine, an RFID label arranged on an object to be detected, at least one private server and a public block chain, wherein the RFID reader-writer is used for reading and writing the X-ray foreign matter detection machine; the RFID reader-writer is in communication connection with the corresponding X-ray foreign matter detector, each private server is correspondingly connected with at least one X-ray foreign matter detector in the same geographical position, and the private servers are in communication connection with the public block chain; the RFID reader-writer is used for reading the tag code in the RFID tag and sending the tag code to the corresponding X-ray foreign matter detector; the X-ray foreign matter detector is used for detecting the object to be detected, generating detection related information, extracting a detection result from the detection related information, and sending the tag code and the detection result to the corresponding private server; the private server is used for sending the tag code and the detection result to the public block chain; and the public block chain is used for generating a current block according to the tag code, the detection result and the hash value of the last block and adding the current block into the public block chain. The X-ray foreign matter detection machines distributed at different geographic positions are combined together, the identification codes of the objects to be detected and the corresponding detection results output by the X-ray foreign matter detection machines are automatically uploaded to the public block chain, and the detection results matched with the identification codes can be acquired from the public block chain based on the identification codes subsequently. Because the block chain has no data center, the data encryption algorithm is complex, and the tampering cost is very high, the authenticity of the detection result can be ensured by storing the detection result of the object to be detected in the public block chain, the technical problems that the detection result is easy to lose, tamper and counterfeit in the related technology are solved, and the safety of the detection result is greatly improved.

In order to achieve the above object, a second embodiment of the present invention provides a block chain-based X-ray foreign object detection method. The method is applied to the X-ray foreign matter detection system based on the block chain, and comprises the following steps:

the RFID reader reads the label code in the RFID label and sends the label code to the corresponding X-ray foreign matter detector;

the X-ray foreign matter detector detects the object to be detected, generates detection related information, extracts a detection result from the detection related information, and sends the tag code and the detection result to the corresponding private server;

the private server sends the tag code and the detection result to the public block chain;

the common blockchain generates a current block according to the tag code, the detection result and the hash value of the last block, and adds the current block to the common blockchain.

The block chain-based X-ray foreign matter detection method provided by the embodiment of the invention realizes that X-ray foreign matter detection machines distributed at different geographic positions are combined together, the identification codes of objects to be detected and corresponding detection results output by each X-ray foreign matter detection machine are automatically uploaded to a common block chain, and the detection results matched with the identification codes can be acquired from the common block chain based on the identification codes. Because the block chain has no data center, the data encryption algorithm is complex, and the tampering cost is very high, the authenticity of the detection result can be ensured by storing the detection result of the object to be detected in the public block chain, the technical problems that the detection result is easy to lose, tamper and counterfeit in the related technology are solved, and the safety of the detection result is greatly improved.

To achieve the above object, a third embodiment of the present invention provides a computer device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the block chain based X-ray foreign object detection method as described above when executing the program.

Further, the memory is a computer readable storage medium, on which a computer program is stored, which when executed by the processor implements the block chain based X-ray foreign object detection method as described above.

Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.

Drawings

The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:

fig. 1 is a schematic structural diagram of an X-ray foreign object detection system based on a block chain according to an embodiment of the present invention;

fig. 2 is a schematic structural diagram of another X-ray foreign object detection system based on a block chain according to an embodiment of the present invention;

fig. 3 is a flowchart of an X-ray foreign object detection method based on a block chain according to an embodiment of the present invention;

fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.

Description of reference numerals:

1: an X-ray foreign matter detector; 2: a private server; 3: a common block chain; 4: a client; 5: a cloud server; 1001: a memory; 1002: a processor; 1003: a communication interface.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.

The following describes an X-ray foreign object detection system, method and computer device based on a block chain according to an embodiment of the present invention with reference to the drawings.

Fig. 1 is a schematic structural diagram of an X-ray foreign object detection system based on a block chain according to an embodiment of the present invention. As shown in fig. 1, the X-ray foreign object detection system based on the block chain includes: the system comprises at least one X-ray foreign matter detector 1 arranged at different geographical positions, an RFID reader-writer (not shown in the figure) arranged on the X-ray foreign matter detector 1, an RFID tag (not shown in the figure) arranged on an object to be detected, at least one private server 2 and a public block chain 3; the RFID reader-writer is in communication connection with the corresponding X-ray foreign matter detector 1, each private server 2 is correspondingly connected with at least one X-ray foreign matter detector 1 in the same geographical position, and the private server 2 is in communication connection with the public block chain 3;

it should be noted that fig. 1 only illustrates the first geographical location and the second geographical location, but the system is not limited to include at least one X-ray foreign object detector 1 at the first geographical location and at least one X-ray foreign object detector 1 at the second geographical location, and it is understood that the system may include at least one X-ray foreign object detector 1 at one geographical location, at least one X-ray foreign object detector 1 at two geographical locations, at least one X-ray foreign object detector 1 at three geographical locations, and the like, and the number of geographical locations is set according to actual situations.

In this embodiment, a plurality of X-ray foreign matter detectors 1 are distributed at different geographic locations, for example, a plurality of X-ray foreign matter detectors 1 are configured in ten food processing plants at different geographic locations; an RFID (Radio Frequency Identification) reader is installed at a feed port of each X-ray foreign matter detector 1.

In practical application, the RFID tag is attached to an object to be detected, the RFID reader scans the RFID tag on the object to be detected, reads a tag code in the RFID tag, and then sends the read result to the corresponding X-ray foreign matter detector 1.

The plurality of private servers 2 are distributed at different geographical positions, and at least one private server 2 should be deployed by each manufacturer or detection mechanism with the X-ray foreign matter detector 1 deployed. For example, a factory a deploys five X-ray foreign object detectors 1 in a factory area, and at least one private server 2. For example, the factory B deploys ten X-ray foreign object detectors 1 in the factory area, and deploys two private servers 2 at the same time, wherein five X-ray foreign object detectors 1 are connected to the first private server 2, and the other five X-ray foreign object detectors are connected to the second private server 2.

Since operations such as synchronization and update of block link point data have high requirements on the video card and the network, the private server 2 configured with the CPU and the video card with good performance can solve the problem of local mining capability. The private server 2 is communicatively connected to the public block chain 3 via a gigabit ethernet.

And the RFID reader-writer is used for reading the label code in the RFID label and sending the label code to the corresponding X-ray foreign matter detector 1.

In practical application, the RFID tag is attached to an object to be detected, the RFID reader scans the RFID tag on the object to be detected, reads a tag code in the RFID tag, and then sends the read result to the corresponding X-ray foreign matter detector 1.

The X-ray foreign matter detector 1 is configured to detect the object to be detected, generate detection-related information, extract a detection result from the detection-related information, and send the tag code and the detection result to the corresponding private server 2.

In this embodiment, when an object to be detected passes through the X-ray foreign matter detector 1, the RFID reader/writer reads the tag code in the RFID tag 11 attached to the object to be detected, and uploads the read result, i.e., the tag code, to the corresponding X-ray foreign matter detector 1.

Meanwhile, the X-ray foreign matter detector 1 detects an object to be detected and generates detection-related information including both a detection result and detection detailed information not including the detection result. As an example, when there is a foreign substance in the object to be detected, the detection result is represented by 1, and when there is no foreign substance in the object to be detected, the detection result is represented by 0. The detailed detection information may include, but is not limited to, a gray scale image obtained by photographing the object to be detected by the X-ray foreign matter detector 1, yield, defective rate, and the like. Taking the X-ray foreign matter detector 1 as an example for detecting food, the X-ray foreign matter detector can not only detect foreign matters in food (such as various meat products, aquatic products, fruits and vegetables, additives, milk powder, chocolate and the like), including metal, glass, ceramics, stones, bones, plastics and the like; and product defects such as package cracks, bubbles, content defects and the like can be identified, and complete finished product detection is realized.

In this embodiment, after extracting the detection result from the detection related information of the object to be detected, the X-ray foreign matter detector 1 sends the tag code and the detection result of the object to be detected to the corresponding private server 2.

The private server 2 is configured to send the tag code and the detection result to the public block chain 3.

The common block chain 3 is configured to generate a current block according to the tag code, the detection result, and the hash value of the previous block, and add the current block to the common block chain 3.

In this embodiment, a public block chain 3 specially used for storing relevant detection data of an object to be detected is constructed. Specifically, the identification code of the object to be detected and the corresponding detection result are both stored in the common block chain 3, and the detection result matched with the identification code can be subsequently acquired from the common block chain 3 based on the identification code. Because the block chain has no data center, the data encryption algorithm is complex, and the tampering cost is very high, the authenticity of the detection result can be ensured by storing the detection result of the object to be detected in the public block chain 3, and the technical problems that the detection result is easy to lose, tamper and counterfeit in the related technology are solved.

Since the block chain is generally not suitable for storing data with a large data amount, if the whole detection related information of the object to be detected is stored in the public block chain 3, the operation efficiency of the public block chain 3 is low, and in order to avoid the problem of low operation efficiency of the public block chain 3, the detection result extracted from the detection related information is stored in the public block chain 3, the data amount of the detection result is much smaller than that of the whole detection related information, the actual use requirement of the block chain is met, and the operation efficiency of the public block chain 3 is ensured.

As known from the related introduction of the prior art to the blockchain, a new chunk is generated according to the transaction data and the hash value of the previous chunk. And designing a block structure according to the actual scene. In this embodiment, the tag code and the detection result of the object to be detected may be understood as transaction data, and the current block may be generated according to the tag code, the detection result, and the hash value of the previous block of the object to be detected, and may be understood as a new block storing the related information of the object to be detected.

Further, the current block comprises a block head and a block body; the block head comprises node number information of the current block, a hash value of the previous block, a hash value of the current block generated according to the hash value of the previous block and the Mercker tree, and ore mining random calculation number, difficulty and time stamp. The block body comprises a label code and a detection result of the object to be detected.

The node number information includes Blcok1 and Blcok 2. Different node number information represents different blocks.

The hash value of the last chunk can be understood as recording a feature value of the last detection area, and the feature value obtains a string of nonrepeatable hash strings through a hash algorithm.

The hash value of the current block may be understood as recording a feature value of the current detection area, where the feature value obtains a string of nonrepeatable hash strings through a hash algorithm. It should be noted that the hash value of the current chunk is generated according to the hash value of the previous chunk and the mercker tree, and further description on how the hash value of the current chunk is generated according to the hash value of the previous chunk and the mercker tree is described in detail in the related art.

The mining random calculation number is to prevent the node data on the blockchain from being reused, and can be understood as a string of random numbers which are randomly distributed by the public blockchain 3 by the private server 2 each time data is synchronized and can only be used as one time; the difficulty is used for calculating the time complexity and the space complexity of data synchronization; the time stamp is used for recording the generation time of the current block.

Wherein, the block body comprises the label code and the detection result of the object to be detected. Through in writing into the block with the tag code and the testing result of waiting to detect the thing, follow-up user only simply wants to know whether product such as food has detected, only need to inquire in public block chain 3 can, need not pass through cloud server 5, reduce data processing's complexity for the query efficiency of testing result.

Of course, the block body is not limited to include the tag code of the object to be detected and the detection result. For example, if the X-ray foreign matter detection machine 1 uploads the tag code and the detection result of the object to be detected to the public block chain 3 through the private server 2, at the same time, the X-ray foreign matter detection machine 1 uploads the manufacturer number for producing the object to be detected and the detection mechanism number for detecting the object to be detected to the public block chain 3 through the private server 2, so that the block body may further include the manufacturer number and the detection mechanism number corresponding to the object to be detected. The serial numbers of the manufacturers and the detection mechanisms can realize the traceability of the links of production, detection and the like of the object to be detected.

Further, in order to prevent the unauthorized private server 2 from uploading data to the public block chain 3 privately, the public block chain 3 authenticates the private server 2 before the public block chain 3 receives the data sent by the private server 2, and only when the authentication is successful, the private server 2 is allowed to upload the tag code and the detection result of the object to be detected to the public block chain 3. For example, the private server 2 first requests a token from the public block chain 3, and the public block chain 3 issues the token to the private server 2 satisfying the token issuing condition; before the private server 2 uploads the tag code and the detection result of the object to be detected to the public block chain 3, the public block chain 3 judges whether the private server 2 has a corresponding token, if so, the private server 2 is allowed to upload the tag code and the detection result of the object to be detected to the public block chain 3, and if not, the private server 2 is forbidden to upload the tag code and the detection result of the object to be detected to the public block.

The X-ray foreign matter detection system based on the block chain comprises at least one X-ray foreign matter detector 1 arranged at different geographic positions, an RFID reader-writer arranged on the X-ray foreign matter detector 1, an RFID tag arranged on an object to be detected, at least one private server 2 and a public block chain 3; the RFID reader-writer is in communication connection with the corresponding X-ray foreign matter detector 1, each private server 2 is correspondingly connected with at least one X-ray foreign matter detector 1 in the same geographical position, and the private server 2 is in communication connection with the public block chain 3; the RFID reader-writer is used for reading the tag code in the RFID tag and sending the tag code to the corresponding X-ray foreign matter detector 1; the X-ray foreign matter detector 1 is used for detecting the object to be detected, generating detection related information, extracting a detection result from the detection related information, and sending the tag code and the detection result to the corresponding private server 2; the private server 2 is configured to send the tag code and the detection result to the public block chain 3; the common block chain 3 is configured to generate a current block according to the tag code, the detection result, and the hash value of the previous block, and add the current block to the common block chain 3. The X-ray foreign matter detection machines 1 distributed at different geographic positions are combined together, the identification codes of the objects to be detected and the corresponding detection results output by the X-ray foreign matter detection machines 1 are automatically uploaded to the public block chain 3, and the detection results matched with the identification codes can be acquired from the public block chain 3 based on the identification codes. Because the block chain has no data center, the data encryption algorithm is complex, and the tampering cost is very high, the authenticity of the detection result can be ensured by storing the detection result of the object to be detected in the public block chain 3, the technical problems that the detection result is easy to lose, tamper and counterfeit in the related technology are solved, and the safety of the detection result is greatly improved.

Fig. 2 is a schematic structural diagram of another X-ray foreign object detection system based on a block chain according to an embodiment of the present invention. As shown in fig. 2, on the basis of the X-ray foreign object detection system shown in fig. 1, the X-ray foreign object detection system based on the block chain further includes a client 4;

the client 4 is configured to send a query request to the public block chain 3, where the query request includes a tag code of an object to be queried;

the common block chain 3 is further configured to determine a target block matched with the tag code of the object to be queried from each block according to the tag code of the object to be queried, and extract a detection result matched with the tag code of the object to be queried from the target block;

the client 4 is further configured to receive a detection result returned by the public block chain 3 and matched with the tag code of the object to be queried.

In this embodiment, the client 4 may be a front-end program developed based on an Android system, an IOS (apple) system, a wechat applet, and the like and available for a user to view and control.

For example, the client 4 is installed in a mobile terminal such as a mobile phone of a user, the user can input a tag code of an object to be queried or scan the tag of the object to be queried through a camera of the mobile terminal to obtain the tag code, and the client 4 receives the tag code of the object to be queried and sends a query request to a public service chain; the common service chain extracts the detection result from the target block matched with the tag code of the object to be inquired from the plurality of blocks and returns the detection result to the client 4 for the user to view. If the target block also stores the manufacturer number or the detection mechanism number of the object to be inquired, the manufacturer number or the detection mechanism number can be returned to the client 4 for the user to check.

In this embodiment, through the interaction of client 4 and public block chain 3, the user can know whether products such as food are detected, and only need to inquire in public block chain 3, and need not pass through cloud server 5, reduce data processing's complexity, accelerated the query efficiency of testing result, realize that the user can long-rangely look over the testing result that records in the block chain.

Further, the X-ray foreign matter detection system based on the block chain further includes a cloud server 5;

the X-ray foreign matter detector 1 is further configured to extract detailed detection information that does not include the detection result from the detection-related information of the object to be detected, and send the tag code and the detailed detection information of the object to be detected to the cloud server 5;

the cloud server 5 is further configured to correspondingly store the tag code and the detection detailed information of the object to be detected into the source database.

In this embodiment, the cloud server 5 may be based on cloud computing technologies such as ari cloud and Tencent cloud, and combines a database such as MySQ L, a file storage (OpenSwift), load balancing (Ngix + Redis), task scheduling (ActiveMQ) and a micro-service system developed based on a SpringBoot architecture, the cloud server 5 opens an HTTP interface for front-end calling, and establishes a WebSocket link with the X-ray foreign object detector 1, so as to achieve remote control of the device, and at the same time, the X-ray foreign object detector 1 uploads a running log and detection related information of the X-ray foreign object detector 1 to the cloud server 5 through a 4G signal, a 5G signal or a public communication network, so as to achieve monitoring of the device, management of detection related data, and the like.

In the present embodiment, the detailed detection information may be understood as a part of the detection-related information that does not include the detection result, for example, information such as a grayscale image, a yield, and a defective rate obtained by capturing an image of the object to be detected by the X-ray foreign object detector 1, but is not limited thereto. The data amount of the detection detail information is much larger than the data amount of the detection result, and is not suitable for storage in the common block chain 3. In order to facilitate subsequent understanding of more information of the product or exert the value of the detection related information, the detection detailed information is stored in the cloud server 5 with large data processing capacity. Specifically, the X-ray foreign matter detector 1 uploads the tag code and the detection detailed information of the object to be detected to the cloud server 5, and the cloud server 5 correspondingly stores the tag code and the detection detailed information of the object to be detected to the source database. The subsequent client 4 may request the cloud server 5 to return the detection details of the object to be detected. Describing by combining a specific scene, when a user only wants to know the detection result of a next product, the user can request the public block chain 3 to quickly return the detection result of the product through the client 4; when the user knows the detailed information of the product in the detection process, for example, wants to check the gray image obtained by shooting the object to be detected by the X-ray foreign object detector 1, the client 4 may request the cloud server 5 to return the gray image corresponding to the product.

Of course, the cloud server 5 can also effectively mix, arrange and count the mass detection detailed information generated by each separate X-ray foreign matter detector 1, so as to truly fulfill the purpose of the mass detection detailed information. The cloud server 5 can also store the relevant information of the object to be detected in each link of production, processing, detection and the like to the tracing database, so that the tracing management of the object to be detected is facilitated.

Further, the client 4 is further configured to send a tracing request to the cloud server 5, where the tracing request includes a tag code of a to-be-traced object;

the cloud server 5 is further configured to query the tracing database to obtain tracing information matched with the tag code of the object to be traced;

the client 4 is further configured to receive the traceability information returned by the cloud server 5 and matched with the tag code of the object to be traceable.

In the embodiment, interaction between the client 4 and the cloud server 5 is supported, and a user can remotely check the traceability information. The tracing database stores the related information (namely tracing information) of the object to be traced in each link of production, processing, detection and the like. A user requests the tracing information of the object to be traced to the cloud server 5 through the client 4, and the related information of the object to be traced in each link of production, processing, detection and the like is inquired.

Further, the client 4 is further configured to send a control request for remotely controlling the X-ray foreign object detection machine 1 to the cloud server 5;

the cloud server 5 is further configured to send a control instruction to the X-ray foreign matter detector 1 whose current device state meets a preset condition according to the control request;

and the X-ray foreign matter detector 1 with the current equipment state meeting the preset condition executes the operation corresponding to the control instruction.

In this embodiment, the interaction between the client 4 and the cloud server 5 is supported, and the user can remotely control each X-ray foreign matter detector 1.

Specifically, in order to update the device state in time and control the device information in real time, the cloud server 5 and each X-ray foreign object detector 1 adopt WebSocket real-time communication based on OpenSS L, so that real-time security is achieved.

For example, a control request is sent to the cloud server 5 through the client 4 installed in the mobile phone, and the cloud server 5 controls the X-ray foreign object detection machines 1 meeting the preset conditions to execute operations corresponding to the control instructions according to the current device states of the X-ray foreign object detection machines 1. The preset conditions are set according to actual situations, for example, the priority of each X-ray foreign object detector 1 is set in advance, and the X-ray foreign object detector 1 with the higher priority is controlled to execute the operation corresponding to the control instruction.

Further, the X-ray foreign matter detector 1 is further configured to send an operation log to the cloud server 5;

the cloud server 5 is further configured to store the operation log.

In this embodiment, the cloud server 5 stores the operation log of each X-ray foreign object detector 1, which is convenient for the subsequent operation and maintenance personnel to maintain the normal operation of the system.

Further, the private server 2 and the public block chain 3 are connected by gigabit ethernet communication.

Further, the X-ray foreign object detector 1 is connected to the cloud server 5 through a public communication network.

The block chain-based X-ray foreign matter detection system provided by the embodiment of the invention realizes that the X-ray foreign matter detection machines 1 distributed at different geographic positions are combined together, the identification codes of the objects to be detected and the corresponding detection results output by each X-ray foreign matter detection machine 1 are automatically uploaded to the public block chain 3, and the detection results matched with the identification codes can be acquired from the public block chain 3 based on the identification codes. Because the block chain has no data center, the data encryption algorithm is complex, and the tampering cost is very high, the authenticity of the detection result can be ensured by storing the detection result of the object to be detected in the public block chain 3, the technical problems that the detection result is easy to lose, tamper and counterfeit in the related technology are solved, and the safety of the detection result is greatly improved. Meanwhile, through the interaction of the client 4 and the public block chain 3, the user can know whether products such as food are detected or not, only the public block chain 3 needs to be queried, and the cloud server 5 is not needed, so that the complexity of data processing is reduced, the query efficiency of detection results is improved, and the user can remotely check the detection results recorded in the block chain. In addition, more detection related information can be easily checked remotely through mobile terminals such as mobile phones, the work of each X-ray foreign matter detector 1 can be controlled remotely, the working state of the equipment can be known on line conveniently, and the equipment information can be mastered in real time.

Fig. 3 is a flowchart of an X-ray foreign object detection method based on a block chain according to an embodiment of the present invention. The method is applied to an X-ray foreign matter detection system based on a block chain, and comprises the following steps:

s101, the RFID reader reads a tag code in the RFID tag and sends the tag code to the corresponding X-ray foreign matter detector 1;

s102, the X-ray foreign matter detector 1 detects the object to be detected, generates detection related information, extracts a detection result from the detection related information, and sends the tag code and the detection result to the corresponding private server 2;

s103, the private server 2 sends the tag code and the detection result to the public block chain 3;

s104, the public block chain 3 generates a current block according to the tag code, the detection result and the hash value of the last block, and adds the current block into the public block chain 3.

It should be noted that the foregoing explanation of the embodiment of the block chain-based X-ray foreign object detection system is also applicable to the block chain-based X-ray foreign object detection method of the embodiment, and is not repeated herein.

The block chain-based X-ray foreign matter detection method provided by the embodiment of the invention realizes that the X-ray foreign matter detection machines 1 distributed at different geographic positions are combined together, the identification codes of the objects to be detected and the corresponding detection results output by each X-ray foreign matter detection machine 1 are automatically uploaded to the public block chain 3, and the detection results matched with the identification codes can be acquired from the public block chain 3 based on the identification codes. Because the block chain has no data center, the data encryption algorithm is complex, and the tampering cost is very high, the authenticity of the detection result can be ensured by storing the detection result of the object to be detected in the public block chain 3, the technical problems that the detection result is easy to lose, tamper and counterfeit in the related technology are solved, and the safety of the detection result is greatly improved. Meanwhile, through the interaction of the client 4 and the public block chain 3, the user can know whether products such as food are detected or not, only the public block chain 3 needs to be queried, and the cloud server 5 is not needed, so that the complexity of data processing is reduced, the query efficiency of detection results is improved, and the user can remotely check the detection results recorded in the block chain. In addition, more detection related information can be easily checked remotely through mobile terminals such as mobile phones, the work of each X-ray foreign matter detector 1 can be controlled remotely, the working state of the equipment can be known on line conveniently, and the equipment information can be mastered in real time.

Fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention. The computer device includes:

memory 1001, processor 1002, and computer programs stored on memory 1001 and executable on processor 1002.

The processor 1002, when executing the program, implements the block chain-based X-ray foreign object detection method provided in the above-described embodiment.

Further, the computer device further comprises:

a communication interface 1003 for communicating between the memory 1001 and the processor 1002.

A memory 1001 for storing computer programs that may be run on the processor 1002.

Further, in the embodiment of the present invention, the memory 1001 is a computer-readable storage medium, which may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory, on which a computer program is stored, and when the computer program is executed by a processor, the X-ray foreign object detection method based on a block chain is implemented.

The processor 1002 is configured to implement the method for detecting X-ray foreign objects based on the block chain according to the foregoing embodiments when executing the program.

If the memory 1001, the processor 1002, and the communication interface 1003 are implemented independently, the communication interface 1003, the memory 1001, and the processor 1002 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.

Optionally, in a specific implementation, if the memory 1001, the processor 1002, and the communication interface 1003 are integrated on one chip, the memory 1001, the processor 1002, and the communication interface 1003 may complete communication with each other through an internal interface.

The processor 1002 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention.

In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.

Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.

Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.

The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable 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 compact disc read-only memory (CDROM). Additionally, the computer-readable medium could 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 invention 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. 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 related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is 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 invention 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 integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.

The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:X射线成像系统的使用和校准

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类