CN114626102A - Block chain-based electronic certificate transfer method, device, equipment and storage medium - Google Patents

Block chain-based electronic certificate transfer method, device, equipment and storage medium Download PDF

Info

Publication number
CN114626102A
CN114626102A CN202210277737.2A CN202210277737A CN114626102A CN 114626102 A CN114626102 A CN 114626102A CN 202210277737 A CN202210277737 A CN 202210277737A CN 114626102 A CN114626102 A CN 114626102A
Authority
CN
China
Prior art keywords
circulation
electronic certificate
request
electronic
stage
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
CN202210277737.2A
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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202210277737.2A priority Critical patent/CN114626102A/en
Publication of CN114626102A publication Critical patent/CN114626102A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Abstract

The invention relates to a block chain technology, and discloses an electronic certificate transfer method based on a block chain, which comprises the following steps: generating an electronic certificate according to the transaction information, and judging whether the effective time of the electronic certificate expires; if yes, sending the electronic certificate to a cashing enterprise; if not, receiving the electronic certificate circulation request, and judging whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request; if the request is a single-stage circulation request, extracting the single-stage circulation party, signing the single-stage circulation party and the electronic certificate, and uploading the electronic certificate and the signature to a block chain; if the request is a multi-stage circulation request, extracting a multi-stage circulation party and a circulation level, and constructing a chain network according to the circulation level and the multi-stage circulation party; and signing the multistage circulating party and the electronic certificate, and uploading the electronic certificate and the signature to the chain network. The invention also provides an electronic certificate circulation device, electronic equipment and a storage medium based on the block chain. The invention can realize the multi-stage circulation of the electronic certificate and improve the use efficiency of the electronic certificate.

Description

