CN107635028B - Resource naming method and device, block chain cluster and electronic equipment - Google Patents

Resource naming method and device, block chain cluster and electronic equipment Download PDF

Info

Publication number
CN107635028B
CN107635028B CN201710977060.2A CN201710977060A CN107635028B CN 107635028 B CN107635028 B CN 107635028B CN 201710977060 A CN201710977060 A CN 201710977060A CN 107635028 B CN107635028 B CN 107635028B
Authority
CN
China
Prior art keywords
transaction message
blockchain
transaction
naming
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710977060.2A
Other languages
Chinese (zh)
Other versions
CN107635028A (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.)
State Grid Corp of China SGCC
State Grid Information and Telecommunication Co Ltd
Electric Power Research Institute of State Grid Zhejiang Electric Power Co Ltd
Beijing China Power Information Technology Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Information and Telecommunication Co Ltd
Electric Power Research Institute of State Grid Zhejiang Electric Power Co Ltd
Beijing China Power Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Information and Telecommunication Co Ltd, Electric Power Research Institute of State Grid Zhejiang Electric Power Co Ltd, Beijing China Power Information Technology Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201710977060.2A priority Critical patent/CN107635028B/en
Publication of CN107635028A publication Critical patent/CN107635028A/en
Application granted granted Critical
Publication of CN107635028B publication Critical patent/CN107635028B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a resource naming method and device, a block chain cluster and electronic equipment. Namely, the invention adopts the naming method of naming the identifier, and the user does not name the data at will, so that the data naming mode is more standardized.

Description

