CN108880820A - Code administration method and apparatus - Google Patents

Code administration method and apparatus Download PDF

Info

Publication number
CN108880820A
CN108880820A CN201810558469.5A CN201810558469A CN108880820A CN 108880820 A CN108880820 A CN 108880820A CN 201810558469 A CN201810558469 A CN 201810558469A CN 108880820 A CN108880820 A CN 108880820A
Authority
CN
China
Prior art keywords
block
code file
cryptographic hash
user equipment
information
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.)
Granted
Application number
CN201810558469.5A
Other languages
Chinese (zh)
Other versions
CN108880820B (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201810558469.5A priority Critical patent/CN108880820B/en
Publication of CN108880820A publication Critical patent/CN108880820A/en
Application granted granted Critical
Publication of CN108880820B publication Critical patent/CN108880820B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic 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 using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps

Abstract

The present invention provides a kind of code administration method and apparatus.This method includes:First user equipment receives the information that second user equipment is uploaded at least one code file of server;The information of code file includes the corresponding cryptographic Hash of the code file;First user equipment generates block according to the information of at least one code file, and block is added in block chain;Block includes block head and at least one block main body, and block head includes the cryptographic Hash of a upper block;Block main body includes the corresponding cryptographic Hash of at least one code file;Block is sent to server by the first user equipment, so that server establishes the corresponding relationship of the three of the store path of the corresponding cryptographic Hash of block, code file and code file.The information of code file is stored distorting for the information that code file can be prevented to block chain, to ensure that the safety of code file by storing code file to server by the embodiment of the present invention.

Description

Code administration method and apparatus
Technical field
The present invention relates to field of computer technology more particularly to a kind of code administration method and apparatus.
Background technique
In internet industry, after code development personnel develop program code, need program code or volume It translates result and is deployed on server and run, indirectly could provide service for user, this process is known as code publication.
Generally pass through version control system (Subversion, abbreviation SVN), GIT and integration tool software at present Jinkens realizes the storage and publication to code.But during code is stored and issued in aforesaid way, code is easy to be usurped Change, attacked, safety cannot ensure.
Summary of the invention
The present invention provides a kind of code administration method and apparatus, to improve the safety in code storage and issuing process.
In a first aspect, the present invention provides a kind of code administration method, including:
First user equipment receives the information that second user equipment is uploaded at least one code file of server;It is described The information of code file includes the corresponding cryptographic Hash of the code file;
First user equipment generates block according to the information of code file described at least one, and the block is added Enter in block chain;The block includes block head and at least one block main body, and the block head includes the Kazakhstan of a upper block Uncommon value;The block main body includes at least one described corresponding cryptographic Hash of code file;
The block is sent to the server by first user equipment, so that the server establishes the area The corresponding relationship of block, the corresponding cryptographic Hash of the code file and the three of the store path of the code file.
Second aspect, the present invention provide a kind of code administration method, including:
Server receives at least one code file that second user equipment uploads;
The server receives the block that first user equipment is sent;At least one described generation according to the block What the information of code file generated;The information of the code file includes:The corresponding cryptographic Hash of the code file;The block packet Block head and at least one block main body are included, the block head includes the cryptographic Hash of a upper block;The block main body includes At least one described corresponding cryptographic Hash of code file;
The block, the corresponding cryptographic Hash of the code file and the code file are established and stored to the server The corresponding relationship of the three of store path.
The third aspect, the present invention provide a kind of code administration device, including:
Receiving module, the information for being uploaded at least one code file of server for receiving second user equipment;Institute The information for stating code file includes the corresponding cryptographic Hash of the code file;
Processing module for generating block according to the information of code file described at least one, and the block is added In block chain;The block includes block head and at least one block main body, and the block head includes the Hash of a upper block Value;The block main body includes at least one described corresponding cryptographic Hash of code file;
Sending module, for the block to be sent to the server, so that the server establishes the block, institute State the corresponding relationship of the three of the store path of the corresponding cryptographic Hash of code file and the code file.
Fourth aspect, the present invention provide a kind of code administration device, including:
Receiving module, for receiving at least one code file of second user equipment upload;
The receiving module is also used to receive the block that first user equipment is sent;The block is according at least What the information of one code file generated;The information of the code file includes:The corresponding cryptographic Hash of the code file; The block includes block head and at least one block main body, and the block head includes the cryptographic Hash of a upper block;The area Block main body includes at least one described corresponding cryptographic Hash of code file;
Processing module, for establishing and storing the block, the corresponding cryptographic Hash of the code file and code text The corresponding relationship of the three of the store path of part.
Code administration method and apparatus provided in an embodiment of the present invention, the first user equipment receive second user equipment and upload To the information of at least one code file of server;The information of the code file includes the corresponding Hash of the code file Value;First user equipment generates block according to the information of code file described at least one, and area is added in the block In block chain;The block includes block head and at least one block main body, and the block head includes the cryptographic Hash of a upper block; The block main body includes at least one described corresponding cryptographic Hash of code file;First user equipment is by the area Block is sent to the server so that the server establish the block, the corresponding cryptographic Hash of the code file with it is described The corresponding relationship of the three of the store path of code file, by storing code file to server, by the letter of code file Breath stores distorting for the information that code file can be prevented to block chain, allows to the letter by the code file in block Breath goes the authenticity of the code file in authentication server, to ensure that the safety of code file.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is the flow diagram of one embodiment of code administration method provided by the invention;
Fig. 2 is the block chain schematic diagram of one embodiment of code administration method provided by the invention;
Fig. 3 is the flow diagram of another embodiment of code administration method provided by the invention;
Fig. 4 is the flow diagram of the another embodiment of code administration method provided by the invention;
Fig. 5 is the structural schematic diagram of one embodiment of code administration device provided by the invention;
Fig. 6 is the structural schematic diagram of another embodiment of code administration device provided by the invention;
Fig. 7 is the structural schematic diagram of the first user equipment embodiment provided by the invention;
Fig. 8 is the structural schematic diagram of server example provided by the invention.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent method and apparatus of some aspects be described in detail in claims, the disclosure.
Term " includes " in description and claims of this specification and the attached drawing and " having " and they appoint What is deformed, it is intended that is covered and non-exclusive is included.Such as contain the process, method, system, production of a series of steps or units Product or equipment are not limited to listed step or unit, but optionally further comprising the step of not listing or unit, or Optionally further comprising the other step or units intrinsic for these process, methods, product or equipment.
Noun according to the present invention and scene are introduced first:
The each developer of R&D team corresponds to a node in block chain, forms P2P peer-to-peer network.It specifically can be with Make all nodes in a local area network by Virtual Private Network (Virtual Private Network, abbreviation VPN) In, it is all in net node equal access network, form P2P peer-to-peer network.
Further the public and private key of node itself can also be generated by rivest, shamir, adelman uniquely to identify each Developer.Wherein, private key is used for unique identification node, and public key is used to verify the legitimacy of node, such as when accessing network, Or during the inspecting periodically of network.
Any node can report code to server, and can check the code in block chain.In a peer-to-peer network, Each node is the individual of equity, common to participate in the work such as record, storage, maintenance of code on block chain.Moreover, block Block in chain, which has, once to be generated, the characteristic that can not be distorted.
The block chain can use privately owned chain form, limit access limit or opening permission.Block chain On access limit formulated by the scheduled rule of R&D team, such as the corresponding node of some developer only read permission Deng.Entire peer-to-peer network is safeguarded that network insertion can be by the gateway accessing of each node, process of knowing together by each node jointly By the node control chosen in advance.
Fig. 1 is the flow diagram of one embodiment of code administration method provided by the invention.As shown in Figure 1, the present embodiment The method of offer, including:
Step 101, the first user equipment reception second user equipment are uploaded at least one code file of server Information;The information of code file includes the corresponding cryptographic Hash of code file.
Specifically, the first user equipment is the corresponding user equipment of node selected by preset common recognition mechanism.Second User equipment is the corresponding user equipment of any node in peer-to-peer network.
At least one code file is uploaded to service after having new code file to generate or modify by second user equipment Device, and the information of other node broadcasts code files into network;At least one code file is received by the first user equipment Information.The information of code file includes the corresponding cryptographic Hash of code file, which is to pass through Hash according to code file What algorithm obtained.Once code file is tampered, the corresponding cryptographic Hash of code file will change, therefore can be according to Kazakhstan Whether uncommon value Validation Code file is tampered.
Step 102, the first user equipment generate block according to the information of at least one code file, and area is added in block In block chain;Block includes block head and at least one block main body, and block head includes the cryptographic Hash of a upper block;Block main body Including the corresponding cryptographic Hash of at least one code file.
Specifically, the first user equipment can summarize the information of all code files in preset duration, and according to reception The information of the code file arrived generates block, and the block is added in block chain, and block is connected to the end of block chain.
Wherein, the information of code file is recorded in the block main body of block the first user equipment.
Block includes block head and at least one block main body, as shown in Fig. 2, as an example, the block head in Fig. 2 Index including identifying ID, the cryptographic Hash of a upper block, Merkel's tree root, timestamp and block main body;Block main body includes: The corresponding industry number of code file+research and development group #+project number, Data Identification ID, metadata description and data set provider And list of relevant information (developer that data set provider is, for example, upload code file), the corresponding employee of each code file Number (i.e. the numbers of code development personnel), name of code, version number and the corresponding cryptographic Hash of code file and node identification ID (node ID of upload code file).
Wherein, the data ID in the ID and block main body in block head can be randomly generated.The cryptographic Hash of this block It can be calculated by Merkel's tree root and the cryptographic Hash of a upper block, and be written to the block head of next block In.Timestamp indicates to generate the time of the block.Merkel's tree root is summarized to information all in block main body.
In above scheme, code file is uploaded to server and is saved, the corresponding information of code file is generated into block and is protected Distorting for the information that can prevent code file to block chain is deposited, allows to go by the information of the code file in block The authenticity of code file in authentication server.
Block is sent to the server by step 103, the first user equipment, so that server establishes block, code text The corresponding relationship of the three of the store path of the corresponding cryptographic Hash of part and code file.
Specifically, the information of the block of generation is sent to server by the first user equipment, server establishes the block, generation The corresponding relationship of the store path three of the corresponding cryptographic Hash of code file and code file.
It, can be according to service when node in network checks the information of the code file in block chain corresponding code file The corresponding relationship with code file store path that is storing in device, finds the code file.
The method of the embodiment of the present invention saves the information of code file by way of block chain, is gone using block chain The heart, it is open and clear, prevent the characteristic distorted, and it is fast using the transactions velocity of privately owned chain, protect privacy, transaction cost is extremely low Characteristic, realize code file safety storage and publication.
The method of the present embodiment, the first user equipment receive at least one code that second user equipment is uploaded to server The information of file;The information of the code file includes the corresponding cryptographic Hash of the code file;The first user equipment root Block is generated according to the information of code file described at least one, and the block is added in block chain;The block includes area Build and at least one block main body, the block head includes the cryptographic Hash of a upper block;The block main body includes at least One corresponding cryptographic Hash of code file;The block is sent to the server by first user equipment, So that the server establishes the store path of the block, the corresponding cryptographic Hash of the code file and the code file The corresponding relationship of three is stored the information of code file to block chain by storing code file to server, can be to prevent Only the information of code file is distorted, and allows to the code gone in authentication server by the information of the code file in block The authenticity of file, to ensure that the safety of code file.
On the basis of the above embodiments, optionally, before block being added in block chain, further include:
Block is broadcasted into Peer-to-Peer Network P2P the other users in addition to first user equipment by the first user equipment Equipment, so that other users equipment verifies block;
Block is added in block chain, including:
If block is added after the first user equipment receives the instruction information of other users equipment transmission being verified In block chain.
Specifically, the block after generating block, can be broadcasted other use into the network by the first user equipment Family equipment, other users equipment carry out authenticity verification to the block;First user equipment is receiving the instruction being verified After information, which is connected to the end of block chain.
Wherein, to the verifying of block, it can realize whether verify the cryptographic Hash by the cryptographic Hash in verifying block head It is the cryptographic Hash of a upper block.
On the basis of the above embodiments, further, if at least one described code file is publication packet, step 102, it can specifically be achieved by the steps of:
First user equipment generates the block according to the information of the publication packet, and will be described in block addition In block chain;The information of the publication packet includes that corresponding cryptographic Hash is wrapped in the publication;
Step 102, it can specifically be achieved by the steps of:
The block is sent to the server by first user equipment, so that the server establishes the area Block, the publication wrap the corresponding relationship of the three of the store path of corresponding cryptographic Hash and the publication packet.
Specifically, developer can generate publication packet according to code file when if desired issuing to publication packet, and Publication is wrapped by second user equipment and reaches server, the information of publication packet is broadcast to by network by second user equipment In.First user equipment generates block according to the information of the publication packet received, and block is added in block chain, the publication packet Information include that corresponding cryptographic Hash is wrapped in publication.
The information of the block of generation is sent to server by the first user equipment, and server establishes the block, publication packet pair The corresponding relationship of the store path three of the cryptographic Hash and publication packet answered.
It, can be according in server when the corresponding publication of information for the publication packet that node in network is checked in block chain is wrapped The corresponding relationship with the store path of publication packet of storage, finds the publication packet.
In the present embodiment, publication is wrapped and reaches server preservation, the information of publication packet is generated into block and is saved to block Chain, the information that can prevent publication from wrapping are distorted, and allow to go in authentication server by the information of the publication packet in block Publication packet authenticity.
Fig. 3 is the flow diagram of another embodiment of code administration method provided by the invention.As shown in figure 3, this implementation The method that example provides, including:
Step 301, server receive at least one code file that second user equipment uploads;
Specifically, second user equipment have new code file generate or modification after, will be at least one code file Server is reached, and the information of other node broadcasts code files into network;At least one is received by the first user equipment The information of code file.The information of code file includes the corresponding cryptographic Hash of code file, which is according to code file It is obtained by hash algorithm.Once code file is tampered, the corresponding cryptographic Hash of code file will change, therefore can Whether to be tampered according to cryptographic Hash Validation Code file.
Step 302, server receive the block that first user equipment is sent;At least one code text according to block What the information of part generated;The information of code file includes:The corresponding cryptographic Hash of code file;Block includes block head and at least one A block main body, block head include the cryptographic Hash of a upper block;Block main body includes that at least one code file respectively corresponds to Cryptographic Hash;
Specifically, the first user equipment can summarize the information of all code files in preset duration, and according to reception The information of the code file arrived generates block, and the block is added in block chain, and block is connected to the end of block chain.
Wherein, the information of code file is recorded in the block main body of block the first user equipment.
Block includes block head and at least one block main body, as shown in Fig. 2, as an example, the block head in Fig. 2 Index including identifying ID, the cryptographic Hash of a upper block, Merkel's tree root, timestamp and block main body;Block main body includes: The corresponding industry number of code file+research and development group #+project number, Data Identification ID, metadata description and data set provider And list of relevant information (developer that data set provider is, for example, upload code file), the corresponding employee of each code file Number (i.e. the numbers of code development personnel), name of code, version number and the corresponding cryptographic Hash of code file and node identification ID (node ID of upload code file).
Wherein, the data ID in the ID and block main body in block head can be randomly generated.The cryptographic Hash of this block It can be calculated by Merkel's tree root and the cryptographic Hash of a upper block, and be written to the block head of next block In.Timestamp indicates to generate the time of the block.Merkel's tree root is summarized to information all in block main body.
In above scheme, code file is uploaded to server and is saved, the corresponding information of code file is generated into block and is protected Distorting for the information that can prevent code file to block chain is deposited, allows to go by the information of the code file in block The authenticity of code file in authentication server.
Step 303, server is established and the store path of memory block, code file corresponding cryptographic Hash and code file Three corresponding relationship.
Specifically, server is established and the store path of memory block, code file corresponding cryptographic Hash and code file The corresponding relationship of three can when the node in network checks the information of the code file in block chain corresponding code file To find the code file according to the corresponding relationship with the store path of code file stored in server.
Optionally, block head further includes:Merkel's tree root and timestamp;Block main body further includes:Second user equipment Identification information and metadata description information.
Optionally, further include:
According to the corresponding cryptographic Hash of the code file got, determines in cryptographic Hash block corresponding with code file and include The corresponding cryptographic Hash of code file it is whether consistent.
Specifically, if server described in above-mentioned steps is according to the publication packet got when code file is publication packet Corresponding cryptographic Hash determines whether the corresponding cryptographic Hash of publication packet for including in cryptographic Hash block corresponding with packet is issued is consistent.
Specifically, will be after publication packet is published to formal environments, server can be by cryptographic Hash that the publication is wrapped and block chain The corresponding cryptographic Hash comparison of the publication packet of middle preservation, checks whether consistent.It specifically can be by each code file in publication packet Cryptographic Hash and block chain in the cryptographic Hash of code file that records compare.If all consistent, so that it may by publication wrap into Row deployment.
Further, server can also provide interface queries code file.
The method of the present embodiment, implementing principle and technical effect are similar with method shown in Fig. 1, and details are not described herein again.
Fig. 4 is the flow diagram of the another embodiment of code administration method provided by the invention.As shown in figure 4, this implementation The method that example provides, including:
Step 401, second user equipment upload at least one code file to server;
The information of at least one code file is sent to the first user equipment by step 402, second user equipment, so that the One user equipment generates block according to the information of at least one code file, and block is added in block chain;Code file Information includes the corresponding cryptographic Hash of code file;Block includes block head and block main body, and block head includes a upper block Cryptographic Hash;Block main body includes the corresponding cryptographic Hash of at least one code file.
Optionally, block head further includes:Merkel's tree root and timestamp;Block main body further includes:Second user equipment Identification information and metadata description information.
The method of the present embodiment, implementing principle and technical effect are similar with method shown in Fig. 1, and details are not described herein again.
Fig. 5 is the structure chart of one embodiment of code administration device provided by the invention, as shown in figure 5, the generation of the present embodiment Code managing device is arranged in the first user equipment, which includes:
Receiving module 501, the information for being uploaded at least one code file of server for receiving second user equipment; The information of the code file includes the corresponding cryptographic Hash of the code file;
Processing module 502 for generating block according to the information of code file described at least one, and the block is added Enter in block chain;The block includes block head and at least one block main body, and the block head includes the Kazakhstan of a upper block Uncommon value;The block main body includes at least one described corresponding cryptographic Hash of code file;
Sending module 503, for the block to be sent to the server, so that the server establishes the area The corresponding relationship of block, the corresponding cryptographic Hash of the code file and the three of the store path of the code file.
Optionally, the sending module 503, is also used to:
First user equipment broadcasts the block into Peer-to-Peer Network P2P in addition to first user equipment Other users equipment, so that the other users equipment verifies the block;
The processing module 502, is specifically used for:
If, will after first user equipment receives the instruction information being verified that the other users equipment is sent The block is added in the block chain.
Optionally, if at least one described code file is publication packet, the processing module 502 is specifically used for:
First user equipment generates the block according to the information of the publication packet, and will be described in block addition In block chain;The information of the publication packet includes that corresponding cryptographic Hash is wrapped in the publication;
The sending module 503, is specifically used for:
The block is sent to the server by first user equipment, so that the server establishes the area Block, the publication wrap the corresponding relationship of the three of the store path of corresponding cryptographic Hash and the publication packet.
Optionally, the block head further includes:Merkel's tree root and timestamp;The block main body further includes:Described The identification information and metadata description information of two user equipmenies.
The device of the present embodiment can be used for executing the technical solution of above method embodiment, realization principle and technology Effect is similar, and details are not described herein again.
Fig. 6 is the structure chart of another embodiment of code administration device provided by the invention, as shown in fig. 6, the present embodiment Code administration device is arranged in the server, which includes:
Receiving module 601, for receiving at least one code file of second user equipment upload;
The receiving module 601 is also used to receive the block that first user equipment is sent;According to the block extremely What the information of a few code file generated;The information of the code file includes:The corresponding Hash of the code file Value;The block includes block head and at least one block main body, and the block head includes the cryptographic Hash of a upper block;It is described Block main body includes at least one described corresponding cryptographic Hash of code file;
Processing module 602, for establishing and storing the block, the corresponding cryptographic Hash of the code file and the code The corresponding relationship of the three of the store path of file.
Optionally, the processing module 602, is also used to:
According to the corresponding cryptographic Hash of the code file got, cryptographic Hash area corresponding with the code file is determined Whether the corresponding cryptographic Hash of the code file for including in block is consistent.
Optionally, the block head further includes:Merkel's tree root and timestamp;The block main body further includes:Described The identification information and metadata description information of two user equipmenies.
The device of the present embodiment can be used for executing the technical solution of above method embodiment, realization principle and technology Effect is similar, and details are not described herein again.
A kind of code administration device is also provided in another embodiment of the present invention, which is arranged in second user In equipment, which includes:
Sending module, for uploading at least one code file to server;
The sending module, is also used to for the information of at least one code file to be sent to first user and sets It is standby, so that first user equipment generates block according to the information of code file described at least one, and the block is added Enter in block chain;The information of the code file includes the corresponding cryptographic Hash of the code file;The block includes block head With block main body, the block head includes the cryptographic Hash of a upper block;The block main body includes at least one described code The corresponding cryptographic Hash of file.
Optionally, the block head further includes:Merkel's tree root and timestamp;The block main body further includes:Described The identification information and metadata description information of two user equipmenies.
The device of the present embodiment can be used for executing the technical solution of above method embodiment, realization principle and technology Effect is similar, and details are not described herein again.
Fig. 7 is the structure chart of the first user equipment embodiment provided by the invention, as shown in fig. 7, first user equipment Including:
Processor 701, and, the memory 702 of the executable instruction for storage processor 701.
It optionally, can also include communication interface 703, for being communicated with other equipment.
Wherein, processor 701 is configured to execute via the executable instruction is executed corresponding in preceding method embodiment Method, specific implementation process may refer to preceding method embodiment, and details are not described herein again.
Fig. 8 is the structure chart of server example provided by the invention, as shown in figure 8, the server includes:
Processor 801, and, the memory 802 of the executable instruction for storage processor 801.
It optionally, can also include communication interface 803, for being communicated with other equipment.
Wherein, processor 801 is configured to execute via the executable instruction is executed corresponding in preceding method embodiment Method, specific implementation process may refer to preceding method embodiment, and details are not described herein again.
A kind of computer readable storage medium is also provided in the embodiment of the present invention, is stored thereon with computer program, it is described Realize that corresponding method in preceding method embodiment, specific implementation process may refer to when computer program is executed by processor Preceding method embodiment, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.The present invention is directed to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claims are pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by appended claims System.

Claims (10)

1. a kind of code administration method, which is characterized in that including:
First user equipment receives the information that second user equipment is uploaded at least one code file of server;The code The information of file includes the corresponding cryptographic Hash of the code file;
First user equipment generates block according to the information of code file described at least one, and area is added in the block In block chain;The block includes block head and at least one block main body, and the block head includes the cryptographic Hash of a upper block; The block main body includes at least one described corresponding cryptographic Hash of code file;
The block is sent to the server by first user equipment, so that the server establishes the block, institute State the corresponding relationship of the three of the store path of the corresponding cryptographic Hash of code file and the code file.
2. the method according to claim 1, wherein it is described by the block be added block chain in front of, also wrap It includes:
The block is broadcasted into Peer-to-Peer Network P2P other in addition to first user equipment by first user equipment User equipment, so that the other users equipment verifies the block;
It is described that the block is added in block chain, including:
If, will be described after first user equipment receives the instruction information being verified that the other users equipment is sent Block is added in the block chain.
3. method according to claim 1 or 2, which is characterized in that if at least one described code file is publication packet, First user equipment generates block according to the information of code file described at least one, and block chain is added in the block In, including:
First user equipment generates the block according to the information of the publication packet, and the block is added in the block In chain;The information of the publication packet includes that corresponding cryptographic Hash is wrapped in the publication;
The block is sent to the server by first user equipment, so that the server establishes the block, institute The corresponding relationship of the three of the store path of the corresponding cryptographic Hash of code file and the code file is stated, including:
The block is sent to the server by first user equipment, so that the server establishes the block, institute State the corresponding relationship that the three of corresponding cryptographic Hash and the store path for issuing packet is wrapped in publication.
4. method according to claim 1 or 2, which is characterized in that the block head further includes:Merkel's tree root and time Stamp;The block main body further includes:The identification information and metadata description information of the second user equipment.
5. a kind of code administration method, which is characterized in that including:
Server receives at least one code file that second user equipment uploads;
The server receives the block that the first user equipment is sent;At least one code file according to the block What information generated;The information of the code file includes:The corresponding cryptographic Hash of the code file;The block includes block head With at least one block main body, the block head includes the cryptographic Hash of a upper block;The block main body includes at least one The corresponding cryptographic Hash of code file;
The storage of the block, the code file corresponding cryptographic Hash and the code file is established and stored to the server The corresponding relationship of the three in path.
6. according to the method described in claim 5, it is characterized in that, further including:
The server determines the cryptographic Hash and the code file pair according to the corresponding cryptographic Hash of the code file got Whether the corresponding cryptographic Hash of the code file for including in the block answered is consistent.
7. method according to claim 5 or 6, which is characterized in that the block head further includes:Merkel's tree root and time Stamp;The block main body further includes:The identification information and metadata description information of the second user equipment.
8. a kind of code administration device, which is characterized in that including:
Receiving module, the information for being uploaded at least one code file of server for receiving second user equipment;The generation The information of code file includes the corresponding cryptographic Hash of the code file;
For generating block according to the information of code file described at least one, and block is added in the block by processing module In chain;The block includes block head and at least one block main body, and the block head includes the cryptographic Hash of a upper block;Institute Stating block main body includes at least one described corresponding cryptographic Hash of code file;
Sending module, for the block to be sent to the server, so that the server establishes the block, the generation The corresponding relationship of the three of the store path of the corresponding cryptographic Hash of code file and the code file.
9. a kind of code administration device, which is characterized in that including:
Receiving module, for receiving at least one code file of second user equipment upload;
The receiving module is also used to receive the block of the first user equipment transmission;According to the block described at least one What the information of code file generated;The information of the code file includes:The corresponding cryptographic Hash of the code file;The block Including block head and at least one block main body, the block head includes the cryptographic Hash of a upper block;The block main body packet Include at least one described corresponding cryptographic Hash of code file;
Processing module, for establishing and storing the block, the corresponding cryptographic Hash of the code file and the code file The corresponding relationship of the three of store path.
10. device according to claim 9, which is characterized in that the processing module is also used to:
According to the corresponding cryptographic Hash of the code file got, determine in cryptographic Hash block corresponding with the code file Including the corresponding cryptographic Hash of the code file it is whether consistent.
CN201810558469.5A 2018-06-01 2018-06-01 Code management method and device Active CN108880820B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810558469.5A CN108880820B (en) 2018-06-01 2018-06-01 Code management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810558469.5A CN108880820B (en) 2018-06-01 2018-06-01 Code management method and device

Publications (2)

Publication Number Publication Date
CN108880820A true CN108880820A (en) 2018-11-23
CN108880820B CN108880820B (en) 2021-06-15

Family

ID=64336110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810558469.5A Active CN108880820B (en) 2018-06-01 2018-06-01 Code management method and device

Country Status (1)

Country Link
CN (1) CN108880820B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417781A (en) * 2019-07-30 2019-11-05 中国工商银行股份有限公司 File encryption management method, client and server based on block chain
CN110889137A (en) * 2019-11-21 2020-03-17 云南群林科技有限公司 Data exchange method based on block chain
CN112948827A (en) * 2021-01-11 2021-06-11 杭州复杂美科技有限公司 Source code compiling verification method, system, equipment and storage medium
CN113608777A (en) * 2021-07-30 2021-11-05 广东全塑联科技有限公司 Project code version control method and system based on block chain
CN116450250A (en) * 2023-06-16 2023-07-18 天津金城银行股份有限公司 Dynamic scenario execution method, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407795A (en) * 2016-09-05 2017-02-15 北京众享比特科技有限公司 Data existence authentication system, authentication method and verification method
WO2017167550A1 (en) * 2016-03-30 2017-10-05 British Telecommunications Public Limited Company Blockchain state reliability determination
CN107330701A (en) * 2017-07-28 2017-11-07 中链科技有限公司 The method and apparatus of the intelligent contract of implantation
CN107800795A (en) * 2017-10-30 2018-03-13 中国联合网络通信集团有限公司 The processing method and processing device of block information
CN109314642A (en) * 2016-02-23 2019-02-05 区块链控股有限公司 Counting system and method for secure voting and distribution implemented with blockchain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109314642A (en) * 2016-02-23 2019-02-05 区块链控股有限公司 Counting system and method for secure voting and distribution implemented with blockchain
WO2017167550A1 (en) * 2016-03-30 2017-10-05 British Telecommunications Public Limited Company Blockchain state reliability determination
CN106407795A (en) * 2016-09-05 2017-02-15 北京众享比特科技有限公司 Data existence authentication system, authentication method and verification method
CN107330701A (en) * 2017-07-28 2017-11-07 中链科技有限公司 The method and apparatus of the intelligent contract of implantation
CN107800795A (en) * 2017-10-30 2018-03-13 中国联合网络通信集团有限公司 The processing method and processing device of block information

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417781A (en) * 2019-07-30 2019-11-05 中国工商银行股份有限公司 File encryption management method, client and server based on block chain
CN110417781B (en) * 2019-07-30 2021-11-19 中国工商银行股份有限公司 Block chain-based document encryption management method, client and server
CN110889137A (en) * 2019-11-21 2020-03-17 云南群林科技有限公司 Data exchange method based on block chain
CN110889137B (en) * 2019-11-21 2023-04-07 盛世智云(云南)软件有限公司 Data exchange method based on block chain
CN112948827A (en) * 2021-01-11 2021-06-11 杭州复杂美科技有限公司 Source code compiling verification method, system, equipment and storage medium
CN113608777A (en) * 2021-07-30 2021-11-05 广东全塑联科技有限公司 Project code version control method and system based on block chain
CN113608777B (en) * 2021-07-30 2023-09-29 广东全塑智联科技有限公司 Project code version control method and system based on blockchain
CN116450250A (en) * 2023-06-16 2023-07-18 天津金城银行股份有限公司 Dynamic scenario execution method, system and storage medium
CN116450250B (en) * 2023-06-16 2023-09-19 天津金城银行股份有限公司 Dynamic scenario execution method, system and storage medium

Also Published As

Publication number Publication date
CN108880820B (en) 2021-06-15

Similar Documents

Publication Publication Date Title
US11829494B2 (en) Distributed privately subspaced blockchain data structures with secure access restriction management
CN108880820A (en) Code administration method and apparatus
EP3070630B1 (en) Data system and method
ES2878135T3 (en) Devices to provide a set of cryptographically classified, filtered and protected transaction data records of a link in a blockchain
US20190036895A1 (en) Data distribution over nodal elements
CN107231239B (en) Create generation block method for anti-counterfeit and device
CN103636160B (en) secure file sharing method and system
CN102170440B (en) Method suitable for safely migrating data between storage clouds
CN101120351B (en) Derivative seeds distribution method
CN103765809B (en) The public key of implicit authentication
CN108646983A (en) The treating method and apparatus of storage service data on block chain
CN103959302A (en) Systems and methods for secure distributed storage
CN106372499A (en) Systems and methods for securing virtual machine computing environments
JP6495346B2 (en) Information processing system
CN110009494A (en) A kind of method and device monitoring the transaction content in block chain
CN108667717A (en) Block chain processing method, medium, device and computing device based on instant communication message record
CN105007301A (en) Electronic evidence processing system and method based on social platform
CN113765675B (en) Transaction data processing method, device, equipment and medium
CN109219816A (en) Creation can be encrypted the device and method for proving the data-link comprising valid data in data structure
CN105071941B (en) Distributed system node identities authentication method and device
CN109064190A (en) A kind of student status information storage system
CN107659574A (en) A kind of data access control system
Auerbach et al. Inverse-sybil attacks in automated contact tracing
CN110618989A (en) Information processing method, information processing device and related product
CN108924089A (en) A kind of client device recognition methods, device and client 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