CN108717466A - Collage-credit data storage method, device, computer equipment and storage medium - Google Patents

Collage-credit data storage method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108717466A
CN108717466A CN201810575553.8A CN201810575553A CN108717466A CN 108717466 A CN108717466 A CN 108717466A CN 201810575553 A CN201810575553 A CN 201810575553A CN 108717466 A CN108717466 A CN 108717466A
Authority
CN
China
Prior art keywords
block
newly
built
message
block chain
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
CN201810575553.8A
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201810575553.8A priority Critical patent/CN108717466A/en
Publication of CN108717466A publication Critical patent/CN108717466A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

This application discloses a kind of collage-credit data storage method, device, computer equipment and storage mediums.This method includes:If detected that reference information is transmitted to block chain, a block is created, by the block that the write-in of reference information is newly-built, obtains current block chain;If detecting reference inquiry request, reference inquiry request is sent to each block in current block chain;Each block, which corresponds to reference inquiry request, in current block chain executes intelligent contract, obtains implementing result, implementing result is sent to further newly-built block;Further newly-built block is verified by each block of current block chain, judges whether further newly-built block meets endorsement strategy;If further newly-built block meets endorsement strategy, current block chain is added in further newly-built block.Big, correlation that the method achieve collected reference information data amounts is relatively strong and data can not distort, it is ensured that the accuracy of reference information.

Description