Resource naming method and device, block chain cluster and electronic equipment
Technical Field
The present invention relates to the field of data naming, and in particular, to a resource naming method and apparatus, a block chain cluster, and an electronic device.
Background
With the expansion of the internet scale and the increase of services, the host-based communication mode in the traditional transmission control protocol/internet protocol TCP/IP network architecture has the problems of insufficient reliability, poor security, poor flexibility and the like, and is no longer suitable for the requirement of internet development. Thus, a data content based communication mode of the content centric network CCN has emerged.
The communication mode based on the data content means that the user can directly analyze the data storage position according to the data name, and further directly acquire the data from the stored position. Therefore, it is important to name the data correctly.
In the prior art, when naming data, a user names according to personal habits, and a normalized naming system is not provided.
Disclosure of Invention
In view of this, the present invention provides a resource naming method, device, block chain cluster and electronic device, so as to solve the problem in the prior art that there is no canonical naming system.
In order to solve the technical problems, the invention adopts the following technical scheme:
a resource naming method is applied to a block chain cluster and comprises the following steps:
receiving a first transaction message sent by an electronic device; the first transaction message comprises a source address, a destination address and transaction content subjected to signature operation;
when the first transaction message is legal, acquiring a plurality of second transaction messages sent by other electronic equipment in the same time period with the first transaction message;
determining a prefix part in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages and an existing block chain, so that the electronic equipment generates a complete named identifier of the first transaction message according to the determined prefix part;
wherein the named identifier comprises a naming hierarchy, a prefix portion, and a suffix portion.
Preferably, determining a prefix portion in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages and an existing blockchain comprises:
packaging the first transaction message and all the second transaction messages to generate a block;
determining a prefix portion in a named identifier of the first transaction message based on the generated tiles and the existing tile chain.
Preferably, determining a prefix portion in a named identifier of the first transaction message according to the generated tile and the existing tile chain comprises:
performing a block chain consensus operation on the generated block so that the block is added into an existing block chain to generate a new block chain;
generating a prefix portion in the named identifier of the first transaction message based on the location of the tile in the new blockchain and the location of the first transaction message added to the tile.
Preferably, performing a blockchain consensus operation on the generated blocks to add the blocks to an existing blockchain to generate a new blockchain comprises:
determining a target blockchain node from at least one blockchain node;
the target block chain node sends the generated block to all other block chain nodes;
and the target block chain node and the block chain link point receiving the block respectively add the block to respective existing block chains to generate a plurality of same new block chains.
A naming method of resources is applied to electronic equipment and comprises the following steps:
generating and sending a first transaction message to the blockchain cluster;
obtaining a determined prefix part from the block chain cluster;
acquiring a suffix part input by a user;
and generating a complete naming identifier of the first transaction message according to the determined prefix part, the suffix part input by the user and a preset naming system.
Preferably, the generating a complete naming identifier of the first transaction message according to the determined prefix portion, the suffix portion inputted by the user, and a preset naming system includes:
and combining the determined prefix part, the suffix part input by the user and a preset naming system according to a preset combination rule to obtain the complete naming identifier.
A blockchain cluster comprising a plurality of blockchain nodes;
each block chain node is used for receiving a first transaction message sent by electronic equipment, and when the first transaction message is legal, a plurality of second transaction messages sent by other electronic equipment in the same time period with the first transaction message are obtained; the first transaction message comprises a source address, a destination address and transaction content subjected to signature operation;
a destination block chain node, configured to determine, according to the first transaction message, all the second transaction messages, and an existing block chain, a prefix portion in a named identifier of the first transaction message, so that the electronic device generates, according to the determined prefix portion, a complete named identifier of the first transaction message;
wherein the named identifier comprises a naming system, a prefix portion, and a suffix portion; the destination block chain node is a block chain node selected from all the block chain nodes.
Preferably, the destination block chain node is configured to, when determining a prefix portion in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages, and the existing block chain, specifically:
packaging the first transaction message and all the second transaction messages to generate a block;
determining a prefix portion in a named identifier of the first transaction message based on the generated tiles and the existing tile chain.
Preferably, the destination block chain node is configured to, when determining a prefix portion in the named identifier of the first transaction message according to the generated block and the existing block chain, specifically:
performing a block chain consensus operation on the generated block so that the block is added into an existing block chain to generate a new block chain;
generating a prefix portion in the named identifier of the first transaction message based on the location of the tile in the new blockchain and the location of the first transaction message added to the tile.
Preferably, the destination block link point is configured to perform a block chain consensus operation on the generated block, so that the block is added to an existing block chain, and when a new block chain is generated, the destination block link point is specifically configured to:
sending the generated block to all other block chain nodes, so that the block chain nodes receiving the block respectively add the block to respective existing block chains to generate a plurality of same new block chains;
the target blockchain node adds the block to an existing blockchain of the target blockchain node, generating the new blockchain.
A naming device of resources is applied to electronic equipment and comprises:
the message sending module is used for generating and sending a first transaction message to the block chain cluster;
a first obtaining module, configured to obtain a determined prefix portion from the blockchain cluster;
the second acquisition module is used for acquiring a suffix part input by a user;
and the generating module is used for generating a complete naming identifier of the first transaction message according to the determined prefix part, the suffix part input by the user and a preset naming system.
Preferably, the generating module is configured to, when generating the complete naming identifier of the first transaction message according to the determined prefix portion, the suffix portion input by the user, and a preset naming system, specifically:
and combining the determined prefix part, the suffix part input by the user and a preset naming system according to a preset combination rule to obtain the complete naming identifier.
An electronic device comprising a transmit port and a processor;
the processor is used for generating a first transaction message, acquiring a determined prefix part from the block chain cluster, acquiring a suffix part input by a user, and generating a complete naming identifier of the first transaction message according to the determined prefix part, the suffix part input by the user and a preset naming system;
the sending port is used for sending the first transaction message to the blockchain cluster.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a resource naming method and device, a block chain cluster and electronic equipment. Namely, the invention adopts the naming method of naming the identifier, and the user does not name the data at will, so that the data naming mode is more standardized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a method for naming a resource according to the present invention;
FIG. 2 is a schematic diagram of the structure of a named identifier provided by the present invention;
FIG. 3 is a flowchart of a method for naming a resource according to another embodiment of the present invention;
FIG. 4 is a flowchart of a method for naming a resource according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a resource naming apparatus provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a naming method of resources, wherein the resources can be files, drawings and other resources.
Referring to fig. 1, a naming method applied to resources on a blockchain cluster may include:
s11, receiving a first transaction message sent by the electronic equipment;
wherein the first transaction message is an ODIN message. The first transaction message comprises a source address, a destination address and transaction content after signature operation. The electronic device may be a personal computer PC, a mobile phone, a tablet, etc.
Specifically, the source address is an address of a user who sends the first transaction message through the electronic device. The destination address corresponds to the target individual pointed to by the first transaction message, and may be null when the specific message definition does not require the target individual to be designated. When the destination address is not empty, it indicates that the ownership of the transaction is the user corresponding to the destination address, and when the destination address is empty, it indicates that the ownership of the transaction is still the user sending the first transaction message. The transaction includes, but is not limited to, trading, named transfer, and the like.
The transaction content after signature operation comprises a plurality of 1-of-N multi-signature output block destination address public keys, and a plurality of 1-of-N multi-signature output block destination address public keys, which are defined and encoded according to an ODIN data packet format, and are specifically defined as follows:
in the first 1-of-N multiple signature output, the first public key is fixed to the user sending the first transaction message, the second public key is fixed to the ODIN feature public key (33 bytes public key, 16 system HEX string, such as "0320a0de360cc2ae8672db7d557086a4e7c8eca062c0a5a4ba9922dee0a pref 3e12", corresponding to the address 1PPkPubRnK2ry9PPVW7HJiukqbSnWzXkbi), optionally, the third public key is encoded for the specific first transaction message content (format: the first byte takes the value of 3, the second byte is the subsequent valid data length, the 3 rd byte starts to extract 31 bytes in order from the first transaction message content, the total 33 bytes corresponds to a block-compressed public key (if less than 33 bytes are automatically appended to the tail to fill up the ASCII space character to 33 bytes);
in an optional second and further 1-of-N multiple signature outputs, a first public key is fixed for the user sending the first transaction message and a second public key is initially encoded for the specific first transaction message content.
It should be noted that the value range of N is 3 to 16, and the value is 3 according to the current block protocol standard. Each of the 1-of-N multiple signature outputs defined above is illustrated with N being 3. When N is 4, there will be four public keys in the first 1-of-N multiple signature output, and the fourth public key is the 32 th to 63 th bytes extracted from the first transaction message content in sequence. When N is other numerical value, and so on.
In addition, for the ODIN data block which can not be accommodated by 1-of-N multiple signature output, it is only necessary to expand and store into 2 nd, 3 rd and so on multiple signature output records, if it does not exceed 75 bytes, it can select to store into the following OP _ RETURN remark message. Wherein an OP _ RETURN remark message (providing no more than 75 bytes of additional storage space when a standard multi-transaction data block cannot accommodate an excess length of ODIN packets).
It should be noted that:
(1) there is a certain amount of block balance in the source address (more than 0.001 bit of the currency BTC is recommended for generating valid transaction entries to be sent from the source address to the destination address to embed the ODIN packet, where, due to the characteristics of block 1-of-N multi-signature transactions, these block amounts will not be actually paid out and will be recycled in the next ODIN message).
(2) The message cost flat fee (0.0001 BTC by default) in blocks will be paid to the block network miners who include this block of transaction data.
(3) A block change address (same as the source address, used for recycling the excess amount of the block amount of the input transaction after generating a plurality of transaction entries meeting the embedded ODIN data packet to the account of the message sender according to the block transaction protocol).
A number of 1-of-N multiple signature output block destination address public keys are key in the whole first transaction message, ODIN data blocks are embedded into multiple signature output data blocks of the block transaction and are 1-of-N output, and the first public key of each data block is fixedly the user who sends the first transaction message, so that the output currency value can be redeemed for recycling. The detailed description of the block multiple signature transaction may refer to the block protocol specification.
In addition, the format of each ODIN information data block is defined as follows in byte order:
1 st byte, message type, 1 byte.
The 2 nd byte to the end of the message are different message data distinguished by message type.
S12, when the first transaction message is legal, acquiring a plurality of second transaction messages sent by other electronic equipment in the same time period with the first transaction message;
specifically, when the first transaction message is received, whether the first transaction message is legal or not is verified, and the process of verifying whether the first transaction message is legal or not includes:
1. verifying whether the format of the first transaction message is the format specified by the ODIN data block, namely verifying the validity of the message;
2. the identity of the source address in the first transaction message is verified, and specifically, the public key is used to verify whether the first transaction message is sent from the source address.
In addition, the cluster receives, in real time, a transaction message sent by the electronic device, where the transaction message includes a first transaction message and a second transaction message, the first transaction message is sent by the electronic device in this embodiment, and the second transaction message is sent by an electronic device other than the electronic device in this embodiment. Wherein the number of second transaction messages is not limited.
And determining which second transaction messages are received in the same time period as the received first transaction message according to the acquired time of each second transaction message.
S13, determining a prefix part in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages and the existing block chain, so that the electronic equipment generates a complete named identifier of the first transaction message according to the determined prefix part;
wherein the naming identifier includes a naming hierarchy, a prefix portion, and a suffix portion.
The constituent structure of the named identifier is now explained in connection with fig. 2.
ODIN is a unique name for a data resource object in a network, complying with the Uniform resource identifier, URI, specification. The ODIN identifier is composed of a naming system, a prefix and a suffix, as shown in the first-level ODIN domain name in FIG. 2.
A Naming System (Naming System) is used for identifying the characteristics of the ODIN domain name, and indicates that the ODIN domain name is adopted to locate the network resource, and the fixed value is a character string 'ppk'. The value does not conflict with any current network protocol prefix, and all resource identifiers starting with "ppk" are processed according to the ODIN domain name rule. The naming system is separated from the prefixes by a colon.
The prefix (prefix) is used for the unique identification of the resource owner, determined by the location where the ODIN Domain name registration transaction is written to the blockchain.
For the first-level ODIN domain name, the naming scheme of the prefix is:
BLOCK_SN.TRANS_INDEX
wherein, B L OCK _ SN is the number of the block where the ODIN domain name registration transaction is located, and TRANS _ INDEX is the offset of the ODIN domain name registration transaction located inside the block.
For an N-level ODIN domain name, the prefix consists of N parts, organized in order from left to right, separated by slashes. The naming scheme of the prefix is as follows:
PARENT_ODIN_PREFIX/SUB_BLOCK_SN.SUB_TRANS_INDEX
the method includes that a part _ ODIN _ PREFIX is a higher-level ODIN domain name PREFIX, a SUB _ B L OCK _ SN _ TRANS _ INDEX is a position in a current-level block chain where ODIN domain name registration transaction is located, and the naming mode is the same as the first-level ODIN domain name PREFIX.
Postfix (also called dss (data Suffix string)) is used for unique identification of internal resources of the same resource owner. Suffixes are optional, managed autonomously by the domain owner and guaranteed to be unique. When the destination address is empty, the domain name owner is the user sending the first transaction message, and when the destination address is not empty, the domain name owner is the user owning the destination address.
The suffix is named as:
[RESOURCE_ID]#[DATA_VERSION_SN.CHUNK_INDEX]
wherein, the RESOURCE _ ID is a RESOURCE identification number, is autonomously defined and guaranteed to be unique by a domain name owner, can be a number and a character string, but can not contain special characters such as "#", "/", and the like, and default represents default RESOURCEs; DATA _ VERSION _ SN is a resource VERSION number and is used for distinguishing different historical VERSIONs of the same resource, counting is started from 1, and the default represents the latest VERSION of the resource; CHUNK _ INDEX is a sub-data block INDEX, used for block transmission of larger-scale resources, counting from 0, and by default, indicates no data block or a full data block.
In addition, the user can expand the identification according to the requirement of the user. Based on the primary ODIN, the registrant of the primary ODIN can expand the self-defined secondary ODIN by utilizing the self-owned block chain, and write HASH keywords of a new block formed by batch packaging of the registration records of the secondary ODIN into the last bone stem block chain to obtain legal verification and ensure uniqueness. By analogy, a more multi-level ODIN identification can be formed.
After the naming identifier of the resource is determined, other users can determine the specific position of the resource according to the naming identifier of the resource, and then search the resource from the position, so as to realize the positioning and the request of the resource.
In this embodiment, the blockchain cluster determines a prefix portion in the named identifier of the first transaction message, so that the electronic device generates a complete named identifier of the first transaction message according to the determined prefix portion. Namely, the invention adopts the naming method of naming the identifier, and the user does not name the data at will, so that the data naming mode is more standardized.
Besides providing a canonical naming system, the invention also has the following advantages:
1. autonomy. The ODIN identifier is generated and managed autonomously by the applicant based on decentralized blockchain technology, and the generation and management rules are completely open without centralized control mechanism. Thus, organizations and individuals, except those in possession of the administrative keys, have no authority to control and tamper with.
2. And (4) safety. The owner of each ODIN identifier in the ODIN system correspondingly possesses a pair of public and private keys of asymmetric encryption technology, the data content which is automatically issued can be signed through the private key, and the individual who receives the data content can be verified through the public key. Thus, it can be ensured that the received data is trusted by the source and not tampered with.
3. Uniqueness. The ODIN identifier uniquely identifies an open access index of any data content object (e.g., text, pictures, sound, data, images, software, etc.) so that the data content object can be accurately identified and extracted by a person.
4. Is permanent. Because data resources in a network have great dynamics and a large amount of data is generated and invalid in a short time, the current technical scheme can change along with the change of attributes such as a holder of a data content object or a storage address, and data confusion is caused. In order to solve this problem, the ODIN identifier is generated once and remains unchanged, and does not change with changes in attributes such as the holder of the data content object identified by the ODIN identifier or the storage address, and the permanence is ensured.
5. Compatibility. In the prior art, the MAC address is adopted to name the sensor, so that the functions of discovering and identifying the sensor equipment are realized, but the method is only suitable for a local network and cannot be used as a universal naming method for the Internet. The ODIN system is compatible with existing identifiers (e.g., international standard book number ISBN, international standard publication number ISSN, international standard text code ISTC, publisher identifier PII, etc.).
6. Interoperability (interoperability). The existing scheme adopts a resource naming method of fixed-length digital coding, the naming process depends on the centralized allocation of a management mechanism, the efficiency is not high, the total number of names has an upper limit, and the data generation and failure speed is difficult to adapt. However, the ODIN processing system can be compatible with different computer operating systems on the network while processing the same data and with different time-varying technical systems.
7. And (4) dynamically updating. The prior art scheme depends on the existing domain name system, and shows that the provider section and the classification section are defined by the domain name of the server, so that the information name resolution process needs to be completed by means of the domain name resolution system, and the resolution efficiency is not high. However, the ODIN system can make fast dynamic updates to its metadata, applications, and service functions.
Alternatively, on the basis of the embodiment of the resource naming method, referring to fig. 3, step S13 may include:
s21, packaging the first transaction message and all the second transaction messages to generate a block;
specifically, the first transaction message and all the second transaction messages are sequentially arranged and packaged to generate the block.
S22, executing a block chain consensus operation on the generated blocks to add the blocks into the existing block chain and generate a new block chain;
the blockchain consensus operation is to determine a destination blockchain node from all blockchain nodes, and enable all blockchain nodes to acknowledge the destination blockchain node, and add a blockchain to the block in all blockchain nodes.
Optionally, on the basis of this embodiment, step S22 includes:
1) determining a target blockchain node from at least one blockchain node;
specifically, the POW algorithm may be used to select the target blockchain node. When the target block chain node is selected, the target block chain node can be selected randomly, or the target block chain node can be determined through a certain workload certification or an authorized share certification.
2) The target block chain node sends the generated block to all other block chain nodes;
wherein the target blockchain node sends the generated block to all other blockchain nodes, so that each blockchain node owns the block.
3) And respectively adding the blocks into the respective existing block chains by the target block chain node and the block chain link points of the received blocks to generate a plurality of same new block chains.
Specifically, each block link adds the block owned by itself to the tail end of each stored block chain, forming a plurality of new identical block chains.
S23, generating a prefix portion in the named identifier of the first transaction message according to the location of the tile in the new tile chain and the location of the first transaction message added to the tile.
Specifically, the blocks record legitimate transactions and are packaged into blocks linked to the chain, with the number of transactions in a particular block being determined by the rules of the different block chains.
A prefix portion in the named identifier of the first transaction message is generated based on the location of the tile in the new chain of tiles and the location of the first transaction message added to the tile. Namely, the number of the block where the first transaction information is located and the offset located inside the block are determined.
It should be noted that, in the present embodiment, the steps S22 and S23 are an implementation manner of determining the prefix portion in the named identifier of the first transaction message according to the generated tile and the existing tile chain, and in addition, other implementation manners may also be used to determine the prefix portion in the named identifier of the first transaction message according to the generated tile and the existing tile chain.
In this embodiment, a method for determining a prefix portion in a named identifier of a first transaction message according to the first transaction message, all second transaction messages, and an existing blockchain is provided.
Optionally, on the basis of the above embodiment of the resource naming method applied to the blockchain cluster, another embodiment of the present invention provides a resource naming method applied to an electronic device, which may include:
s31, generating and sending a first transaction message to the block chain cluster;
the composition of the first transaction message is already explained in the above embodiments, and is not described herein again. Sending the first transaction message to the blockchain cluster is specifically broadcasting the first transaction message into the blockchain cluster.
S32, obtaining the determined prefix part from the block chain cluster;
specifically, the electronic device, that is, the client monitors the progress of determining the prefix of the block chain cluster in real time, and when the prefix is found to be determined, the determined prefix is directly obtained from the block chain cluster.
S33, acquiring a suffix part input by a user;
specifically, the suffix part is named by the user himself, and then the user can directly input the suffix part on the electronic device.
And S34, generating a complete naming identifier of the first transaction message according to the determined prefix part, the suffix part input by the user and a preset naming system.
Optionally, on the basis of this embodiment, step S33 may include:
and combining the determined prefix part, the suffix part input by the user and a preset naming system according to a preset combination rule to obtain a complete naming identifier. Reference may be made in particular to the constituent structure of the named identifier in fig. 2.
In this embodiment, the electronic device of the user may generate a complete naming identifier of the first transaction message, and may form a canonical naming system by using a canonical naming method.
Optionally, on the basis of the embodiment of the resource naming method, another embodiment of the present invention provides a block chain cluster, including a plurality of block chain nodes;
each block chain node is used for receiving a first transaction message sent by the electronic equipment, and when the first transaction message is legal, a plurality of second transaction messages sent by other electronic equipment in the same time period with the first transaction message are obtained; the first transaction message comprises a source address, a destination address and transaction content subjected to signature operation;
the destination block chain node is used for determining a prefix part in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages and the existing block chain, so that the electronic equipment generates a complete named identifier of the first transaction message according to the determined prefix part;
wherein the naming identifier comprises a naming system, a prefix part and a suffix part; the destination blockchain node is a blockchain node selected from all blockchain nodes.
In this embodiment, the blockchain cluster determines a prefix portion in the named identifier of the first transaction message, so that the electronic device generates a complete named identifier of the first transaction message according to the determined prefix portion. Namely, the invention adopts the naming method of naming the identifier, and the user does not name the data at will, so that the data naming mode is more standardized.
It should be noted that, for the specific working process of the blockchain cluster and the blockchain node in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the above embodiment of the blockchain cluster, when the destination blockchain link point is used to determine the prefix portion in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages, and the existing blockchain, the destination blockchain link point is specifically used to:
packaging the first transaction message and all the second transaction messages to generate a block;
a prefix portion in the named identifier of the first transaction message is determined based on the generated tiles and the existing chain of tiles.
Further, the destination block chain node is specifically configured to, when determining the prefix portion in the named identifier of the first transaction message according to the generated block and the existing block chain:
performing a block chain consensus operation on the generated block so that the block is added into the existing block chain to generate a new block chain;
a prefix portion in the named identifier of the first transaction message is generated based on the location of the tile in the new chain of tiles and the location of the first transaction message added to the tile.
Further, the destination blockchain node is configured to perform a blockchain consensus operation on the generated block, so that the block is added to an existing blockchain, and when a new blockchain is generated, the destination blockchain node is specifically configured to:
sending the generated block to all other block chain nodes, so that the block chain nodes of the received block respectively add the block to respective existing block chains to generate a plurality of same new block chains;
the target blockchain node adds the block to the existing blockchain of the target blockchain node, generating a new blockchain.
In this embodiment, a method for determining a prefix portion in a named identifier of a first transaction message according to the first transaction message, all second transaction messages, and an existing blockchain is provided.
It should be noted that, for the specific working process of the blockchain cluster and the blockchain node in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the embodiment of the resource naming method, another embodiment of the present invention provides a resource naming apparatus, which is applied to an electronic device, and with reference to fig. 5, the resource naming apparatus may include:
a message sending module 101, configured to generate and send a first transaction message to the blockchain cluster;
a first obtaining module 102, configured to obtain a determined prefix portion from a blockchain cluster;
a second obtaining module 103, configured to obtain a suffix portion input by a user;
a generating module 104, configured to generate a complete naming identifier of the first transaction message according to the determined prefix portion, the suffix portion input by the user, and a preset naming system.
Further, the generating module is configured to, when generating the complete naming identifier of the first transaction message according to the determined prefix portion, the suffix portion input by the user, and the preset naming system, specifically:
and combining the determined prefix part, the suffix part input by the user and a preset naming system according to a preset combination rule to obtain a complete naming identifier.
In this embodiment, the electronic device of the user may generate a complete naming identifier of the first transaction message, and may form a canonical naming system by using a canonical naming method.
It should be noted that, for the working process of each module in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the embodiments of the method and apparatus for naming a resource, another embodiment of the present invention provides an electronic device, including a sending port and a processor;
the processor is used for generating a first transaction message, acquiring a determined prefix part from the block chain cluster, acquiring a suffix part input by a user, and generating a complete naming identifier of the first transaction message according to the determined prefix part, the suffix part input by the user and a preset naming system;
a send port for sending the first transaction message to the blockchain cluster.
In this embodiment, the electronic device of the user may generate a complete naming identifier of the first transaction message, and may form a canonical naming system by using a canonical naming method.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A resource naming method is applied to a block chain cluster and comprises the following steps:
receiving a first transaction message sent by an electronic device; the first transaction message comprises a source address, a destination address and transaction content subjected to signature operation;
when the first transaction message is legal, acquiring a plurality of second transaction messages sent by other electronic equipment in the same time period with the first transaction message;
determining a prefix part in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages and an existing block chain, so that the electronic equipment generates a complete named identifier of the first transaction message according to the determined prefix part;
wherein the named identifier comprises a naming hierarchy, a prefix portion, and a suffix portion.
2. The naming method of claim 1 wherein determining the prefix portion of the named identifier of the first transaction message based on the first transaction message, all of the second transaction messages, and an existing blockchain comprises:
packaging the first transaction message and all the second transaction messages to generate a block;
determining a prefix portion in a named identifier of the first transaction message based on the generated tiles and the existing tile chain.
3. The naming method of claim 2, wherein determining a prefix portion in a named identifier of said first transaction message based on said generated tiles and said existing chain of tiles comprises:
performing a block chain consensus operation on the generated block so that the block is added into an existing block chain to generate a new block chain;
generating a prefix portion in the named identifier of the first transaction message based on the location of the tile in the new blockchain and the location of the first transaction message added to the tile.
4. The method according to claim 3, wherein performing a blockchain consensus operation on the generated blockchains to add the blockchain to an existing blockchain to generate a new blockchain comprises:
determining a target blockchain node from at least one blockchain node;
the target block chain node sends the generated block to all other block chain nodes;
and the target block chain node and the block chain link point receiving the block respectively add the block to respective existing block chains to generate a plurality of same new block chains.
5. A naming method of resources is applied to electronic equipment and comprises the following steps:
generating and sending a first transaction message to a blockchain cluster, so that the blockchain cluster acquires a plurality of second transaction messages sent by other electronic devices in the same time period as the first transaction message when the first transaction message is legal; determining a prefix part in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages and an existing block chain, so that the electronic equipment generates a complete named identifier of the first transaction message according to the determined prefix part; wherein the named identifier comprises a naming system, a prefix portion, and a suffix portion;
obtaining a determined prefix part from the block chain cluster;
acquiring a suffix part input by a user;
and generating a complete naming identifier of the first transaction message according to the determined prefix part, the suffix part input by the user and a preset naming system.
6. The naming method of claim 5, wherein said generating a full naming identifier for said first transaction message based on a determined prefix portion, a user-entered suffix portion, and a preset naming scheme comprises:
and combining the determined prefix part, the suffix part input by the user and a preset naming system according to a preset combination rule to obtain the complete naming identifier.
7. A blockchain cluster comprising a plurality of blockchain nodes;
each block chain node is used for receiving a first transaction message sent by electronic equipment, and when the first transaction message is legal, a plurality of second transaction messages sent by other electronic equipment in the same time period with the first transaction message are obtained; the first transaction message comprises a source address, a destination address and transaction content subjected to signature operation;
a target blockchain node, configured to determine, according to the first transaction message, all the second transaction messages, and an existing blockchain, a prefix portion in a named identifier of the first transaction message, so that the electronic device generates, according to the determined prefix portion, a complete named identifier of the first transaction message;
wherein the named identifier comprises a naming system, a prefix portion, and a suffix portion; the target blockchain node is a blockchain node selected from all blockchain nodes.
8. The blockchain cluster of claim 7, wherein the target blockchain node, when determining the prefix portion of the named identifier of the first transaction message according to the first transaction message, all of the second transaction messages and the existing blockchain, is specifically configured to:
packaging the first transaction message and all the second transaction messages to generate a block;
determining a prefix portion in a named identifier of the first transaction message based on the generated tiles and the existing tile chain.
9. The blockchain cluster of claim 8, wherein the target blockchain node is configured to, when determining the prefix portion in the named identifier of the first transaction message according to the generated block and the existing blockchain, specifically:
performing a block chain consensus operation on the generated block so that the block is added into an existing block chain to generate a new block chain;
generating a prefix portion in the named identifier of the first transaction message based on the location of the tile in the new blockchain and the location of the first transaction message added to the tile.
10. A blockchain cluster according to claim 9, wherein the target blockchain node is configured to perform a blockchain consensus operation on the generated blocks, so that the blocks are added to an existing blockchain, and when a new blockchain is generated, the target blockchain node is specifically configured to:
sending the generated block to all other block chain nodes, so that the block chain nodes receiving the block respectively add the block to respective existing block chains to generate a plurality of same new block chains;
the target blockchain node adds the block to an existing blockchain of the target blockchain node, generating the new blockchain.
11. A naming device of resources is applied to an electronic device, and comprises:
the message sending module is used for generating and sending a first transaction message to the blockchain cluster so that the blockchain cluster can acquire a plurality of second transaction messages sent by other electronic equipment in the same time period with the first transaction message when the first transaction message is legal; determining a prefix part in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages and an existing block chain, so that the electronic equipment generates a complete named identifier of the first transaction message according to the determined prefix part; wherein the named identifier comprises a naming system, a prefix portion, and a suffix portion;
a first obtaining module, configured to obtain a determined prefix portion from the blockchain cluster;
the second acquisition module is used for acquiring a suffix part input by a user;
and the generating module is used for generating a complete naming identifier of the first transaction message according to the determined prefix part, the suffix part input by the user and a preset naming system.
12. The naming apparatus of claim 11, wherein the generating module, when generating the complete naming identifier of the first transaction message according to the determined prefix portion, the user-entered suffix portion, and the preset naming system, is specifically configured to:
and combining the determined prefix part, the suffix part input by the user and a preset naming system according to a preset combination rule to obtain the complete naming identifier.
13. An electronic device comprising a transmit port and a processor;
the processor is used for generating a first transaction message so that when the first transaction message is legal, the blockchain cluster acquires a plurality of second transaction messages sent by other electronic devices in the same time period as the first transaction message; determining a prefix part in the named identifier of the first transaction message according to the first transaction message, all the second transaction messages and an existing block chain, so that the electronic equipment generates a complete named identifier of the first transaction message according to the determined prefix part; wherein the named identifier comprises a naming system, a prefix portion, and a suffix portion;
acquiring a determined prefix part from the block chain cluster, acquiring a suffix part input by a user, and generating a complete naming identifier of the first transaction message according to the determined prefix part, the suffix part input by the user and a preset naming system;
the sending port is used for sending the first transaction message to the blockchain cluster.
CN201710977060.2A 2017-10-19 2017-10-19 Resource naming method and device, block chain cluster and electronic equipment Active CN107635028B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710977060.2A CN107635028B (en) 2017-10-19 2017-10-19 Resource naming method and device, block chain cluster and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710977060.2A CN107635028B (en) 2017-10-19 2017-10-19 Resource naming method and device, block chain cluster and electronic equipment