Block chain-based electronic certificate transfer method, device, equipment and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a block chain-based electronic certificate transfer method, an apparatus, an electronic device, and a computer-readable storage medium.
Background
At present, business account circulation among enterprises is not timely account. Enterprise a may subsequently receive corresponding funds by issuing account contracts, vouchers, etc. to enterprise B. However, for the operation of the enterprise, the conditions of long-line account collection, incapability of verifying the authenticity of the account voucher and the like are unfavorable for fund transfer, enterprise financing and bank borrowing of the enterprise. In the prior art, the authenticity of issuing the account voucher by an enterprise can be further ensured through the electronic voucher, but the problem of low efficiency still exists in the use and verification of the electronic voucher circulation among various enterprises and banks.
Disclosure of Invention
The invention provides an electronic certificate circulation method and device based on a block chain and a computer readable storage medium, and mainly aims to solve the problems that multi-stage circulation of electronic certificates is difficult to realize and the use efficiency of the electronic certificates is low.
In order to achieve the above object, the present invention provides an electronic certificate transfer method based on a block chain, including:
acquiring transaction information, and generating an electronic certificate according to the transaction information;
extracting the valid time of the electronic certificate and judging whether the valid time expires;
if the effective time is expired, acquiring a cash-in enterprise according to the transaction information, and sending the electronic certificate to the cash-in enterprise;
if the effective time is not expired, receiving an electronic certificate circulation request, analyzing the electronic certificate circulation request, and judging whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request according to an analysis result;
if the electronic certificate transfer request is a single-stage transfer request, obtaining a single-stage transfer party in the single-stage transfer request, signing the electronic certificate according to the single-stage transfer party to obtain a first electronic signature, and uploading the electronic certificate and the first electronic signature to a preset block chain;
if the electronic certificate circulation request is a multi-level circulation request, extracting a multi-level circulation square and a circulation level according to an analysis result, and constructing a chain network according to the multi-level circulation square and the circulation level;
and signing the electronic certificate according to the multistage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level.
Optionally, the generating an electronic certificate according to the transaction information includes:
acquiring a transaction type corresponding to the transaction information, and selecting a target template from preset certificate templates according to the transaction type;
and carrying out voice analysis on the transaction information, and filling the transaction information into the target template according to the result of semantic analysis to obtain the electronic certificate.
Optionally, the performing voice analysis on the transaction information and filling the transaction information into the target template according to a result of semantic analysis to obtain the electronic certificate includes:
extracting a missing information label in the target template;
performing semantic analysis on the transaction information to obtain a plurality of text semantics;
calculating the similarity of the missing information labels one by one according to the plurality of text semantics;
selecting the text semantics with the maximum similarity as the missing label information of the missing label;
and filling the missing tag information into the target template to obtain the electronic certificate.
Optionally, the parsing the electronic certificate circulation request, and determining whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request according to a parsing result includes:
identifying a request header data class in the electronic certificate circulation request;
performing reflection operation on the request head data class to obtain a request head method;
constructing a request head extraction statement according to the request head method;
executing the request header extraction statement to extract a request message header in the electronic certificate circulation request;
analyzing the message header to obtain the number of the certificate flow senders, and determining the type of the electronic certificate flow request according to the number of the certificate flow senders;
if the number of the certificate circulation parties is single, the electronic certificate circulation request is judged to be a single-level circulation request;
and if the number of the certificate circulation parties is multiple, judging that the electronic certificate circulation request is a multi-stage circulation request.
Optionally, the obtaining the single-stage streaming forwarding in the single-stage streaming request includes:
splitting the electronic certificate circulation request to obtain a request body;
and analyzing the request body to obtain the single-stage circulation transfer party.
Optionally, the signing the electronic certificate according to the single-stage circulation party to obtain a first electronic signature includes:
performing hash calculation on the electronic certificate to obtain a hash value;
and calling a private key in a preset public and private key pair to sign the hash value and the single-stage circulation party to obtain a first electronic signature.
Optionally, the constructing a chain network according to the multi-stage flow direction and the flow level includes:
constructing a multi-level chain network according to the circulation level, and generating an association relation between the circulation level and the multi-level chain network;
and linking the multistage circulation square to the associated multistage chain network according to the corresponding circulation level.
In order to solve the above problem, the present invention further provides an electronic certificate circulation device based on a block chain, the device comprising:
the electronic certificate generating module is used for acquiring transaction information and generating an electronic certificate according to the transaction information;
the electronic certificate cashing module is used for acquiring a cashing enterprise according to the transaction information when the effective time of the electronic certificate expires, and sending the electronic certificate to the cashing enterprise;
the electronic certificate flow request receiving module is used for receiving an electronic certificate flow request when the effective time of the electronic certificate is not due, analyzing the electronic certificate flow request, and judging whether the electronic certificate flow request is a single-stage flow request or a multi-stage flow request according to the analysis result;
the single-stage flow request processing module is used for acquiring a single-stage flow party in the single-stage flow request when the electronic certificate flow request is the single-stage flow request, signing the electronic certificate according to the single-stage flow party to obtain a first electronic signature, and uploading the electronic certificate and the first electronic signature to a preset block chain;
the multi-stage circulation request processing module is used for extracting a multi-stage circulation request and circulation levels according to an analysis result when the electronic certificate circulation request is the multi-stage circulation request, and constructing a chain network according to the multi-stage circulation request and the circulation levels; and signing the electronic certificate according to the multistage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the above-mentioned block chain-based electronic credential streaming method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the above block chain-based electronic credential circulation method.
According to the embodiment of the invention, the effective time of the electronic certificate is judged, and the electronic certificate circulation request is judged, so that three kinds of circulation of the electronic certificate are realized, namely circulation to a cash company, circulation to a preset block chain, and multi-level chain network circulation according to the circulation company; the electronic certificate is signed, and the electronic signature and the electronic certificate are linked, so that the safety and the flexibility of the circulation of the electronic certificate are realized; and the multi-level circulation of the electronic certificate is realized by constructing a chain network according to the circulation enterprise and the circulation level. Therefore, the block chain-based electronic certificate circulation method, the block chain-based electronic certificate circulation device, the electronic equipment and the computer-readable storage medium can solve the problems that multi-stage circulation of electronic certificates is difficult to realize and the use efficiency of the electronic certificates is low.
Drawings
Fig. 1 is a schematic flowchart of an electronic certificate flow method based on a block chain according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of generating an electronic certificate according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating an exemplary process of parsing an electronic certificate flow request according to an embodiment of the present invention;
fig. 4 is a functional block diagram of an electronic certificate circulation apparatus based on a block chain according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing the electronic certificate flow method based on the block chain according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides an electronic certificate circulation method based on a block chain. The execution subject of the block chain-based electronic certificate circulation method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the blockchain-based electronic certificate circulation method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flow chart of an electronic certificate flow method based on a block chain according to an embodiment of the present invention. In this embodiment, the electronic certificate circulation method based on the block chain includes:
and S1, acquiring the transaction information, and generating the electronic certificate according to the transaction information.
In the embodiment of the invention, the transaction information is all information in the transaction process, including money information, information of both transaction parties, information of transaction articles and the like.
In the embodiment of the invention, the electronic voucher can be different according to different transaction types, and can be an electronic voucher such as an electronic purchase order, an electronic invoice, an electronic delivery order and the like.
In an embodiment of the present invention, referring to fig. 2, the generating an electronic certificate according to the transaction information includes:
s21, acquiring the transaction type corresponding to the transaction information, and selecting a target template from preset certificate templates according to the transaction type;
and S22, carrying out voice analysis on the transaction information, and filling the transaction information into the target template according to the result of semantic analysis to obtain the electronic certificate.
In the embodiment of the present invention, there may be a plurality of types of transaction information, such as transaction information of a stock type, transaction information of a reimbursement fee, and the like.
In an embodiment of the present invention, the performing voice analysis on the transaction information and filling the transaction information into the target template according to a result of semantic analysis to obtain the electronic certificate includes:
extracting a missing information label in the target template;
performing semantic analysis on the transaction information to obtain a plurality of text semantics;
calculating the similarity between the text semantics and the missing information label one by one;
selecting the text semantics with the maximum similarity as the missing label information of the missing label;
and filling the missing tag information into the target template to obtain the electronic certificate.
In the embodiment of the invention, a Natural Language Processing (NLP) model can be adopted to carry out semantic recognition on the transaction information, the text semantics are expressed in a text vector form, and then the transaction information corresponding to the text semantics with the minimum distance value is selected to be filled into the missing information of the voucher template by calculating the distance value between the text semantics and the missing information of the preset voucher template.
Further, the similarity calculation may be performed on the plurality of text semantics and the missing information tag by the following formula:
Figure BDA0003556398380000061
wherein cos θ is the similarity, aiFor the ith text semantic, bjIs the jth missing information tag.
S2, extracting the valid time of the electronic certificate, and judging whether the valid time expires.
In the embodiment of the invention, when the electronic certificate is generated, the time attribute of the electronic certificate can be generated according to real-time for ensuring the timeliness of the electronic certificate. Therefore, the valid time of the electronic certificate can be further acquired by extracting the time attribute of the electronic certificate.
In the embodiment of the invention, whether the electronic certificate is valid and whether the electronic certificate should be cashed is determined by judging whether the valid time of the electronic certificate expires.
And if the effective time is expired, executing S3, acquiring a cashing enterprise according to the transaction information, and sending the electronic certificate to the cashing enterprise.
In an embodiment of the present invention, the acquiring a redemption enterprise according to the transaction information includes:
selecting the text semantics similar to the cashing enterprise from the plurality of text semantics as target semantics;
and extracting the cashing enterprise from the transaction information according to the target semantics.
In the embodiment of the invention, when the effective time of the electronic certificate expires, a payer in the electronic certificate transaction party or a cashing party marked in the electronic certificate needs to cash the electronic certificate in time, and the expired electronic certificate can be sent to the cashing enterprise for reminding and executing cashing.
If the valid time is not expired, executing S4, receiving an electronic certificate circulation request, analyzing the electronic certificate circulation request, and judging whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request according to an analysis result.
In the embodiment of the invention, the effective time of the electronic certificate is not expired, and the electronic certificate can be circulated in other enterprises to realize business requirements, such as fund circulation, financial pledge and the like.
In the embodiment of the invention, the information source tracing can be carried out on the request body of the single-stage circulation request to obtain the number of the certificate circulation parties in the electronic certificate circulation request, and then whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request is judged according to the number of the certificate circulation parties.
In the embodiment of the present invention, referring to fig. 3, the analyzing the electronic certificate flow request, and determining whether the electronic certificate flow request is a single-stage flow request or a multi-stage flow request according to an analysis result includes:
s31, identifying a request header data class in the electronic certificate circulation request;
s32, performing reflection operation on the request head data class to obtain a request head method;
s33, constructing a request header extraction statement according to the request header method;
s34, executing the request header extraction statement to extract the request message header in the electronic certificate circulation request;
s35, analyzing the message header to obtain the number of the certificate flow senders, and determining the type of the electronic certificate flow request according to the number of the certificate flow senders;
if the number of the certificate circulation parties is single, executing S36 and judging that the electronic certificate circulation request is a single-level circulation request;
if the number of the certificate circulation parties is multiple, executing S37, and determining that the electronic certificate circulation request is a multi-stage circulation request.
In detail, in the embodiment of the present invention, the request header data class in the electronic certificate flow request is determined by traversing the electronic certificate flow request, and the request header is subjected to information tracing according to the request body data class, where the request header data class is used to implement the electronic certificate flow request, and the request header data class is subjected to reflection operation, so that the request header method can be obtained.
Specifically, the request header data class is subjected to a reflection operation to obtain a request header method, for example, the following java statements are used to perform a reflection operation on the request header data class:
Stringname="Hualing";Classc1=name.getClass();System.out.println(c1.getName())。
wherein "healing" is the request header data class.
And after the request head data class is subjected to reflection operation, the request head method can be obtained. Illustratively, the following request header extraction statements may be constructed according to the request header method:
String name=field.getName()。
if the electronic certificate circulation request is a single-stage circulation request, S5 is executed, a single-stage circulation party in the single-stage circulation request is obtained, the electronic certificate is signed according to the single-stage circulation party to obtain a first electronic signature, and the electronic certificate and the first electronic signature are uploaded to a preset block chain.
In an embodiment of the present invention, the acquiring a single-stage streaming client in the single-stage streaming request includes:
splitting the electronic certificate circulation request to obtain a request body;
and analyzing the request body to obtain the single-stage circulation transfer party.
In the embodiment of the present invention, a pre-obtained parser may be used to parse the request body to obtain a single-level flow square in the single-level flow request, where the parser includes CarakanC/C + +, squirrel fisherc + +, squirrel fisher xtremc + +, and the like.
In the embodiment of the invention, the electronic certificate is signed, so that the security of the electronic certificate in an external area and a public area can be ensured, wherein the external area and the public area comprise but are not limited to a block chain and a database.
In an embodiment of the present invention, signing the electronic certificate according to the single-stage circulation party to obtain a first electronic signature includes:
performing hash calculation on the electronic certificate to obtain a hash value;
and calling a private key in a preset public and private key pair to sign the hash value and the single-stage circulation party to obtain a first electronic signature.
Specifically, in the embodiment of the present invention, SHA-256 algorithm may be adopted to perform hash calculation on the electronic certificate, so as to obtain a hash value; the embodiment of the invention can call a private key to sign the hash value and the single-stage flow forwarding by using an ECDSA algorithm to obtain a first electronic signature.
In the embodiment of the invention, the hash value, the signed information and the electronic certificate can be sent to an Ethernet workshop network by adopting a grpc format, so that uplink of a block chain is realized.
In the embodiment of the invention, after the electronic certificate is linked, a block chain party can call a public key to verify the signature; if the signature verification passes, the hash value, the electronic certificate and the single-level flow forward are registered in the state of the EtherFang.
And if the electronic certificate circulation request is a multi-stage circulation request, executing S6, extracting a multi-stage circulation party and a circulation level according to the analysis result, and constructing a chain network according to the multi-stage circulation party and the circulation level.
In the embodiment of the present invention, the step of extracting the multi-stage flow square and the flow level according to the analysis result is similar to the step of obtaining the single-stage flow square in the single-stage flow request in S5, and is not repeated here.
In this embodiment of the present invention, the constructing a chain network according to the multistage flow direction and the flow level includes:
constructing a multi-level chain network according to the circulation levels, and generating an incidence relation between the circulation levels and the multi-level chain network;
and linking the multistage circulation branch to the associated multistage chain network according to the corresponding circulation level.
In the embodiment of the present invention, the multi-level chain network may include a first-level chain network, a second-level chain network, a third-level chain network, and the like, and the electronic certificates corresponding to each level of chain network may be distinguished by their use ranges, use authorities, and the like, or each level of chain network may correspond to different times of circulation of the electronic certificates.
S7, signing the electronic certificate according to the multistage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level.
In this embodiment of the present invention, the step of signing the electronic certificate according to the multi-stage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level is similar to the step of signing the electronic certificate according to the single-stage circulation party in S5 to obtain a first electronic signature, and uploading the electronic certificate and the first electronic signature to a preset block chain, which is not described herein in detail.
According to the embodiment of the invention, the effective time of the electronic certificate is judged, and the electronic certificate circulation request is judged, so that three kinds of circulation of the electronic certificate are realized, namely circulation to a cash company, circulation to a preset block chain, and multi-level chain network circulation according to the circulation company; the electronic certificate is signed, and the electronic signature and the electronic certificate are linked, so that the safety and the flexibility of the circulation of the electronic certificate are realized; and the multi-level circulation of the electronic certificate is realized by constructing a chain network according to the circulation enterprise and the circulation level. Therefore, the electronic certificate circulation method based on the block chain can solve the problems that multi-stage circulation of electronic certificates is difficult to realize and the efficiency is low.
Fig. 4 is a functional block diagram of an electronic certificate circulation apparatus based on a block chain according to an embodiment of the present invention.
The electronic certificate circulation device 100 based on the block chain can be installed in an electronic device. According to the implemented functions, the block chain-based electronic certificate circulation device 100 may include an electronic certificate generation module 101, an electronic certificate redemption module 102, an electronic certificate circulation request receiving module 103, a single-level circulation request processing module 104, and a multi-level circulation request processing module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the electronic certificate generating module 101 is configured to obtain transaction information and generate an electronic certificate according to the transaction information;
the electronic certificate cashing module 102 is configured to acquire a cashing enterprise according to the transaction information when the valid time of the electronic certificate expires, and send the electronic certificate to the cashing enterprise;
the electronic certificate circulation request receiving module 103 is configured to receive an electronic certificate circulation request when the valid time of an electronic certificate is not due, analyze the electronic certificate circulation request, and determine whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request according to an analysis result;
the single-stage flow request processing module 104 is configured to, when the electronic certificate flow request is a single-stage flow request, obtain a single-stage flow party in the single-stage flow request, sign the electronic certificate according to the single-stage flow party, obtain a first electronic signature, and upload the electronic certificate and the first electronic signature to a preset block chain;
the multi-level flow request processing module 105 is configured to extract a multi-level flow direction and a flow level according to an analysis result when the electronic certificate flow request is a multi-level flow request, and construct a link network according to the multi-level flow direction and the flow level; and signing the electronic certificate according to the multistage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level.
In detail, when the modules in the block chain-based electronic certificate circulation device 100 according to the embodiment of the present invention are used, the same technical means as the block chain-based electronic certificate circulation method described in fig. 1 to 3 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device for implementing an electronic certificate flow method based on a block chain according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further include a computer program, such as a blockchain-based electronic credential circulation program, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (for example, executing an electronic certificate circulation program based on a block chain, etc.) stored in the memory 11 and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of an electronic certificate circulation program based on a block chain, but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The block chain based electronic credential flow program stored by the memory 11 in the electronic device 1 is a combination of a plurality of instructions that, when executed in the processor 10, may implement:
acquiring transaction information, and generating an electronic certificate according to the transaction information;
extracting the valid time of the electronic certificate and judging whether the valid time expires;
if the effective time is expired, acquiring a cashing enterprise according to the transaction information, and sending the electronic certificate to the cashing enterprise;
if the effective time is not expired, receiving an electronic certificate circulation request, analyzing the electronic certificate circulation request, and judging whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request according to an analysis result;
if the electronic certificate circulation request is a single-stage circulation request, acquiring a single-stage circulation party in the single-stage circulation request, signing the electronic certificate according to the single-stage circulation party to obtain a first electronic signature, and uploading the electronic certificate and the first electronic signature to a preset block chain;
if the electronic certificate circulation request is a multi-level circulation request, extracting a multi-level circulation square and a circulation level according to an analysis result, and constructing a chain network according to the multi-level circulation square and the circulation level;
and signing the electronic certificate according to the multistage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor of an electronic device, implements:
acquiring transaction information, and generating an electronic certificate according to the transaction information;
extracting the valid time of the electronic certificate and judging whether the valid time expires;
if the effective time is expired, acquiring a cashing enterprise according to the transaction information, and sending the electronic certificate to the cashing enterprise;
if the effective time is not expired, receiving an electronic certificate circulation request, analyzing the electronic certificate circulation request, and judging whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request according to an analysis result;
if the electronic certificate transfer request is a single-stage transfer request, obtaining a single-stage transfer party in the single-stage transfer request, signing the electronic certificate according to the single-stage transfer party to obtain a first electronic signature, and uploading the electronic certificate and the first electronic signature to a preset block chain;
if the electronic certificate circulation request is a multi-level circulation request, extracting a multi-level circulation square and a circulation level according to an analysis result, and constructing a chain network according to the multi-level circulation square and the circulation level;
and signing the electronic certificate according to the multistage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An electronic certificate circulation method based on a block chain is characterized by comprising the following steps:
acquiring transaction information, and generating an electronic certificate according to the transaction information;
extracting the valid time of the electronic certificate and judging whether the valid time expires;
if the effective time is expired, acquiring a cashing enterprise according to the transaction information, and sending the electronic certificate to the cashing enterprise;
if the effective time is not expired, receiving an electronic certificate circulation request, analyzing the electronic certificate circulation request, and judging whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request according to an analysis result;
if the electronic certificate circulation request is a single-stage circulation request, acquiring a single-stage circulation party in the single-stage circulation request, signing the electronic certificate according to the single-stage circulation party to obtain a first electronic signature, and uploading the electronic certificate and the first electronic signature to a preset block chain;
if the electronic certificate circulation request is a multi-level circulation request, extracting a multi-level circulation square and a circulation level according to an analysis result, and constructing a chain network according to the multi-level circulation square and the circulation level;
and signing the electronic certificate according to the multistage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level.
2. The method for electronic certificate transfer based on block chain as claimed in claim 1, wherein the generating of the electronic certificate according to the transaction information comprises:
acquiring a transaction type corresponding to the transaction information, and selecting a target template from preset certificate templates according to the transaction type;
and carrying out voice analysis on the transaction information, and filling the transaction information into the target template according to the result of semantic analysis to obtain the electronic certificate.
3. The method as claimed in claim 2, wherein the performing a voice analysis on the transaction information and filling the transaction information into the target template according to a result of the semantic analysis to obtain the electronic certificate comprises:
extracting a missing information label in the target template;
performing semantic analysis on the transaction information to obtain a plurality of text semantics;
calculating the similarity of the missing information labels one by one according to the plurality of text semantics;
selecting the text semantics with the maximum similarity as the missing label information of the missing label;
and filling the missing tag information into the target template to obtain the electronic certificate.
4. The method for electronic certificate flow based on block chain as claimed in claim 1, wherein said parsing said electronic certificate flow request and determining whether said electronic certificate flow request is a single-stage flow request or a multi-stage flow request according to the parsing result comprises:
identifying a request header data class in the electronic certificate circulation request;
performing reflection operation on the request head data class to obtain a request head method;
constructing a request head extraction statement according to the request head method;
executing the request header extraction statement to extract a request message header in the electronic certificate circulation request;
analyzing the message header to obtain the number of the certificate flow senders, and determining the type of the electronic certificate flow request according to the number of the certificate flow senders;
if the number of the certificate circulation parties is single, the electronic certificate circulation request is judged to be a single-level circulation request;
and if the number of the certificate circulation parties is multiple, judging that the electronic certificate circulation request is a multi-stage circulation request.
5. The method for electronic certificate transfer based on block chain as claimed in claim 1, wherein the obtaining of the single-stage transfer party in the single-stage transfer request comprises:
splitting the electronic certificate circulation request to obtain a request body;
and analyzing the request body to obtain the single-stage circulation transfer party.
6. The block chain-based electronic certificate circulation method according to claim 1, wherein the signing the electronic certificate according to the single-stage circulation flow to obtain a first electronic signature comprises:
performing hash calculation on the electronic certificate to obtain a hash value;
and calling a private key in a preset public and private key pair to sign the hash value and the single-stage circulation party to obtain a first electronic signature.
7. The block chain-based electronic certificate circulation method according to any one of claims 1 to 6, wherein the building of the chain network according to the multistage circulation square and the circulation level comprises:
constructing a multi-level chain network according to the circulation levels, and generating an incidence relation between the circulation levels and the multi-level chain network;
and linking the multistage circulation square to the associated multistage chain network according to the corresponding circulation level.
8. An electronic certificate circulation device based on a block chain, the device comprising:
the electronic certificate generating module is used for acquiring transaction information and generating an electronic certificate according to the transaction information;
the electronic certificate cashing module is used for acquiring a cashing enterprise according to the transaction information when the valid time of the electronic certificate expires, and sending the electronic certificate to the cashing enterprise;
the electronic certificate circulation request receiving module is used for receiving an electronic certificate circulation request when the valid time of the electronic certificate is not due, analyzing the electronic certificate circulation request, and judging whether the electronic certificate circulation request is a single-stage circulation request or a multi-stage circulation request according to an analysis result;
the single-stage flow request processing module is used for acquiring a single-stage flow party in the single-stage flow request when the electronic certificate flow request is the single-stage flow request, signing the electronic certificate according to the single-stage flow party to obtain a first electronic signature, and uploading the electronic certificate and the first electronic signature to a preset block chain;
the multi-stage circulation request processing module is used for extracting a multi-stage circulation request and circulation levels according to an analysis result when the electronic certificate circulation request is the multi-stage circulation request, and constructing a chain network according to the multi-stage circulation request and the circulation levels; and signing the electronic certificate according to the multistage circulation party to obtain a second electronic signature, and uploading the electronic certificate and the second electronic signature to the chain network according to the circulation level.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the blockchain-based electronic credential circulation method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the block chain-based electronic credential circulation method according to any one of claims 1 to 7.
CN202210277737.2A 2022-03-21 2022-03-21 Block chain-based electronic certificate transfer method, device, equipment and storage medium Pending CN114626102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210277737.2A CN114626102A (en) 2022-03-21 2022-03-21 Block chain-based electronic certificate transfer method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210277737.2A CN114626102A (en) 2022-03-21 2022-03-21 Block chain-based electronic certificate transfer method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114626102A true CN114626102A (en) 2022-06-14