Collage-credit data storage method, device, computer equipment and storage medium
Technical field
This application involves credit investigation system technical fields more particularly to a kind of collage-credit data storage method, device, computer to set Standby and storage medium.
Background technology
Although a large amount of enterprise attempts all to obtain the user information of magnanimity from various dimensions now at present, from reference angle Degree sees that these data still have problems with:
1) data volume is insufficient:Data volume is bigger, and obtainable value nature is higher, and there are one for data generation effective value A lower limit, the data volume less than lower limit can not generate effective value;
2) degree of correlation is poor:Most crucial data also tend to be most sensitive, in privacy highly sensitive today, Yong Hudou It is not intended to expose excessive data to third party, therefore to get active ingredient in data in fact seldom for enterprise;
3) timeliness is insufficient:The user data that enterprise can get from bright face is often out-of-date, or even is existed empty False information causes severe jamming to the confidence level of correlation analysis.
Invention content
This application provides a kind of collage-credit data storage method, device, computer equipment and storage mediums, it is intended to solve existing There is the problem that collage-credit data data volume is insufficient, the degree of correlation is poor and timeliness is insufficient in technology.
In a first aspect, this application provides a kind of collage-credit data storage methods comprising:
If detected that reference information is transmitted to block chain, a block is created, the block that the write-in of reference information is created, Obtain current block chain;
If detecting reference inquiry request, reference inquiry request is sent to each block in current block chain;
Each block, which corresponds to reference inquiry request, in current block chain executes intelligent contract, obtains implementing result, will hold Row result is sent to further newly-built block;
Further newly-built block is verified by each block of current block chain, judges that further newly-built block is It is no to meet endorsement strategy;
If further newly-built block meets endorsement strategy, current block chain is added in further newly-built block.
Second aspect, this application provides a kind of collage-credit data storage devices comprising:
Block creates unit, if when for having detected that reference information is transmitted to block chain, creating a block, reference is believed The newly-built block of breath write-in, obtains current block chain;
If reference inquiry request is sent to current block chain by request transmitting unit for detecting reference inquiry request In each block;
Execution unit is asked, reference inquiry request is corresponded to for each block in current block chain and executes intelligent contract, Implementing result is obtained, implementing result is sent to further newly-built block;
Endorsement policy validation unit tests further newly-built block for each block by current block chain Card, judges whether further newly-built block meets endorsement strategy;
Unit is added in block, if meeting endorsement strategy for further newly-built block, further newly-built block addition is worked as Preceding block chain.
The third aspect, the application provide a kind of computer equipment again, including memory, processor and are stored in described deposit On reservoir and the computer program that can run on the processor, the processor realize this when executing the computer program Any one of them collage-credit data storage method provided is provided.
Fourth aspect, present invention also provides a kind of storage mediums, wherein the storage medium is stored with computer program, The computer program includes program instruction, and described program instruction makes the processor execute the application when being executed by a processor Any one of them collage-credit data storage method of offer.
A kind of collage-credit data storage method of the application offer, device, computer equipment and storage medium.If this method by When having detected that reference information is transmitted to block chain, a block is created, the block that the write-in of reference information is newly-built obtains working as proparea Block chain;If detecting reference inquiry request, reference inquiry request is sent to each block in current block chain;Current block chain In each block reference inquiry request corresponded to execute intelligent contract, obtain implementing result, implementing result be sent to another new The block built;Further newly-built block is verified by each block of current block chain, judges further newly-built block Whether endorsement strategy is met;If further newly-built block meets endorsement strategy, current block chain is added in further newly-built block. Big, correlation that the method achieve collected reference information data amounts is relatively strong and data can not distort, it is ensured that reference information Accuracy.
Description of the drawings
It, below will be to needed in embodiment description in order to illustrate more clearly of the embodiment of the present application technical solution Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is some embodiments of the present application, general for this field For logical technical staff, without creative efforts, other drawings may also be obtained based on these drawings.
Fig. 1 is a kind of schematic flow diagram of collage-credit data storage method provided by the embodiments of the present application;
Fig. 2 is a kind of another schematic flow diagram of collage-credit data storage method provided by the embodiments of the present application;
Fig. 3 is a kind of sub-process schematic diagram of collage-credit data storage method provided by the embodiments of the present application;
Fig. 4 is a kind of another schematic flow diagram of collage-credit data storage method provided by the embodiments of the present application;
Fig. 5 is a kind of another schematic flow diagram of collage-credit data storage method provided by the embodiments of the present application;
Fig. 6 is a kind of schematic block diagram of collage-credit data storage device provided by the embodiments of the present application;
Fig. 7 is a kind of another schematic block diagram of collage-credit data storage device provided by the embodiments of the present application;
Fig. 8 is a kind of subelement schematic block diagram of collage-credit data storage device provided by the embodiments of the present application;
Fig. 9 is a kind of another schematic block diagram of collage-credit data storage device provided by the embodiments of the present application;
Figure 10 is a kind of another schematic block diagram of collage-credit data storage device provided by the embodiments of the present application;
Figure 11 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.
Specific implementation mode
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation describes, it is clear that described embodiment is some embodiments of the present application, instead of all the embodiments.Based on this Shen Please in embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall in the protection scope of this application.
It should be appreciated that ought use in this specification and in the appended claims, term " comprising " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, element, component and/or its presence or addition gathered.
It is also understood that the term used in this present specification is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the application.As present specification and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in present specification and the appended claims is Refer to any combinations and all possible combinations of one or more of associated item listed, and includes these combinations.
Referring to Fig. 1, Fig. 1 is a kind of schematic flow diagram of collage-credit data storage method provided by the embodiments of the present application.It should Method is applied in server.As shown in Figure 1, the method comprising the steps of S101~S105.
If S101, when having detected that reference information is transmitted to block chain, creating a block, the write-in of reference information is newly-built Block obtains current block chain.
In the present embodiment, block chain (English full name is blockchain or block chain) is to use distributed data The intelligent peer-to-peer network of library identification, propagation and information-recording, is also referred to as worth internet.Block chain is referred to as area comprising one The list of block has the record of sustainable growth and marshalling.Each block include a timestamp and one with it is previous The link of block, in this way design block chain data can not be distorted, once record, area's data in the block will not It is reversible.Specifically, block includes block head and block body, block head is equivalent to the essential information of current block, including version number, The cryptographic Hash of a upper block, Merkle roots address, timestamp, difficulty value, the information such as random number;Block body is then corresponding data Memory space can be used to store reference information.
A block cryptographic Hash and other key parameters of the block are stored in i.e. each block.It is every due to knowing Multiple blocks have been conspired to create block chain by the cryptographic Hash of the upper block corresponding to one block by this mode.If having detected When reference information is transmitted to block chain, a block is created, by the block that the write-in of reference information is newly-built, the reference information of this write-in It is that can not distort.And the block due to being extended to magnanimity on block chain, as long as therefore having the write-in of reference information, the block The reference information of magnanimity can be stored on chain.
For example, bank obtains its reference information to a certain new user, which includes name, gender, the age, goes out Phase birthday, marital status, loan limit, inhabitation address, telephone number, wage and salary account, annual income, title and rank, Guarantee Status, The information such as amount of guarantee.The reference information can data mode be stored in block.
In one embodiment, as shown in Fig. 2, another specific embodiment as step S101, including:
If S101a, when having detected that reference information is transmitted to block chain, creating a block, obtaining the upper of newly-built block One block cryptographic Hash, and the newly-built block of upper block cryptographic Hash write-in is worked as the block that the write-in of reference information is newly-built Preceding block chain.
It, can be by the way that upper block cryptographic Hash be write in order to ensure concatenating each block in block chain in the present embodiment Enter newly-built block, to establish contacting for each block and a upper block.Specifically, can be corresponding to the block head of the above block Message carry out a kind of SHA-256 (it is safe Encryption Standard algorithm) operation, obtain a block cryptographic Hash and be written create Block.
In one embodiment, as shown in figure 3, step S101a includes:
S101a1, message corresponding to the block head of a upper block in current block chain is obtained, bit benefit is carried out to message , remainder is 448 after corresponding 512 modulus of length pair of message after cover;
If the length of the message after S101a2, cover is beyond 512, by the length of the message after cover by mending 0, until The multiple that the message-length after 0 is 512 is mended to obtain initial message abstract;
S101a3, initial message abstract is divided into multiple 512 data blocks, Hash initial value is by multiple 512 After carrying out operation in data block, result of calculation brings the latter data block into successively, until obtaining Hash final value;
S101a4, the eap-message digest that 8 32 character strings of Hash final value are connected into 256, obtain a block Block cryptographic Hash.
In the present embodiment, used SHA-256 algorithms are no more than 2^64bit to the maximum length of incoming message, defeated Enter and handled by 512-bit groupings, the output of generation is the message digest of a 256-bit.Wherein, computer program design In have MOD operations (i.e. modulo operation), it be meant that obtain two integral divides after result remainder, such as 7mod 3=1. The algorithm process includes the following steps:
1) additional padding bits.Being filled to message makes message length and 448 mould, 512 congruence (i.e. length=448mod 512), the bit number range of filling is 1 to 512, and the highest order of filling bit string is 1, remaining position is 0.Namely first in message Below plus one 1, then add many 0, until length meets and 448 mould, 512 congruence.
2) additional length value.The bit length of the initial message (before filling) indicated with 64-bit is attached to the knot of step 1) After fruit (low byte is preferential).
3) initialization caching.Centre and the final result of the hash function are stored using the caching of a 256-bit.It should Caching is expressed as A=0x6A09E667, B=0xBB67AE85, C=0x3C6EF372, D=0xA54FF53A, E= 0x510E527F, F=0x9B05688C, G=0x1F83D9AB, H=0x5BE0CD19.
4) 512-bit (16 words) message packet sequence is handled.The algorithm has used six kinds of basic logic functions, by 64 steps Interative computation forms.It is input with 256-bit cache sizes ABCDEFGH often to walk all, then updates cache contents.Often step uses one An a 32-bit constant values Kt and 32-bit Wt.
After all 512-bit packet transactions, for SHA-256 algorithms, the last one, which is grouped the output generated, is The eap-message digest of 256-bit.
If S102, detecting reference inquiry request, reference inquiry request is sent to each block in current block chain.
In the present embodiment, due to the characteristics of block chain be its can not tamper, therefore its Information Security is high.The area In addition to the reference information of storage client in block chain, the information that reference information is queried each time can also be stored, namely look into every time Consultation record can be recorded by a newly-built block.If detecting reference inquiry request, reference inquiry request is sent to Each block in current block chain, at this time by creating the demand of block, needs to solicit Yuan Qu its object is to notify each block The agreement of each block in block chain.
Each block, which corresponds to reference inquiry request, in S103, current block chain executes intelligent contract, obtains implementing result, Implementing result is sent to further newly-built block.
Wherein, it if each block receives reference inquiry request in current block chain, needs to execute intelligent contract.
So-called intelligence contract, is exactly digitized papery contract, is not required to very important person and goes to execute, but can automatically be held by computer Capable agreement terms.
The structure of intelligent contract:A intelligent contract is participated and draw jointly by multiple users in block chain;
The storage of intelligent contract:Intelligent contract is diffused into each node by P2P networks, and is stored in block chain;
The execution of intelligent contract:Intelligent contract periodically carries out state of automata inspection, and the affairs for the condition that meets are tested Card, executes after reaching common understanding and notifies user automatically.
Generally, it is exactly after contract maker formulates contract, converting treaty content to programming language, there are areas (private key for being returned to maker with block chain is needed to sign) on block platform chain, contract is complete in block chain by way of P2P It is spread in net, each node can receive a (being equivalent to the countless personal contents preserved and supervise this part of contract), work as the time When properly and meeting treaty content, this contract will be executed automatically.
In one embodiment, as shown in figure 4, another specific embodiment as step S103, including:
Each block, which corresponds to reference inquiry request, in S103a, current block chain executes intelligent contract, obtains executing knot Fruit is sent to the common recognition serving network node for generating new block in block chain, common recognition clothes after implementing result is signed The reference inquiry request that business network node receives, which is ranked up in reference pond and combines to be packaged, generates further newly-built area Implementing result is sent to further newly-built block by block.
In the present embodiment, result sign and be sent in block chain by each block after executing intelligent contract (node as common recognition serving network node, responsible collection transaction request is ranked up and is packaged to be produced newly Orderer nodes Block, main functionality are that transaction sequence is also contained ACL and visited to ensure the data consistency on each Peer nodes Ask control), the reference inquiry request received is ranked up in reference pond and combines packing by Orderer nodes generates one New block is sent to all blocks by a new block, Orderer nodes.
S104, further newly-built block is verified by each block of current block chain, what judgement further created Whether block meets endorsement strategy.
If S105, further newly-built block meet endorsement strategy, current block chain is added in further newly-built block.
Wherein, if each block reception of current block chain is to the block further created, it is carried out verifying whether to accord with Close endorsement strategy, if meet endorsement strategy if will inquiry record also in the form of block record namely whole block chain on both There is reference information, also there is inquiry record each time.
Endorsement tactful (endorsementpolicy) can be understood as the condition endorsed to transaction, i.e., to obtain It endorses successful conclusion, it is necessary to meet the condition provided in endorsement strategy.Block chain node has preassigned endorsement set of strategies, The set of strategies of these endorsements is mounted with specific chain code, and it is specified to have pre-installed its deployment transaction.All transaction all must be according to It is traded according to endorsement strategy, because only that the transaction by endorsement processing is only legal, approved transaction.Only according to the back of the body Book strategy has carried out endorsement processing, and statement that just can be legal is merchandised.Here, to realize the calling transaction of chain code, first have to The endorsement for meeting chain code policies is obtained, otherwise it is not allow to submit.It just needs by submitting client and endorsement at this Interaction between node is realized.
In one embodiment, as shown in figure 5, further including after step S105:
S106, SHA-256 operations are carried out to the block head corresponding to newly-built block, obtained corresponding to newly-built block Cryptographic Hash, the block that the cryptographic Hash write-in corresponding to newly-built block is further created.
Likewise, for further newly-built block, the cryptographic Hash of a block thereon is perhaps obtained, and upper block institute is right The block that the cryptographic Hash write-in answered further creates, the contact between autgmentability and data to ensure block chain.
As it can be seen that the method achieve collected reference information data amounts big, correlation is relatively strong and data can not distort, Ensure the accuracy of reference information.
The embodiment of the present application also provides a kind of collage-credit data storage device, and the collage-credit data storage device is aforementioned for executing Any embodiment of collage-credit data storage method.Specifically, referring to Fig. 6, Fig. 6 is a kind of reference provided by the embodiments of the present application The schematic block diagram of data storage device.Collage-credit data storage device 100 can be configured in server.
As shown in fig. 6, collage-credit data storage device 100, which includes block, creates unit 101, request transmitting unit 102, request Unit 105 is added in execution unit 103, endorsement policy validation unit 104 and block.
Block creates unit 101, if when for having detected that reference information is transmitted to block chain, creating a block, levying The newly-built block of letter information write-in, obtains current block chain.
In the present embodiment, block chain (English full name is blockchain or block chain) is to use distributed data The intelligent peer-to-peer network of library identification, propagation and information-recording, is also referred to as worth internet.Block chain is referred to as area comprising one The list of block has the record of sustainable growth and marshalling.Each block include a timestamp and one with it is previous The link of block, in this way design block chain data can not be distorted, once record, area's data in the block will not It is reversible.Specifically, block includes block head and block body, block head is equivalent to the essential information of current block, including version number, The cryptographic Hash of a upper block, Merkle roots address, timestamp, difficulty value, the information such as random number;Block body is then corresponding data Memory space can be used to store reference information.
A block cryptographic Hash and other key parameters of the block are stored in i.e. each block.It is every due to knowing Multiple blocks have been conspired to create block chain by the cryptographic Hash of the upper block corresponding to one block by this mode.If having detected When reference information is transmitted to block chain, a block is created, by the block that the write-in of reference information is newly-built, the reference information of this write-in It is that can not distort.And the block due to being extended to magnanimity on block chain, as long as therefore having the write-in of reference information, the block The reference information of magnanimity can be stored on chain.
For example, bank obtains its reference information to a certain new user, which includes name, gender, the age, goes out Phase birthday, marital status, loan limit, inhabitation address, telephone number, wage and salary account, annual income, title and rank, Guarantee Status, The information such as amount of guarantee.The reference information can data mode be stored in block.
In one embodiment, as shown in fig. 7, creating the another specific embodiment of unit 101 as block, collage-credit data is deposited Storage device 100 includes:
Cryptographic Hash writing unit 101a, if when for having detected that reference information is transmitted to block chain, creating a block, obtaining The upper block cryptographic Hash of newly-built block is taken, and by the newly-built block of upper block cryptographic Hash write-in, reference information is written Newly-built block obtains current block chain.
It, can be by the way that upper block cryptographic Hash be write in order to ensure concatenating each block in block chain in the present embodiment Enter newly-built block, to establish contacting for each block and a upper block.Specifically, can be corresponding to the block head of the above block Message carry out a kind of SHA-256 (it is safe Encryption Standard algorithm) operation, obtain a block cryptographic Hash and be written create Block.
In one embodiment, as shown in figure 8, cryptographic Hash writing unit 101a includes:
Bit cover unit 101a1 is right for obtaining message corresponding to the block head of a upper block in current block chain Message carries out bit cover, until remainder is 448 after corresponding 512 modulus of length pair of message after cover;
Long unit 101a2 is mended, if the length for the message after cover is beyond 512, by the length of the message after cover By mending 0, until mending the multiple that the message-length after 0 is 512 to obtain initial message abstract;
Hash operation unit 101a3, for initial message abstract to be divided into multiple 512 data blocks, Hash initial value After carrying out operation in multiple 512 data blocks, result of calculation brings the latter data block into successively, until obtaining Hash end Value;
Cryptographic Hash concatenation unit 101a4, the message for 8 32 character strings of Hash final value to be connected into 256 are plucked It wants, obtains the block cryptographic Hash of a block.
In the present embodiment, used SHA-256 algorithms are no more than 2^64bit to the maximum length of incoming message, defeated Enter and handled by 512-bit groupings, the output of generation is the message digest of a 256-bit.Wherein, computer program design In have MOD operations (i.e. modulo operation), it be meant that obtain two integral divides after result remainder, such as 7mod 3=1. The algorithm process includes the following steps:
1) additional padding bits.Being filled to message makes message length and 448 mould, 512 congruence (i.e. length=448mod 512), the bit number range of filling is 1 to 512, and the highest order of filling bit string is 1, remaining position is 0.Namely first in message Below plus one 1, then add many 0, until length meets and 448 mould, 512 congruence.
2) additional length value.The bit length of the initial message (before filling) indicated with 64-bit is attached to the knot of step 1) After fruit (low byte is preferential).
3) initialization caching.Centre and the final result of the hash function are stored using the caching of a 256-bit.It should Caching is expressed as A=0x6A09E667, B=0xBB67AE85, C=0x3C6EF372, D=0xA54FF53A, E= 0x510E527F, F=0x9B05688C, G=0x1F83D9AB, H=0x5BE0CD19.
4) 512-bit (16 words) message packet sequence is handled.The algorithm has used six kinds of basic logic functions, by 64 steps Interative computation forms.It is input with 256-bit cache sizes ABCDEFGH often to walk all, then updates cache contents.Often step uses one An a 32-bit constant values Kt and 32-bit Wt.
After all 512-bit packet transactions, for SHA-256 algorithms, the last one, which is grouped the output generated, is The eap-message digest of 256-bit.
If reference inquiry request is sent to current block by request transmitting unit 102 for detecting reference inquiry request Each block in chain.
In the present embodiment, due to the characteristics of block chain be its can not tamper, therefore its Information Security is high.The area In addition to the reference information of storage client in block chain, the information that reference information is queried each time can also be stored, namely look into every time Consultation record can be recorded by a newly-built block.If detecting reference inquiry request, reference inquiry request is sent to Each block in current block chain, at this time by creating the demand of block, needs to solicit Yuan Qu its object is to notify each block The agreement of each block in block chain
Execution unit 103 is asked, reference inquiry request is corresponded to for each block in current block chain and executes intelligent close About, implementing result is obtained, implementing result is sent to further newly-built block.
Wherein, it if each block receives reference inquiry request in current block chain, needs to execute intelligent contract.
So-called intelligence contract, is exactly digitized papery contract, is not required to very important person and goes to execute, but can automatically be held by computer Capable agreement terms.
The structure of intelligent contract:A intelligent contract is participated and draw jointly by multiple users in block chain;
The storage of intelligent contract:Intelligent contract is diffused into each node by P2P networks, and is stored in block chain;
The execution of intelligent contract:Intelligent contract periodically carries out state of automata inspection, and the affairs for the condition that meets are tested Card, executes after reaching common understanding and notifies user automatically.
Generally, it is exactly after contract maker formulates contract, converting treaty content to programming language, there are areas (private key for being returned to maker with block chain is needed to sign) on block platform chain, contract is complete in block chain by way of P2P It is spread in net, each node can receive a (being equivalent to the countless personal contents preserved and supervise this part of contract), work as the time When properly and meeting treaty content, this contract will be executed automatically.
In one embodiment, as shown in figure 9, as the another specific embodiment for asking execution unit 103, further include:
Implementing result processing unit 103a corresponds to reference inquiry request for each block in current block chain and executes intelligence Energy contract, obtains implementing result, and the common recognition clothes for generating new block in block chain are sent to after implementing result is signed The reference inquiry request received is ranked up in reference pond and combines packing by business network node, common recognition serving network node Further newly-built block is generated, implementing result is sent to further newly-built block.
In the present embodiment, result sign and be sent in block chain by each block after executing intelligent contract (node as common recognition serving network node, responsible collection transaction request is ranked up and is packaged to be produced newly Orderer nodes Block, main functionality are that transaction sequence is also contained ACL and visited to ensure the data consistency on each Peer nodes Ask control), the reference inquiry request received is ranked up in reference pond and combines packing by Orderer nodes generates one New block is sent to all blocks by a new block, Orderer nodes.
Endorsement policy validation unit 104 carries out further newly-built block for each block by current block chain Verification, judges whether further newly-built block meets endorsement strategy.
Unit 105 is added in block, if meeting endorsement strategy for further newly-built block, further newly-built block is added Current block chain.
Wherein, if each block reception of current block chain is to the block further created, it is carried out verifying whether to accord with Close endorsement strategy, if meet endorsement strategy if will inquiry record also in the form of block record namely whole block chain on both There is reference information, also there is inquiry record each time.
Endorsement tactful (endorsementpolicy) can be understood as the condition endorsed to transaction, i.e., to obtain It endorses successful conclusion, it is necessary to meet the condition provided in endorsement strategy.Block chain node has preassigned endorsement set of strategies, The set of strategies of these endorsements is mounted with specific chain code, and it is specified to have pre-installed its deployment transaction.All transaction all must be according to It is traded according to endorsement strategy, because only that the transaction by endorsement processing is only legal, approved transaction.Only according to the back of the body Book strategy has carried out endorsement processing, and statement that just can be legal is merchandised.Here, to realize the calling transaction of chain code, first have to The endorsement for meeting chain code policies is obtained, otherwise it is not allow to submit.It just needs by submitting client and endorsement at this Interaction between node is realized.
In one embodiment, as shown in Figure 10, collage-credit data storage device 100 further includes:
Cryptographic Hash supplementary units 106 are obtained for carrying out SHA-256 operations to the block head corresponding to newly-built block Cryptographic Hash corresponding to newly-built block, the block that the cryptographic Hash write-in corresponding to newly-built block is further created.
Likewise, for further newly-built block, the cryptographic Hash of a block thereon is perhaps obtained, and upper block institute is right The block that the cryptographic Hash write-in answered further creates, the contact between autgmentability and data to ensure block chain.
As it can be seen that the arrangement achieves collected reference information data amounts big, correlation is relatively strong and data can not distort, Ensure the accuracy of reference information.
Above-mentioned collage-credit data storage device can be implemented as a kind of form of computer program, which can be It is run on computer equipment as shown in figure 11.
Please refer to Fig.1 the schematic block diagram that 1, Figure 11 is a kind of computer equipment provided by the embodiments of the present application.The calculating 500 equipment of machine equipment can be server.
Refering to fig. 11, which includes processor 502, memory and the net connected by system bus 501 Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program 5032 include program instruction, which is performed, and processor 502 may make to execute a kind of collage-credit data storage method.
The processor 502 supports the operation of entire computer equipment 500 for providing calculating and control ability.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of collage-credit data storage method.
The network interface 505 such as sends the task dispatching of distribution for carrying out network communication.Those skilled in the art can manage It solves, structure is not constituted only with the block diagram of the relevant part-structure of application scheme to the application side shown in Figure 11 The restriction for the computer equipment 500 that case is applied thereon, specific computer equipment 500 may include more than as shown in the figure Or less component, it either combines certain components or is arranged with different components.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following work( Energy:If detected that reference information is transmitted to block chain, a block is created, the block that the write-in of reference information is newly-built obtains Current block chain;If detecting reference inquiry request, reference inquiry request is sent to each block in current block chain;Currently Each block, which corresponds to reference inquiry request, in block chain executes intelligent contract, obtains implementing result, implementing result is sent to Further newly-built block;Further newly-built block is verified by each block of current block chain, is judged another newly-built Block whether meet endorsement strategy;If further newly-built block meets endorsement strategy, further newly-built block is added current Block chain.
In one embodiment, processor 502 also executes following operation:The upper block cryptographic Hash of newly-built block is obtained, And the block for creating the write-in of upper block cryptographic Hash.
In one embodiment, processor 502 also executes following operation:Obtain the block head of a upper block in current block chain Corresponding message carries out bit cover to message, until remainder is after corresponding 512 modulus of length pair of message after cover 448;If the length of the message after cover is beyond 512, by the length of the message after cover by mending 0, until mending the message after 0 The multiple that length is 512 is to obtain initial message abstract;Initial message abstract is divided into multiple 512 data blocks, Hash For initial value after carrying out operation in multiple 512 data blocks, result of calculation brings the latter data block into successively, until being breathed out Uncommon final value;The eap-message digest that 8 32 character strings of Hash final value are connected into 256, obtains the block Hash of a block Value.
In one embodiment, processor 502 also executes following operation:Block chain is sent to after implementing result is signed In for generating the common recognition serving network node of new block;Common recognition serving network node is levying the reference inquiry request received It is ranked up in letter pond and combines to be packaged and generate further newly-built block.
In one embodiment, processor 502 also executes following operation:Block head corresponding to newly-built block is carried out SHA-256 operations obtain the cryptographic Hash corresponding to newly-built block, and the cryptographic Hash write-in corresponding to newly-built block is another new The block built.
It will be understood by those skilled in the art that the embodiment of computer equipment shown in Figure 11 is not constituted to computer The restriction of equipment specific composition, in other embodiments, computer equipment may include components more more or fewer than diagram, or Person combines certain components or different components arrangement.For example, in some embodiments, computer equipment can only include depositing Reservoir and processor, in such embodiments, the structure and function of memory and processor are consistent with embodiment illustrated in fig. 11, Details are not described herein.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable GateArray, FPGA) or other programmable logic devices Part, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or The processor can also be any conventional processor etc..
A kind of storage medium is provided in another embodiment of the application.The storage medium can be computer-readable storage Medium.The storage medium is stored with computer program, and wherein computer program includes program instruction.The program instruction is by processor It is realized when execution:If detected that reference information is transmitted to block chain, a block is created, by the area that the write-in of reference information is newly-built Block obtains current block chain;If detecting reference inquiry request, reference inquiry request is sent to each area in current block chain Block;Each block, which corresponds to reference inquiry request, in current block chain executes intelligent contract, implementing result is obtained, by implementing result It is sent to further newly-built block;Further newly-built block is verified by each block of current block chain, is judged again Whether one newly-built block meets endorsement strategy;If further newly-built block meets endorsement strategy, further newly-built block is added Enter current block chain.
In one embodiment, it is realized when which is executed by processor:The upper block for obtaining newly-built block is breathed out Uncommon value, and the block that the write-in of upper block cryptographic Hash is created.
In one embodiment, it is realized when which is executed by processor:Obtain a upper block in current block chain Message corresponding to block head carries out bit cover to message, until remaining after corresponding 512 modulus of length pair of message after cover Number is 448;If the length of the message after cover is beyond 512, by the length of the message after cover by mending 0, until after mending 0 The multiple that message-length is 512 is to obtain initial message abstract;Initial message abstract is divided into multiple 512 data blocks, For Hash initial value after carrying out operation in multiple 512 data blocks, result of calculation brings the latter data block into successively, until To Hash final value;The eap-message digest that 8 32 character strings of Hash final value are connected into 256, obtains the block of a block Cryptographic Hash.
In one embodiment, it is realized when which is executed by processor:It is sent to after implementing result is signed Common recognition serving network node in block chain for generating new block;Common recognition serving network node asks the reference received inquiry It asks to be ranked up and combine to be packaged in reference pond and generates further newly-built block.
In one embodiment, it is realized when which is executed by processor:To the block head corresponding to newly-built block SHA-256 operations are carried out, the cryptographic Hash corresponding to newly-built block is obtained, again by the cryptographic Hash write-in corresponding to newly-built block One newly-built block.
The storage medium can be the internal storage unit of aforementioned device, such as the hard disk or memory of equipment.It is described to deposit Storage media can also be the plug-in type hard disk being equipped on the External memory equipment of the equipment, such as the equipment, intelligent storage Block (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc.. Further, the storage medium can also both include the equipment internal storage unit and also including External memory equipment.
It is apparent to those skilled in the art that for convenience of description and succinctly, foregoing description is set The specific work process of standby, device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein. Those of ordinary skill in the art may realize that units and algorithm described in conjunction with the examples disclosed in the embodiments of the present disclosure Step can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and software Interchangeability generally describes each exemplary composition and step according to function in the above description.These functions are studied carefully Unexpectedly the specific application and design constraint depending on technical solution are implemented in hardware or software.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In several embodiments provided herein, it should be understood that disclosed unit and method, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner can also will have identical work( The unit set of energy can be combined or can be integrated into another system at a unit, such as multiple units or component, or Some features can be ignored or not executed.In addition, shown or discussed mutual coupling or direct-coupling or communication link It can be INDIRECT COUPLING or communication connection by some interfaces, device or unit to connect, and can also be electricity, mechanical or other Form connection.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the embodiment of the present invention Purpose.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, can also be during two or more units are integrated in one unit.It is above-mentioned integrated The form that hardware had both may be used in unit is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a storage medium.Based on this understanding, technical scheme of the present invention is substantially in other words to existing The all or part of part or the technical solution that technology contributes can be expressed in the form of software products, should Computer software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be Personal computer, server or network equipment etc.) execute all or part of step of each embodiment the method for the present invention Suddenly.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), magnetic disc or The various media that can store program code such as person's CD.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection domain subject to.