Publications (2)

Publication Number Publication Date
CN107635028A CN107635028A (en) 2018-01-26
CN107635028B true CN107635028B (en) 2020-07-28

Family

ID=61104657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710977060.2A Active CN107635028B (en) 2017-10-19 2017-10-19 Resource naming method and device, block chain cluster and electronic equipment

Country Status (1)

Country Link
CN (1) CN107635028B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108600199A (en) * 2018-04-08 2018-09-28 国网浙江省电力有限公司电力科学研究院 A kind of transmission method and system of the Audit data based on block chain
CN109067863B (en) * 2018-07-25 2021-03-05 上海点融信息科技有限责任公司 Method, apparatus and storage medium for managing node identification of blockchain node
US11521202B2 (en) 2018-08-30 2022-12-06 International Business Machines Corporation Distributed computing and storage network implementing high integrity, high bandwidth, low latency, secure processing
US11379828B2 (en) * 2018-08-30 2022-07-05 International Business Machines Corporation Distributed computing and storage network implementing high integrity, high bandwidth, low latency, secure processing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959307A (en) * 2016-06-30 2016-09-21 中国科学院计算技术研究所 Existence certification and authentication service method and system based on block chain technology
CN106656974A (en) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 Block chain grouping consensus method and system
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160283920A1 (en) * 2015-03-28 2016-09-29 Justin Fisher Authentication and verification of digital data utilizing blockchain technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959307A (en) * 2016-06-30 2016-09-21 中国科学院计算技术研究所 Existence certification and authentication service method and system based on block chain technology
CN106656974A (en) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 Block chain grouping consensus method and system
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ODIN:一种基于区块链的自主、安全的开放数据索引命名标识;PPK开放小组;《http://www.ppkpub.org/ppk_odin_cn.html》;20161117;第1-2页 *

