CN111614619A - Block chain code scanning input method, code scanning gun and computer readable storage medium - Google Patents

Block chain code scanning input method, code scanning gun and computer readable storage medium Download PDF

Info

Publication number
CN111614619A
CN111614619A CN202010305254.XA CN202010305254A CN111614619A CN 111614619 A CN111614619 A CN 111614619A CN 202010305254 A CN202010305254 A CN 202010305254A CN 111614619 A CN111614619 A CN 111614619A
Authority
CN
China
Prior art keywords
block chain
data
code scanning
block
code
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.)
Pending
Application number
CN202010305254.XA
Other languages
Chinese (zh)
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.)
Shenzhen Core Chain Technology Co ltd
Original Assignee
Shenzhen Core Chain Technology 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 Shenzhen Core Chain Technology Co ltd filed Critical Shenzhen Core Chain Technology Co ltd
Priority to CN202010305254.XA priority Critical patent/CN111614619A/en
Publication of CN111614619A publication Critical patent/CN111614619A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Electromagnetism (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a block chain code scanning input method, a code scanning gun and a computer readable storage medium, wherein the method comprises the following steps: scanning data in the identification information code, generating a block according to the data, and sending the block to a block chain system. According to the code scanning gun, after the information after code scanning identification is packaged into the blocks, the blocks containing the code scanning information are directly sent to the block chain system without other intermediate equipment, so that the possibility that the information is monitored, counterfeited and tampered in the links of identifying, reading and inputting the information into the storage system is avoided, and the safety of the information is improved.

Description

Block chain code scanning input method, code scanning gun and computer readable storage medium
Technical Field
The invention relates to the field of computers, in particular to a block chain code scanning and inputting method, a code scanning gun and a computer readable storage medium.
Background
The existing bar code scanning gun technology utilizes an optical principle to decode the contents of bar codes/two-dimensional codes and then transmit the contents to equipment such as a computer and the like in a data line or wireless mode. A typical flatbed bar code scanner gun generally includes: the device comprises a light source, an optical lens, a scanning module and an analog-digital conversion circuit, wherein a photoelectric element is used for converting detected optical signals into electric signals, and then the electric signals are converted into digital signals through an analog-digital converter and transmitted to a computer for processing.
When a bar code/two-dimensional code is scanned, after a light source irradiates an image, reflected light is converged to a scanning module through a lens, the scanning module converts an optical signal into an analog digital signal, simultaneously, the gray scale of each image is calculated, and an analog-digital conversion circuit converts an analog voltage into a digital signal and sends the digital signal to information storage equipment such as a computer.
However, in the existing scanning gun information entry method, data can be tampered in the entry process, and the information security is low.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a block chain code scanning and inputting method and a code scanning gun, which are not easy to be tampered in the information inputting process and can effectively improve the safety of information in the inputting process.
The invention further provides a code scanning gun.
The invention also provides a computer readable storage medium.
In a first aspect, an embodiment of the present invention provides a block chain code scanning and entering method, applied to a code scanning gun, including:
the data in the identification information code is scanned,
generating a block according to the data;
the block is sent to a block chain system.
Further, the generating a block according to the data includes:
verifying the validity of the data;
if the data is legal, constructing a block chain account page form of the data;
and encrypting the block chain account page table.
Further, still include: and an intelligent contract injection step, namely packaging the intelligent contracts into the blocks.
Further, the encrypting the block chain ledger page table list comprises:
receiving input authentication information;
matching a corresponding user private key according to the identity authentication information, wherein the user private key is generated by a hardware random number generator;
and using the private key and combining a public key to perform signature processing on the block chain ledger page table.
In a second aspect, an embodiment of the present invention provides a yard scanning gun, comprising:
an image processing unit for scanning data in the identification information code;
the block chain function unit is used for generating a block according to the data;
a dedicated network access unit for sending the block to a blockchain system.
Further, the block chain function unit includes:
the data verification module is used for verifying the legality of the data;
the form account page construction module is used for constructing a block chain account page form of the data;
and the key module is used for encrypting the block chain account page table.
Further, the blockchain function unit further includes:
and the intelligent contract unit is used for packaging the intelligent contracts into the blocks.
Further, the key module includes:
an authentication section: for receiving input authentication information;
the private key generating section: the system is used for matching a corresponding user private key according to the identity authentication information;
signature part: the signature processing module is used for performing signature processing on the block chain account page table by using the private key.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the block chain scan code entry method.
According to the block chain scanning and inputting method and the code scanning gun provided by some embodiments of the invention, the code scanning gun directly sends the block containing the code scanning information to the block chain system after packaging the information identified by the code scanning into the block, without other intermediate equipment, so that the possibility of monitoring, imitation and tampering in the process of identifying, reading and inputting the information into the storage system is avoided, and the safety of the information is improved.
Drawings
Fig. 1 is a schematic flow chart illustrating a block chain code scanning entry method according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating the steps of FIG. 1 according to one embodiment of the data generation block;
FIG. 3 is a flowchart of one embodiment of the encryption process performed on the block chain ledger page table by the steps of FIG. 2;
FIG. 4 is a block diagram of a code scanning gun according to an embodiment of the present invention.
Detailed Description
The concept and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments to fully understand the objects, features and effects of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments, and those skilled in the art can obtain other embodiments without inventive effort based on the embodiments of the present invention, and all embodiments are within the protection scope of the present invention.
In the description of the present invention, if an orientation description is referred to, for example, the orientations or positional relationships indicated by "upper", "lower", "front", "rear", "left", "right", etc. are based on the orientations or positional relationships shown in the drawings, only for convenience of describing the present invention and simplifying the description, but not for indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention. If a feature is referred to as being "disposed," "secured," "connected," or "mounted" to another feature, it can be directly disposed, secured, or connected to the other feature or indirectly disposed, secured, connected, or mounted to the other feature.
In the description of the embodiments of the present invention, if "a number" is referred to, it means one or more, if "a plurality" is referred to, it means two or more, if "greater than", "less than" or "more than" is referred to, it is understood that the number is not included, and if "greater than", "lower" or "inner" is referred to, it is understood that the number is included. If reference is made to "first" or "second", this should be understood to distinguish between features and not to indicate or imply relative importance or to implicitly indicate the number of indicated features or to implicitly indicate the precedence of the indicated features.
Referring to fig. 1, a flow chart of a block chain code scanning method in an embodiment of the present invention is shown, and the block chain code scanning method is applied to a code scanning gun, and specifically includes the steps of:
s100, scanning the data in the identification information code,
and reading data in the information code through the steps of photoelectric conversion, decoding and the like, wherein the information code comprises a bar code or a two-dimensional code.
S102, generating a block according to the data;
s104, the block is sent to a block chain system.
This embodiment, sweeping a yard rifle and sweeping a yard discernment back, directly sending information packing to block chain system into block, rather than the tradition sweep a yard rifle through the block chain gateway on the access network, with data transmission to gateway, sweep the data cochain mode of a yard rifle with the tradition by the gateway again, avoided the tradition to sweep the potential safety hazard between a yard rifle to the gateway, reduced the possibility that data was imitated, monitored, falsified at the source.
As shown in fig. 2, in a specific embodiment, the generating the block according to the data includes:
s201, verifying the validity of the data;
the validity of the data can be verified through the regular expression, and the integrity, the format validity and the like of the data can be verified.
S202, if the data is legal, constructing a block chain account page form of the data;
the specific block linked list includes fields: the blockchain data such as the hash value, the device ID, and the timestamp may be in a blockchain format or in an ethernet bay, which is not limited herein.
S203, encrypting the block chain account page table.
And (4) signing the form instance by using a private key to obtain a check value (hash value), and sending the signed data form (account data packet, check value, digital signature and the like) to the block chain through the network access unit.
In another embodiment, the method further comprises: and an intelligent contract injection step, namely packaging the intelligent contracts into the blocks, and providing richer control management functions except acquisition by the code scanning gun through construction and code execution of the intelligent contracts.
As shown in fig. 3, in an embodiment, the encrypting the block chaining page table includes:
s301, receiving input authentication information;
s302, matching a corresponding user private key according to the identity authentication information, wherein the user private key is generated by a hardware random number generator;
in this embodiment, a key pair is generated according to a cryptographic algorithm, and the key pair of the block chain code scanning gun and the authentication information thereof, such as the device ID, are obtained, where the cryptographic algorithm: including but not limited to ECC (elliptic curve cryptography), hash cryptography.
And S303, using the private key and combining a public key to perform signature processing on the block chain ledger page table.
The method specifically comprises the following steps: after user verification information is received, a hardware random number generator generates a private key, the private key and the public key are combined to generate a unique ID of the code scanning gun device, and signature processing is carried out on a block chain account page table.
In this embodiment, generation and management of the node key are realized inside the code scanning gun, the trusted data is protected, and the identity ID of the code scanning gun is produced and managed according to the node identity of the block chain in which the code scanning gun is located. The secret key is managed by the code scanning gun device and bound with the identity information (identity ID), so that the risk of secret key loss caused by secret key storage outside the device is prevented.
As shown in fig. 4, the present embodiment further provides a code gun, which includes an image processing unit 110, a block chain function unit 120, and a dedicated network access unit 130.
An image processing unit 110 for scanning data in the identification information code;
specifically, the information code includes a barcode or a two-dimensional code.
A blockchain function unit 120, configured to generate a block according to the data, including but not limited to detection and error correction of the data, code checking, signature authentication, transaction data construction, data block packaging, construction block identification, and the like.
The special network access unit 130 is configured to send the block to the block chain system, support networks such as 2G/3G/4G/5G/WIFI, directly submit block chain data to the block chain network in a node form, and only provide block chain service, and do not provide additional communication service, thereby ensuring that the code scanning gun only communicates with other block chain nodes in the internet, and improving network security.
In this embodiment, the code scanning gun itself is a node of the block chain, rather than setting the node on the cloud server or the gateway, so that each code scanning gun device is a node capable of independently processing data, and after the code scanning gun completes identity identification, data is directly signed and linked on the device, thereby reducing the risk that the data is monitored and tampered in network transmission, and having higher data security.
Specifically, the block chain identification unit includes:
the data verification module is used for verifying the legality of the data;
the form account page construction module is used for constructing a block chain account page form of the data;
and the key module is used for encrypting the block chain account page table.
A dedicated network access unit for sending the block to a blockchain system.
Specifically, still include: the code scanning gun in the embodiment can realize direct acquisition and chaining of block chain data and can also complete execution of intelligent contract codes.
Specifically, the key module includes:
an authentication section: for receiving input authentication information;
the private key generating section: the system is used for matching a corresponding user private key according to the identity authentication information;
signature part: the signature processing module is used for performing signature processing on the block chain account page table by using the private key.
The existing traditional code scanning gun equipment can manage the key file only by accessing a block chain link point of a cloud server or a gateway, so that the code scanning gun does not directly manage the authority of the key, the key directly concerns the credibility of data, and the traditional method has the possibility that the key of the cloud server is stolen.
The code scanning gun in the embodiment manages the key and the ID by the device, and the key module cannot be directly accessed to the network, so that all data and control are managed by the device, and the risk of storing the key outside the device is prevented.
The embodiment further comprises a human-computer interaction interface unit 140, which is used for providing a human-computer interaction interface, wherein in the working process of the code scanning gun, a user can know the processing state of data through the human-computer interaction interface, and the human-computer interaction interface unit displays the data through a display screen on the code scanning gun and receives configuration information of the code scanning gun.
One embodiment of the invention provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the block chain scan code entry method.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention. Furthermore, the embodiments of the present invention and the features of the embodiments may be combined with each other without conflict.

Claims (9)

1. A block chain code scanning and inputting method is applied to a code scanning gun and comprises the following steps:
the data in the identification information code is scanned,
generating a block according to the data;
the block is sent to a block chain system.
2. A method according to claim 1, wherein said generating blocks from said data comprises:
verifying the validity of the data;
if the data is legal, constructing a block chain account page form of the data;
and encrypting the block chain account page table.
3. A method for block chain code scanning entry as in claim 2, further comprising: and an intelligent contract injection step, namely packaging the intelligent contracts into the blocks.
4. A method as claimed in claim 2, wherein said encrypting step comprises:
receiving input authentication information;
matching a corresponding user private key according to the identity authentication information, wherein the user private key is generated by a hardware random number generator;
and using the private key and combining a public key to perform signature processing on the block chain ledger page table.
5. The utility model provides a sweep sign indicating number rifle which characterized in that includes:
an image processing unit for scanning data in the identification information code;
the block chain function unit is used for generating a block according to the data;
a dedicated network access unit for sending the block to a blockchain system.
6. A yard scanning gun as claimed in claim 5, wherein said blockchain function unit comprises:
the data verification module is used for verifying the legality of the data;
the form account page construction module is used for constructing a block chain account page form of the data;
and the key module is used for encrypting the block chain account page table.
7. A yard scanning gun as claimed in claim 5, wherein said blockchain function unit further comprises:
and the intelligent contract unit is used for packaging the intelligent contracts into the blocks.
8. The code scanning gun of claim 6, wherein the key module comprises:
an authentication section: for receiving input authentication information;
the private key generating section: the system is used for matching a corresponding user private key according to the identity authentication information;
signature part: the signature processing module is used for performing signature processing on the block chain account page table by using the private key.
9. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the block chain scan code entry method of any of claims 1 to 4.
CN202010305254.XA 2020-04-17 2020-04-17 Block chain code scanning input method, code scanning gun and computer readable storage medium Pending CN111614619A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010305254.XA CN111614619A (en) 2020-04-17 2020-04-17 Block chain code scanning input method, code scanning gun and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010305254.XA CN111614619A (en) 2020-04-17 2020-04-17 Block chain code scanning input method, code scanning gun and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111614619A true CN111614619A (en) 2020-09-01

Family

ID=72201430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010305254.XA Pending CN111614619A (en) 2020-04-17 2020-04-17 Block chain code scanning input method, code scanning gun and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111614619A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468544A (en) * 2020-11-12 2021-03-09 上海东普信息科技有限公司 Express delivery data transmission method based on middleware and middleware
CN112711724A (en) * 2021-01-11 2021-04-27 河北博健科技有限公司 Commodity code identification method and system suitable for block chain
CN116226889A (en) * 2023-04-28 2023-06-06 北京集度科技有限公司 Method and device for writing security information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190036680A1 (en) * 2017-07-28 2019-01-31 Trusted Key Solutions Inc. System and method for blockchain-based user authentication based on a cryptographic challenge
CN110222536A (en) * 2019-05-25 2019-09-10 上海源庐加佳信息科技有限公司 A kind of warehouse receipt date storage method based on distribution book keeping operation
CN110648413A (en) * 2018-06-26 2020-01-03 触信(厦门)智能科技有限公司 Intelligent check-in method, system, equipment and storage medium of block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190036680A1 (en) * 2017-07-28 2019-01-31 Trusted Key Solutions Inc. System and method for blockchain-based user authentication based on a cryptographic challenge
CN110648413A (en) * 2018-06-26 2020-01-03 触信(厦门)智能科技有限公司 Intelligent check-in method, system, equipment and storage medium of block chain
CN110222536A (en) * 2019-05-25 2019-09-10 上海源庐加佳信息科技有限公司 A kind of warehouse receipt date storage method based on distribution book keeping operation

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468544A (en) * 2020-11-12 2021-03-09 上海东普信息科技有限公司 Express delivery data transmission method based on middleware and middleware
CN112468544B (en) * 2020-11-12 2024-02-27 上海东普信息科技有限公司 Express data transmission method based on middleware and middleware
CN112711724A (en) * 2021-01-11 2021-04-27 河北博健科技有限公司 Commodity code identification method and system suitable for block chain
CN112711724B (en) * 2021-01-11 2022-05-31 河北博健科技有限公司 Commodity code identification method and system suitable for block chain
CN116226889A (en) * 2023-04-28 2023-06-06 北京集度科技有限公司 Method and device for writing security information

Similar Documents

Publication Publication Date Title
CN112446785B (en) Cross-chain transaction method, system, device, equipment and storage medium
CN109257342B (en) Block chain cross-chain authentication method, system, server and readable storage medium
CN102271042B (en) Certificate authorization method, system, universal serial bus (USB) Key equipment and server
EP3779792B1 (en) Two-dimensional code generation method, data processing method, apparatus, and server
CN111614619A (en) Block chain code scanning input method, code scanning gun and computer readable storage medium
CN107798531B (en) Electronic payment method and system
US20120324229A1 (en) System and method for generating keyless digital multi-signatures
CN102006303B (en) Method and terminal for increasing data transmission safety by using multi-encryption method
CA2510548A1 (en) System, apparatus, program, and method for authentication
CN105099673A (en) Authorization method, authorization requesting method and devices
CN104008351A (en) System, method and device for Windows application program integrity checking
CN104620225A (en) Certifying server side web applications against security vulnerabilities
CN109729046A (en) Two-dimensional code scanning method and terminal, authentication method and server and service system
CN104735065A (en) Data processing method, electronic device and server
CN102082664A (en) Network data safety transmission system and network data safety transmission method
CN109660494A (en) The signature method, apparatus and server of electronic contract
CN105765941A (en) Illegal access server prevention method and device
KR101326732B1 (en) Automatic meter reading method using encryption key
CN113676332B (en) Two-dimensional code authentication method, communication device and storage medium
CN105323063A (en) Identity verification method of mobile terminal and fixed intelligent terminal based on two-dimensional code
CN111614731A (en) Method and system for accessing block chain to Internet of things equipment, aggregation gateway and storage medium
CN109726578A (en) A kind of anti-fake solution of novel dynamic two-dimension code
CN105141624A (en) Login method, account management server and client system
CN114172923B (en) Data transmission method, communication system and communication device
CN109495276A (en) A kind of implementation method of the electronic driving license based on SE chip, computer installation, computer readable storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200901