Claims (10)

1. a kind of collage-credit data storage method, which is characterized in that including:
If detected that reference information is transmitted to block chain, a block is created, the block that the write-in of reference information is newly-built obtains Current block chain;
If detecting reference inquiry request, reference inquiry request is sent to each block in current block chain;
Each block, which corresponds to reference inquiry request, in current block chain executes intelligent contract, obtains implementing result, will execute knot Fruit is sent to further newly-built block;
Further newly-built block is verified by each block of current block chain, judges whether further newly-built block accords with Close endorsement strategy;
If further newly-built block meets endorsement strategy, current block chain is added in further newly-built block.
2. collage-credit data storage method according to claim 1, which is characterized in that after a newly-built block, also wrap It includes:
Obtain the upper block cryptographic Hash of newly-built block, and the block that the write-in of upper block cryptographic Hash is created.
3. collage-credit data storage method according to claim 2, which is characterized in that described to obtain upper the one of newly-built block Block cryptographic Hash, including:
Message corresponding to the block head of a upper block in current block chain is obtained, bit cover is carried out to message, until cover Remainder is 448 after corresponding 512 modulus of length pair of message afterwards;
If the length of the message after cover is beyond 512, by the length of the message after cover by mending 0, until mending the message after 0 The multiple that length is 512 is to obtain initial message abstract;
Initial message abstract is divided into multiple 512 data blocks, Hash initial value, which passes through in multiple 512 data blocks, to carry out After operation, result of calculation brings the latter data block into successively, until obtaining Hash final value;
The eap-message digest that 8 32 character strings of Hash final value are connected into 256, obtains the block cryptographic Hash of a block.
4. collage-credit data storage method according to claim 1, which is characterized in that each block in the current block chain Reference inquiry request is corresponded to and executes intelligent contract, after obtaining implementing result, further includes:
The common recognition serving network node for generating new block in block chain is sent to after implementing result is signed;
The reference inquiry request received is ranked up in reference pond and combines packing and generates again by common recognition serving network node One newly-built block.
5. collage-credit data storage method according to claim 4, which is characterized in that described adds further newly-built block After entering current block chain, further include:
SHA-256 operations are carried out to the block head corresponding to newly-built block, obtain the cryptographic Hash corresponding to newly-built block, it will The block that cryptographic Hash write-in corresponding to newly-built block further creates.
6. a kind of collage-credit data storage device, which is characterized in that including:
Block creates unit, if when for having detected that reference information is transmitted to block chain, creating a block, reference information is write Enter newly-built block, obtains current block chain;
If reference inquiry request is sent in current block chain often by request transmitting unit for detecting reference inquiry request One block;
Execution unit is asked, reference inquiry request is corresponded to for each block in current block chain and executes intelligent contract, is obtained Implementing result is sent to further newly-built block by implementing result;
Endorsement policy validation unit is verified further newly-built block for each block by current block chain, is sentenced Whether the disconnected block further created meets endorsement strategy;
Unit is added in block, if meeting endorsement strategy for further newly-built block, proparea is worked as in further newly-built block addition Block chain.
7. collage-credit data storage device according to claim 6, which is characterized in that further include:
Cryptographic Hash writing unit, the upper block cryptographic Hash for obtaining newly-built block, and upper block cryptographic Hash is written Newly-built block.
8. collage-credit data storage device according to claim 7, which is characterized in that the cryptographic Hash writing unit, including:
Bit cover unit carries out message for obtaining message corresponding to the block head of a upper block in current block chain Bit cover, until cover after corresponding 512 modulus of length pair of message after remainder be 448;
Long unit is mended, if the length for the message after cover is beyond 512, by the length of the message after cover by mending 0, directly The multiple for being 512 to the message-length mended after 0 is made a summary with obtaining initial message;
Hash operation unit, for initial message abstract to be divided into multiple 512 data blocks, Hash initial value is by multiple After carrying out operation in 512 data blocks, result of calculation brings the latter data block into successively, until obtaining Hash final value;
Cryptographic Hash concatenation unit, the eap-message digest for 8 32 character strings of Hash final value to be connected into 256, obtains The block cryptographic Hash of one block.
9. a kind of computer equipment, including memory, processor and it is stored on the memory and can be on the processor The computer program of operation, which is characterized in that the processor is realized when executing the computer program as in claim 1-5 Any one of them collage-credit data storage method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with computer program, the computer program packet Program instruction is included, described program instruction makes the processor execute such as any one of claim 1-5 institutes when being executed by a processor The collage-credit data storage method stated.
CN201810575553.8A 2018-06-05 2018-06-05 Collage-credit data storage method, device, computer equipment and storage medium Pending CN108717466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810575553.8A CN108717466A (en) 2018-06-05 2018-06-05 Collage-credit data storage method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810575553.8A CN108717466A (en) 2018-06-05 2018-06-05 Collage-credit data storage method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN108717466A true CN108717466A (en) 2018-10-30

