CN108646983B - Processing method and device for storing service data on block chain - Google Patents

Processing method and device for storing service data on block chain Download PDF

Info

Publication number
CN108646983B
CN108646983B CN201810434004.9A CN201810434004A CN108646983B CN 108646983 B CN108646983 B CN 108646983B CN 201810434004 A CN201810434004 A CN 201810434004A CN 108646983 B CN108646983 B CN 108646983B
Authority
CN
China
Prior art keywords
target data
data
block chain
service
blockchain
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.)
Active
Application number
CN201810434004.9A
Other languages
Chinese (zh)
Other versions
CN108646983A (en
Inventor
胡锴
郑涤非
孙雪慧
滕小俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mixislink Technology Co ltd
Original Assignee
Beijing Mixislink 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 Beijing Mixislink Technology Co ltd filed Critical Beijing Mixislink Technology Co ltd
Priority to CN201810434004.9A priority Critical patent/CN108646983B/en
Publication of CN108646983A publication Critical patent/CN108646983A/en
Application granted granted Critical
Publication of CN108646983B publication Critical patent/CN108646983B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash

Abstract

The invention discloses a processing method and a processing device for storing service data on a block chain. Wherein, the method comprises the following steps: acquiring service data and defining the transaction type of the service data; constructing target data to be uploaded to a block chain network according to the business data based on a construction method corresponding to the transaction type; the target data is stored onto a blockchain of a corresponding node in the blockchain network. The invention solves the technical problem that in the prior art, as the data recorded on the block chain only contains transaction data and does not contain service data, the information safety can not be ensured under the condition that the service data is tampered.

Description

Processing method and device for storing service data on block chain
Technical Field
The invention relates to the field of internet, in particular to a method and a device for processing business data stored on a block chain.
Background
In the field of internet information technology, some service data are usually stored through a database of a central server, but once the central server is attacked, the data are likely to be tampered or lost, and the loss is immeasurable. Bitcoin proposes a blockchain technique to solve the problem, however, bitcoin only writes transaction data in the economics concept into the blockchain, and does not record some functional service data into the blockchain. Therefore, in response to the current situation, a method for writing functional data into a block chain needs to be developed.
In the prior art, an effective solution is not provided at present, because only transaction data and no service data exist in data recorded on a block chain, and information security cannot be ensured under the condition that the service data is tampered.
Disclosure of Invention
The embodiment of the invention provides a processing method and a processing device for storing service data on a block chain, which are used for at least solving the technical problem that in the prior art, as only transaction data and no service data exist in data recorded on the block chain, information safety cannot be ensured under the condition that the service data are tampered.
According to an aspect of the embodiments of the present invention, a method for processing service data is provided, including: acquiring service data and defining the transaction type of the service data; constructing target data to be uploaded to a block chain network according to the business data based on a construction method corresponding to the transaction type; the target data is stored onto a blockchain of a corresponding node in the blockchain network.
According to another aspect of the embodiments of the present invention, there is also provided a device for processing service data, including: the acquisition unit is used for acquiring the service data and defining the transaction type of the service data; the building unit is used for building target data to be uploaded to the block chain network according to the business data based on a building method corresponding to the transaction type; and the storage unit is used for storing the target data to the block chain of the corresponding node in the block chain network.
In the embodiment of the invention, the business data is acquired, and the transaction type of the business data is defined; constructing target data to be uploaded to a block chain network according to the business data based on a construction method corresponding to the transaction type; the target data is stored in the block chain of the corresponding node in the block chain network, so that the purpose of storing the service data in the block chain to prevent the service data from being tampered is achieved, the technical effect of improving the safety of the service data is achieved, and the technical problem that in the prior art, as the data recorded in the block chain only contains transaction data and does not contain the service data, the information safety cannot be ensured under the condition that the service data is tampered is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a processing method for storing service data on a blockchain according to an embodiment of the present invention;
fig. 2 is a flowchart of an alternative processing method for storing service data on a blockchain according to an embodiment of the present invention;
FIG. 3 is a flow diagram of an alternative method of generating blockchain data according to an embodiment of the present invention;
fig. 4 is a flowchart of an alternative method for writing service data on a block chain according to an embodiment of the present invention; and
fig. 5 is a schematic diagram of a processing apparatus for storing service data on a blockchain according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided an embodiment of a processing method for storing service data on a blockchain, it is noted that the steps shown in the flowchart of the figure may be executed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from the order shown.
Fig. 1 is a flowchart of a processing method for storing service data on a blockchain according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, acquiring the service data and defining the transaction type of the service data.
In particular, the business data may be some functional business data associated with the transaction, including but not limited to, electricity data, user data (e.g., registration, login, access, voting, etc.). The service data can be extended to a transaction, recorded on the blockchain. The transaction type may be a predefined transaction type to which the service data belongs, that is, different service data, and the calculation and transaction methods may be different, so that after the service data is obtained, at least the transaction type of the service data needs to be obtained, so as to determine a calculation or transaction rule or method of the service data according to the transaction type.
In an alternative embodiment, the functional business data may be stored to a database and the transaction type of the business data defined in a configuration file.
And step S104, constructing target data to be uploaded to the block chain network according to the business data based on a construction method corresponding to the transaction type.
Specifically, after the type of the service data is determined according to the acquired service data, corresponding target data to be uploaded to the blockchain network may be constructed according to the service data based on a construction method corresponding to the transaction type.
As an optional embodiment, a transaction flow of the service data may be designed according to the transaction types defined in the configuration file, specifically, common transaction data is constructed, and meanwhile, a method of a corresponding class is called according to different types of transactions to process the service data, when constructing target data to be uploaded to the block link network, a construction method of a functional service class may be called according to a functional requirement to construct the service transaction data, and the functional service data and the main flow data are constructed into the target data.
Step S106, storing the target data to the block chain of the corresponding node in the block chain network.
Specifically, after the target data to be uploaded to the blockchain network is constructed in step S104, the target data is stored in the blockchain of the corresponding node in the blockchain network.
As can be seen from the above, in the above embodiments of the present application, after the service data of any service is acquired, based on the construction method corresponding to the transaction type, the target data to be uploaded to the blockchain network is constructed according to the acquired service data, and the constructed target data is stored in the blockchain of the corresponding node in the blockchain network, so as to achieve the purpose of storing the service data in the blockchain to prevent the service data from being tampered, thereby achieving the technical effect of improving the security of the service data, and further solving the technical problem in the prior art that, because the data recorded in the blockchain only has transaction data and no service data, when the service data is tampered, the information security cannot be ensured.
It should be noted that, in order to ensure the accuracy of the data stored on the blockchain, when uploading the target data to be uploaded to the blockchain network, as an alternative example, as shown in fig. 2, the following steps may be included:
step S202, generating identification information of target data in a block chain network;
step S204, verifying the legality of the target data based on the identification information;
step S206, under the condition that the target data is verified to be legal, the target data is stored to the block chain of the corresponding node in the block chain network.
Optionally, generating the identification information of the target data in the blockchain network may include the following steps: generating a corresponding hash value according to the target data; and generating identification information of the target data in the blockchain network according to the hash value.
Optionally, generating a corresponding hash value according to the target data includes: encrypting the target data to obtain encrypted data, wherein the encryption comprises at least one of the following steps: encrypting by adopting a secret key and adding a digital signature; and generating a corresponding hash value according to the encrypted data.
Optionally, generating identification information of the target data in the blockchain network according to the hash value may include: and converting the hash value into a corresponding hexadecimal numerical value, and using the hexadecimal numerical value as identification information of the target data in the block chain network.
Optionally, before generating the identification information of the target data in the blockchain network according to the hash value, the method may further include: and carrying out encryption processing on the hash value, wherein the encryption processing comprises at least one of the following steps: and encrypting by adopting a secret key and adding a digital signature.
In an optional embodiment, the identification information may be a transaction ID corresponding to the target data, a timestamp and a signature are added to the target data, and the corresponding transaction ID is generated based on a hash algorithm, specifically, as an optional implementation manner, the current time may be obtained, the transaction timestamp may be recorded, an encryption/decryption module Crypto module of node. js is introduced for encryption, signature authentication is performed through an Ed25519 component, and a simple hash value is generated on the signed target data through a sha256 hash algorithm. Optionally, the above hash value may be signed by a signature algorithm Ed25519 with a key. Further, the generated hash value may be encrypted again, and the encrypted hash value (binary number) may be subjected to multilevel (e.g., 16-ary) processing to generate a corresponding transaction ID.
Optionally, as an optional embodiment, verifying the validity of the target data based on the identification information may include the following steps: performing service verification on the target data; and under the condition that the target data passes the service verification, verifying the legality of the target data based on the identification information.
Specifically, when verifying the validity of the target data, not only information such as a transaction ID, a signature, and a timestamp of the target data is verified, but also a business logic of the target data is verified, for example, when the business data is electricity quantity data, it is necessary to verify whether the electricity quantity data conforms to an electricity quantity calculation rule.
Optionally, in a case that the target data passes the service verification, verifying the validity of the target data based on the identification information may include: under the condition that the target data passes service verification, judging whether the target data exists on the target block chain or not based on the identification information; and under the condition that the target data does not exist on the target block chain, verifying the legality of the target data based on the identification information.
As an optional implementation, storing the target data to the blockchain of the corresponding node in the blockchain network may include the following steps: if the target data is recorded on the target block chain, other nodes in the block chain network synchronize the target data to the corresponding block chain; if the target data is not recorded on the target blockchain, the node of the target blockchain broadcasts the target data to other nodes on the blockchain network, wherein the target data verified by any one node is stored on the corresponding blockchain.
Specifically, after the target data is legally verified, the target data that is not confirmed by the blockchain network node needs to be broadcast through the P2P network, and after being broadcast, the target data may be verified by any node and then recorded into the blockchain; if the target data is written to the block by a node in the blockchain network, other nodes synchronize the block (including transactions) and then verify and resolve the fork problem. And synchronizing by using a block chain technology, and inserting the node into the block chain database of the node after other nodes are successfully verified.
As a preferred embodiment, fig. 3 is a flowchart of an optional method for generating blockchain data according to an embodiment of the present invention, and as shown in fig. 3, after target data to be uploaded to a blockchain network is constructed, a timestamp may be added to the target data to be uploaded to the blockchain, the target data after the timestamp is added is encrypted, a corresponding hash value is generated, a digital signature is then added to the hash value by using a key provided by a service party, and hexadecimal processing is performed on the target data with the digital signature added, so as to obtain identification information (e.g., a transaction ID) of the target data, so as to upload the blockchain network based on the identification information.
As a preferred embodiment, fig. 4 is a flowchart of an optional method for writing service data on a block chain according to an embodiment of the present invention, as shown in fig. 4, including the following steps:
(1) creating a profile defining transaction types including, but not limited to, functional transactions and transfer transactions;
(2) storing some created or collected functional service data in a database for later query when constructing transaction data;
(3) importing user data comprising user passwords (private keys), addresses and other data;
(4) and constructing public data of the transaction by using the previous user data for functions of digital signature and verification and the like of the subsequent steps.
(5) And after the step, calling a corresponding method of the corresponding transaction type to construct the service data by judging the transaction type.
(6) And combining the data constructed in the last two steps into complete transaction data.
(7) The transaction is signed to prevent data tampering during the propagation process, such as writing meter data into the transaction.
(8) The transaction is subjected to a series of processes such as hash and the like to generate a transaction ID for later verification.
(9) The transaction is further processed as required (e.g., rounding, etc. the power data).
(10) The validity of the transaction is verified again to prevent the generation of illegal data during the processing.
(11) And verifying whether the functional service data is tampered again, and preventing the functional service data from being changed in the processing process.
(12) And judging whether the transaction exists, and if so, not performing subsequent processing.
(13) If the transaction does not exist, the signature, timestamp, etc. information for the transaction will be verified.
(14) Another thread of the system generates a tile every 16 seconds and writes the unacknowledged transaction to the last tile generated.
(15) If the transaction is written in time in the future, the transaction will be broadcast out through the p2p network, thus realizing distributed storage and preventing data loss or tampering after a single node is attacked.
(16) The broadcast may be authenticated by any node and recorded into the block chain.
(17) If a transaction is written to a block, other nodes synchronize the block (including the transaction) and then verify and resolve the fork problem.
(18) After the verification passes, the block and the transaction are saved to a local database.
Through the embodiment of the application, when the whole network is upgraded every time, some functional transaction types can be newly added on the bottom layer according to requirements, and compared with an intelligent contract, the method is relatively simple in analysis, low in management cost and relatively high in pertinence.
According to an embodiment of the present invention, an apparatus embodiment for implementing the processing method for storing service data on a blockchain is further provided, and fig. 5 is a schematic diagram of a processing apparatus for storing service data on a blockchain according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes: an acquisition unit 501, a construction unit 503, and a storage unit 505.
The acquiring unit 501 is configured to acquire service data and define a transaction type of the service data;
a constructing unit 503, configured to construct, based on a construction method corresponding to the transaction type, target data to be uploaded to the blockchain network according to the service data;
a storage unit 505, configured to store the target data onto the blockchain of the corresponding node in the blockchain network.
It should be noted here that the above-mentioned obtaining unit 501, the building unit 503 and the storage unit 505 correspond to steps S102 to S106 in the method embodiment, and the above-mentioned modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above-mentioned method embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
As can be seen from the above, in the above embodiments of the present application, after the service data of any service is acquired through the acquiring unit 501, the target data to be uploaded to the blockchain network is constructed according to the acquired service data through the constructing unit 503 based on the construction method corresponding to the transaction type, and the constructed target data is stored in the blockchain of the corresponding node in the blockchain network through the storage unit 505, so that the purpose of storing the service data in the blockchain to prevent the service data from being tampered is achieved, thereby achieving the technical effect of improving the security of the service data, and further solving the technical problem that in the prior art, since the data recorded in the blockchain only includes the transaction data and no service data, when the service data is tampered, the information security cannot be ensured.
In an alternative example, the storage unit may include: the generation module is used for generating identification information of the target data in the block chain network; the verification module is used for verifying the legality of the target data based on the identification information; and the storage module is used for storing the target data to the block chain of the corresponding node in the block chain network under the condition that the target data is verified to be legal.
Optionally, the generating module may include: the first generation submodule is used for generating a corresponding hash value according to the target data; and the second generation submodule is used for generating the identification information of the target data in the blockchain network according to the hash value.
Optionally, the first generating sub-module is further configured to perform encryption processing on the target data to obtain encrypted data, and generate a corresponding hash value according to the encrypted data, where the encryption processing includes at least one of: and encrypting by adopting a secret key and adding a digital signature.
Optionally, the second generation submodule is further configured to convert the hash value into a corresponding hexadecimal value, and use the hexadecimal value as identification information of the target data in the blockchain network.
In an alternative embodiment, the apparatus may further include: the encryption module is used for carrying out encryption processing on the hash value, wherein the encryption processing comprises at least one of the following steps: and encrypting by adopting a secret key and adding a digital signature.
In an optional embodiment, the verification module is further configured to perform service verification on the target data, and verify the validity of the target data based on the identification information when the target data passes the service verification.
In an optional embodiment, the verification module is further configured to, when the target data passes service verification, determine whether the target data exists on the target block chain based on the identification information, and verify the validity of the target data based on the identification information when the target data does not exist on the target block chain.
In an alternative embodiment, the memory cell includes: the synchronization module is used for synchronizing the target data to the corresponding block chain by other nodes in the block chain network if the target data is recorded on the target block chain; and the propagation module is used for broadcasting the target data to other nodes on the block chain network by the nodes of the target block chain if the target data is not recorded on the target block chain, wherein the target data verified by any one node is stored in the corresponding block chain.
According to an embodiment of the present invention, there is further provided a storage medium including a stored program, where the program performs the optional or preferred processing method of storing service data on a blockchain in any one of the above method embodiments.
According to an embodiment of the present invention, there is further provided a processor, where the processor is configured to execute a program, where the program executes an optional or preferred processing method for storing service data on a blockchain in any one of the above method embodiments when running.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units 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, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for processing service data stored in a blockchain, comprising:
acquiring service data, and defining the transaction type of the service data in a configuration file;
based on a construction method corresponding to the transaction type, constructing target data to be uploaded to a block chain network according to the service data, wherein the construction method comprises the following steps: the method comprises the steps of constructing common transaction data, calling a corresponding construction method according to the transaction type to process the service data, calling a construction method of a functional service class according to functional requirements to construct service transaction data when constructing the target data to be uploaded to a block chain network, and constructing the target data according to the functional service data and main process data;
and storing the target data on a block chain of a corresponding node in a block chain network.
2. The method of claim 1, wherein storing the target data onto a blockchain of a corresponding node in a blockchain network comprises:
generating identification information of the target data in the block chain network;
verifying the legality of the target data based on the identification information;
and under the condition that the target data is verified to be legal, storing the target data to a block chain of a corresponding node in a block chain network.
3. The method of claim 2, wherein generating identification information of the target data in the blockchain network comprises:
generating a corresponding hash value according to the target data;
and generating identification information of the target data in the block chain network according to the hash value.
4. The method of claim 3, wherein generating the corresponding hash value from the target data comprises:
encrypting the target data to obtain encrypted data, wherein the encryption comprises at least one of the following steps: encrypting by adopting a secret key and adding a digital signature;
and generating a corresponding hash value according to the encrypted data.
5. The method of claim 3, wherein generating identification information of the target data in the blockchain network according to the hash value comprises:
and converting the hash value into a corresponding hexadecimal numerical value, and using the hexadecimal numerical value as the identification information of the target data in the block chain network.
6. The method of claim 5, wherein before generating the identification information of the target data in the blockchain network according to the hash value, the method further comprises:
performing encryption processing on the hash value, wherein the encryption processing comprises at least one of the following steps: and encrypting by adopting a secret key and adding a digital signature.
7. The method of claim 2, wherein verifying the validity of the target data based on the identification information comprises:
performing service verification on the target data;
and under the condition that the target data passes service verification, verifying the legality of the target data based on the identification information.
8. The method according to claim 2, wherein, in a case that the target data passes service verification, verifying validity of the target data based on the identification information comprises:
under the condition that the target data passes service verification, judging whether the target data exists on a target block chain or not based on the identification information;
and under the condition that the target data does not exist in the target block chain, verifying the legality of the target data based on the identification information.
9. The method of claim 8, wherein storing the target data onto a blockchain of a corresponding node in a blockchain network comprises:
if the target data is recorded on the target block chain, other nodes in the block chain network synchronize the target data to the corresponding block chain;
if the target data is not recorded on the target blockchain, the nodes of the target blockchain broadcast the target data to other nodes on the blockchain network, wherein the target data verified by any one node is stored on the corresponding blockchain.
10. A processing apparatus for storing service data on a blockchain, comprising:
the acquisition unit is used for acquiring the service data and defining the transaction type of the service data in a configuration file;
the building unit is used for building target data to be uploaded to a block chain network according to the business data based on a building method corresponding to the transaction type, and comprises the following steps: the method comprises the steps of constructing common transaction data, calling a corresponding construction method according to the transaction type to process the service data, calling a construction method of a functional service class according to functional requirements to construct service transaction data when constructing the target data to be uploaded to a block chain network, and constructing the target data according to the functional service data and main process data;
and the storage unit is used for storing the target data to the block chain of the corresponding node in the block chain network.
CN201810434004.9A 2018-05-08 2018-05-08 Processing method and device for storing service data on block chain Active CN108646983B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810434004.9A CN108646983B (en) 2018-05-08 2018-05-08 Processing method and device for storing service data on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810434004.9A CN108646983B (en) 2018-05-08 2018-05-08 Processing method and device for storing service data on block chain

Publications (2)

Publication Number Publication Date
CN108646983A CN108646983A (en) 2018-10-12
CN108646983B true CN108646983B (en) 2021-04-06

Family

ID=63749431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810434004.9A Active CN108646983B (en) 2018-05-08 2018-05-08 Processing method and device for storing service data on block chain

Country Status (1)

Country Link
CN (1) CN108646983B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768203A (en) * 2018-11-07 2020-10-13 阿里巴巴集团控股有限公司 Meckel tree construction and simple payment verification method and device
CN110011800B (en) 2018-11-07 2020-04-14 阿里巴巴集团控股有限公司 Block chain data reading method and device
CN109509095B (en) * 2018-11-14 2023-05-02 成都皓图智能科技有限责任公司 Video active identification method combined with block chain
CN109587238B (en) * 2018-12-03 2021-08-03 百度在线网络技术(北京)有限公司 Data processing and synchronizing method, device, equipment and storage medium of block chain
CN111429134A (en) * 2018-12-21 2020-07-17 北京京东尚科信息技术有限公司 Data transaction method and device based on block chain
CN109743198A (en) * 2018-12-25 2019-05-10 中链科技有限公司 Intelligent block network establishing method and system
CN109766727B (en) * 2018-12-25 2021-04-06 苏州朗润创新知识产权运营有限公司 Intelligent block network construction method and system
CN109902494A (en) * 2019-01-24 2019-06-18 北京融链科技有限公司 Data encryption storage method, device and document storage system
CN110020548B (en) * 2019-01-31 2020-04-28 阿里巴巴集团控股有限公司 Method and device for hiding transaction written into block chain
WO2019228572A2 (en) * 2019-09-12 2019-12-05 Alibaba Group Holding Limited Log-structured storage systems
WO2019228568A2 (en) 2019-09-12 2019-12-05 Alibaba Group Holding Limited Log-structured storage systems
CN110493268B (en) * 2019-09-24 2022-06-24 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain network and storage medium
CN111078700A (en) * 2019-12-13 2020-04-28 山东众阳健康科技集团有限公司 Data synchronization method and system based on block chain
CN111259413A (en) * 2020-01-10 2020-06-09 上海旺链信息科技有限公司 Data management method and device based on block chain
CN111339203B (en) * 2020-02-28 2023-07-14 北京金和网络股份有限公司 Block chain data acquisition method, device and system
CN111311832A (en) * 2020-03-04 2020-06-19 长春市万易科技有限公司 Gas payment method based on block chain
CN111478948B (en) * 2020-03-20 2023-02-17 深圳市芯链科技有限公司 Block chain access method, internet of things equipment and storage medium
CN111461886B (en) * 2020-04-01 2022-02-01 杭州溪塔科技有限公司 Management method and device for system configuration independent of intelligent contracts on block chains
CN112311881B (en) * 2020-10-30 2022-05-20 中国联合网络通信集团有限公司 Visible optical network sharing method based on block chain and visible optical network equipment
CN112434040B (en) * 2020-11-30 2023-09-22 泰康保险集团股份有限公司 Data storage method, data acquisition method, device, system and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025559A (en) * 2017-01-26 2017-08-08 阿里巴巴集团控股有限公司 A kind of method for processing business and device
CN107180350A (en) * 2017-03-31 2017-09-19 唐晓领 A kind of method of the multi-party shared transaction metadata based on block chain, apparatus and system
CN107403379A (en) * 2017-08-07 2017-11-28 质数智慧科技(成都)有限公司 A kind of data processing method, device and block chain Core distribution formula system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG10201808109QA (en) * 2014-07-11 2018-10-30 Loyyal Corp Distributed ledger protocol to incentivize transactional and non-transactional commerce
US10565570B2 (en) * 2016-09-27 2020-02-18 The Toronto-Dominion Bank Processing network architecture with companion database
CN111724150B (en) * 2017-03-28 2023-11-24 创新先进技术有限公司 Service request processing method and device
CN110365491B (en) * 2017-03-30 2021-03-26 腾讯科技(深圳)有限公司 Service processing method, device, equipment, storage medium and data sharing system
CN107315786B (en) * 2017-06-12 2020-12-11 腾讯科技(深圳)有限公司 Service data storage method and device
CN107332835A (en) * 2017-06-26 2017-11-07 深圳前海华深安信物联技术有限公司 The creation method of block chain in a kind of warehouse receipt system
CN107562775B (en) * 2017-07-14 2020-04-24 创新先进技术有限公司 Data processing method and device based on block chain
CN107657509B (en) * 2017-09-19 2021-05-28 前海云链科技(深圳)有限公司 Credit investigation method and device based on block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025559A (en) * 2017-01-26 2017-08-08 阿里巴巴集团控股有限公司 A kind of method for processing business and device
CN107180350A (en) * 2017-03-31 2017-09-19 唐晓领 A kind of method of the multi-party shared transaction metadata based on block chain, apparatus and system
CN107403379A (en) * 2017-08-07 2017-11-28 质数智慧科技(成都)有限公司 A kind of data processing method, device and block chain Core distribution formula system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"区块链技术在会计中的应用展望";钟玮;《会计之友》;20160905(第17期);第122-125页 *
"基于区块链技术的电子证照共享平台设计";闵旭蓉;《指挥信息系统与技术》;20170504;第8卷(第2期);第47-51页 *

Also Published As

Publication number Publication date
CN108646983A (en) 2018-10-12

Similar Documents

Publication Publication Date Title
CN108646983B (en) Processing method and device for storing service data on block chain
CN106982203B (en) Robust ATM network system based on block chain technology and information processing method thereof
CN110046996B (en) Data processing method and device
CN108734028B (en) Data management method based on block chain, block chain link point and storage medium
CN107770159B (en) Vehicle accident data recording method and related device and readable storage medium
CN111556120B (en) Data processing method and device based on block chain, storage medium and equipment
CN111130770B (en) Information certification method and system based on blockchain, user terminal, electronic equipment and storage medium
CN110096903B (en) Asset verification method based on block chain and block chain network system
CN101022337A (en) Network identification card realizing method
CN109194633B (en) Address book backup method and system
CN110995446B (en) Evidence verification method, device, server and storage medium
CN111460400A (en) Data processing method and device and computer readable storage medium
CN102891856A (en) Safe access method between plural entity and plural entity identity relaying party
CN112446039A (en) Block chain transaction processing method, device, equipment and storage medium
CN113872932A (en) Method, system, terminal and storage medium for authenticating interface between micro services
CN110866261A (en) Data processing method and device based on block chain and storage medium
CN111680013A (en) Data sharing method based on block chain, electronic equipment and device
CN111241492A (en) Product multi-tenant secure credit granting method, system and electronic equipment
CN111212026A (en) Data processing method and device based on block chain and computer equipment
CN109951416B (en) Credible verification method and terminal
CN111818087B (en) Block chain node access method, device, equipment and readable storage medium
CN113722749A (en) Data processing method and device for block chain BAAS service based on encryption algorithm
CN114553444B (en) Identity authentication method, identity authentication device and storage medium
CN113726515B (en) UKEY-based key processing method, storage medium and electronic device
CN110401533B (en) Private key encryption method and device

Legal Events

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