Family

ID=81903672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210277737.2A Pending CN114626102A (en) 2022-03-21 2022-03-21 Block chain-based electronic certificate transfer method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114626102A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375336A (en) * 2022-10-24 2022-11-22 浙江省标准化研究院(金砖国家标准化(浙江)研究中心、浙江省物品编码中心) Management method of target object transaction certificate, electronic equipment and storage medium
CN116915793A (en) * 2023-09-12 2023-10-20 哈尔滨工程大学三亚南海创新发展基地 Data streaming control method, system and storage medium based on digital certificates
CN117114927A (en) * 2023-09-11 2023-11-24 青岛鑫晟汇科技有限公司 Electronic certificate circulation system based on machine learning technology

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375336A (en) * 2022-10-24 2022-11-22 浙江省标准化研究院(金砖国家标准化(浙江)研究中心、浙江省物品编码中心) Management method of target object transaction certificate, electronic equipment and storage medium
CN117114927A (en) * 2023-09-11 2023-11-24 青岛鑫晟汇科技有限公司 Electronic certificate circulation system based on machine learning technology
CN117114927B (en) * 2023-09-11 2024-02-02 青岛鑫晟汇科技有限公司 Electronic certificate circulation system based on machine learning technology
CN116915793A (en) * 2023-09-12 2023-10-20 哈尔滨工程大学三亚南海创新发展基地 Data streaming control method, system and storage medium based on digital certificates
CN116915793B (en) * 2023-09-12 2024-03-08 哈尔滨工程大学三亚南海创新发展基地 Data streaming control method, system and storage medium based on digital certificates