Family

ID=63912699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810575553.8A Pending CN108717466A (en) 2018-06-05 2018-06-05 Collage-credit data storage method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108717466A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508985A (en) * 2018-11-26 2019-03-22 平安科技(深圳)有限公司 Interface calls bookkeeping methods, device, computer equipment and storage medium
CN109617964A (en) * 2018-12-12 2019-04-12 成都四方伟业软件股份有限公司 Big data storage method and device based on block chain
CN110109929A (en) * 2019-04-30 2019-08-09 翟红鹰 Date storage method, device and computer readable storage medium
WO2019072282A3 (en) * 2018-11-27 2019-10-03 Alibaba Group Holding Limited Function-as-a-service (faas) platform in blockchain networks
CN110515591A (en) * 2019-08-05 2019-11-29 湖南天河国云科技有限公司 Random digit generation method and device based on block chain
CN110647439A (en) * 2019-08-15 2020-01-03 深圳壹账通智能科技有限公司 Method and device for confirming block chain system deployment, computer equipment and storage medium
CN110730078A (en) * 2019-10-10 2020-01-24 重庆特斯联智慧科技股份有限公司 Data information processing method and system
CN111694839A (en) * 2020-04-28 2020-09-22 平安科技(深圳)有限公司 Time series index construction method and device based on big data and computer equipment
CN115002119A (en) * 2022-08-01 2022-09-02 云上人和物联科技有限公司 Decentralized system and method based on different heterogeneous instruction sets
CN115065690A (en) * 2022-06-13 2022-09-16 四川省自主可控电子信息产业有限责任公司 Decentralized system and method based on different heterogeneous instruction sets

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651346A (en) * 2016-11-28 2017-05-10 上海凯岸信息科技有限公司 Block chain-based credit investigation data sharing and trading system
CN107704269A (en) * 2017-10-16 2018-02-16 中国银行股份有限公司 A kind of method and system based on block chain generation block
US20180114205A1 (en) * 2016-10-21 2018-04-26 Bank Of America Corporation Distributed ledger system for providing aggregate tracking and threshold triggering

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180114205A1 (en) * 2016-10-21 2018-04-26 Bank Of America Corporation Distributed ledger system for providing aggregate tracking and threshold triggering
CN106651346A (en) * 2016-11-28 2017-05-10 上海凯岸信息科技有限公司 Block chain-based credit investigation data sharing and trading system
CN107704269A (en) * 2017-10-16 2018-02-16 中国银行股份有限公司 A kind of method and system based on block chain generation block

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LWANTTOWIN: "SHA-256算法实现", 《CSDN》 *
TOFIXER: "安全散列算法SHA-256", 《博客园》 *
区块链的作坊: "比特币算法-SHA256算法介绍", 《新浪博客》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508985A (en) * 2018-11-26 2019-03-22 平安科技(深圳)有限公司 Interface calls bookkeeping methods, device, computer equipment and storage medium
TWI706647B (en) * 2018-11-27 2020-10-01 香港商阿里巴巴集團服務有限公司 Function as a service (FAAS) platform in blockchain network
WO2019072282A3 (en) * 2018-11-27 2019-10-03 Alibaba Group Holding Limited Function-as-a-service (faas) platform in blockchain networks
US10671380B2 (en) 2018-11-27 2020-06-02 Alibaba Group Holding Limited Function-as-a-service (FaaS) platform in blockchain networks
US10824419B2 (en) 2018-11-27 2020-11-03 Alibaba Group Holding Limited Function-as-a-service (FaaS) platform in blockchain networks
CN109617964A (en) * 2018-12-12 2019-04-12 成都四方伟业软件股份有限公司 Big data storage method and device based on block chain
CN109617964B (en) * 2018-12-12 2021-11-09 成都四方伟业软件股份有限公司 Big data storage method and device based on block chain
CN110109929A (en) * 2019-04-30 2019-08-09 翟红鹰 Date storage method, device and computer readable storage medium
CN110515591A (en) * 2019-08-05 2019-11-29 湖南天河国云科技有限公司 Random digit generation method and device based on block chain
CN110647439A (en) * 2019-08-15 2020-01-03 深圳壹账通智能科技有限公司 Method and device for confirming block chain system deployment, computer equipment and storage medium
CN110647439B (en) * 2019-08-15 2023-02-03 深圳壹账通智能科技有限公司 Method and device for confirming block chain system deployment, computer equipment and storage medium
CN110730078A (en) * 2019-10-10 2020-01-24 重庆特斯联智慧科技股份有限公司 Data information processing method and system
CN111694839A (en) * 2020-04-28 2020-09-22 平安科技(深圳)有限公司 Time series index construction method and device based on big data and computer equipment
CN115065690A (en) * 2022-06-13 2022-09-16 四川省自主可控电子信息产业有限责任公司 Decentralized system and method based on different heterogeneous instruction sets
CN115002119A (en) * 2022-08-01 2022-09-02 云上人和物联科技有限公司 Decentralized system and method based on different heterogeneous instruction sets