Also Published As

Publication number Publication date
CN107635028A (en) 2018-01-26

Similar Documents

Publication Publication Date Title
JP6608256B2 (en) Electronic data existence certification program and existence certification server
JP6877448B2 (en) Methods and systems for guaranteeing computer software using distributed hash tables and blockchain
KR101781583B1 (en) File management and search system based on block chain and file management and search method
TW202029694A (en) Systems and methods for efficient and secure processing, accessing and transmission of data via a blockchain network
CN107635028B (en) Resource naming method and device, block chain cluster and electronic equipment
JP6275302B2 (en) Existence proof device, existence proof method, and program therefor
KR101330392B1 (en) Network nodes and methods for data authorization in distributed storage networks
AU2007240567B2 (en) Peer-to-peer contact exchange
RU2367998C2 (en) Method and system for recognition of registration information
US8082451B2 (en) Data access control
CN103067156B (en) The URL encryption of mobile Internet user resources access, verification method and device
JP2019511761A (en) Method and system for verifying the integrity of digital assets using distributed hash tables and peer-to-peer distributed ledgers
US20050177715A1 (en) Method and system for managing identities in a peer-to-peer networking environment
RU2373572C2 (en) System and method for resolution of names
CN111367923A (en) Data processing method, data processing device, node equipment and storage medium
CN112307116A (en) Data access control method, device and equipment based on block chain
US20210374214A1 (en) Method and system for securing computer software using a distributed hash table and a blockchain
CN110618989A (en) Information processing method, information processing device and related product
CN102523239A (en) Secure sharing method for resource information of Internet of things
CN117034370B (en) Data processing method based on block chain network and related equipment
JP6865338B1 (en) Information processing system
CN115941352B (en) Information security interaction method and device based on big data, electronic equipment and storage medium
JP2003169052A (en) Digital signature system
CN116707813A (en) Block chain-based data processing method, equipment and readable storage medium
JP2024512068A (en) Improved signature verification methods and systems for data applications running on blockchain

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