Similar Documents

Publication Publication Date Title
TWI714359B (en) Method and device for uploading electronic certificates
CN114626102A (en) Block chain-based electronic certificate transfer method, device, equipment and storage medium
CN111475513B (en) Form generation method and device, electronic equipment and medium
CN112507936B (en) Image information auditing method and device, electronic equipment and readable storage medium
CN112528616B (en) Service form generation method and device, electronic equipment and computer storage medium
CN112733531B (en) Virtual resource allocation method and device, electronic equipment and computer storage medium
CN115222410A (en) Block chain based transaction uplink method and device, electronic equipment and storage medium
CN112598502A (en) Evidence obtaining method, device, equipment and storage medium
CN112668575A (en) Key information extraction method and device, electronic equipment and storage medium
CN112560855A (en) Image information extraction method and device, electronic equipment and storage medium
CN115801222A (en) Power consumer authenticity verification system and method based on homomorphic encrypted communication data
CN113221888B (en) License plate number management system test method and device, electronic equipment and storage medium
CN114331105A (en) Electronic draft processing system, method, electronic device and storage medium
CN114372892A (en) Payment data monitoring method, device, equipment and medium
CN112037056B (en) Transaction processing method, device, equipment and storage medium
CN113486646A (en) Product report issuing method and device, electronic equipment and readable storage medium
CN114722146A (en) Supply chain asset checking method, device, equipment and medium based on artificial intelligence
WO2022110647A1 (en) Risk control data generation method and apparatus, device, and computer readable storage medium
CN115311061B (en) Electronic transaction management method, device, equipment and storage medium based on digital authentication
CN113825138B (en) Fraud short message monitoring method and device, electronic equipment and storage medium
CN116956325A (en) Method, device, equipment and storage medium for checking account of organization account with automatic verification
CN113435843A (en) Batch file generation method and device, electronic equipment and storage medium
CN115293799A (en) Block chain point communication method, system, electronic equipment and storage medium
CN117650888A (en) UKEY-based issuing method, device, equipment and storage medium
CN114493940A (en) Block chain-based electronic contract management method, device, equipment and 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