Similar Documents

Publication Publication Date Title
CN108717466A (en) Collage-credit data storage method, device, computer equipment and storage medium
CN110915164B (en) Processing blockchain data based on smart contract operations performed in trusted execution environments
US10642825B2 (en) System and method for interoperability of blockchains
TW202101440A (en) Cross-blockchain resource transmission
CN116843334A (en) Combined data transmission control method and system based on block chain
CN110751485B (en) Data processing method and equipment
EP3961457A1 (en) Data check methods, apparatuses, and devices
CN111444550A (en) Block chain-based service data verification method and device and readable storage medium
KR20200105997A (en) System and method for blockchain-based authentication
CN108573741A (en) Business datum recording method, device, equipment and storage medium
CN111066047A (en) Implementing a blockchain based workflow
CN106372499A (en) Systems and methods for securing virtual machine computing environments
WO2017148278A1 (en) Service implementation method, apparatus and system based on fix protocol
Goswami Scalability analysis of blockchains through blockchain simulation
TW202101350A (en) Method and device for cross-chain transmission of authenticable message based on processing module
CN108572986A (en) A kind of method and node device of data update
WO2020095278A1 (en) System and method for interoperability of blockchains
CN111368330A (en) Ethernet intelligent contract auditing system and method based on block chain
US20200118120A1 (en) Methods and systems for providing a customized network
CN112669157A (en) Transaction method, device and system based on block chain and readable storage medium
Belyaev et al. On the design and analysis of protocols for personal health record storage on personal data server devices
US20200051078A1 (en) Fair transaction ordering in blockchains
Mourouzis et al. Introduction to decentralization and smart contracts
Kirkman et al. Using smart contracts and blockchains to support consumer trust across distributed clouds
CN111159774A (en) Decentralized intelligent contract escrow wallet method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20181030

RJ01 Rejection of invention patent application after publication