CN115329348A - Metadata processing method and device based on block chain, computer equipment and medium - Google Patents

Metadata processing method and device based on block chain, computer equipment and medium Download PDF

Info

Publication number
CN115329348A
CN115329348A CN202110512498.XA CN202110512498A CN115329348A CN 115329348 A CN115329348 A CN 115329348A CN 202110512498 A CN202110512498 A CN 202110512498A CN 115329348 A CN115329348 A CN 115329348A
Authority
CN
China
Prior art keywords
metadata
information
metadata information
service
uplink
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110512498.XA
Other languages
Chinese (zh)
Inventor
林岳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110512498.XA priority Critical patent/CN115329348A/en
Publication of CN115329348A publication Critical patent/CN115329348A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • Accounting & Taxation (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a metadata processing method, a device, computer equipment and a medium based on a block chain, wherein the method comprises the following steps: acquiring M metadata information uploaded by N service systems; n and M are both positive integers; respectively analyzing the information format of each metadata information in the M metadata information, and acquiring a metadata information set of which the information format accords with the format standard; when an information uplink instruction is detected, selecting metadata information to be uplink from the metadata information set according to the information uplink instruction, and generating a metadata block according to the metadata information to be uplink; adding the metadata chunk to a chain of service chunks. By the method and the device, the efficiency of managing the metadata information can be improved, and the security of the metadata information is improved.

Description

Block chain-based metadata processing method and apparatus, computer device, and medium
Technical Field
The present application relates to the field of data processing, and in particular, to a metadata processing method and apparatus based on a block chain, a computer device, and a medium.
Background
Metadata is data that describes relationships between data. Metadata in a business system generally refers to data describing Concepts (Concepts), relationships between data (rolls), and Rules for data processing (Rules), wherein domain Semantics (Semantics) and Knowledge (Knowledge) also belong to the category of metadata.
In the prior art, each business system can manage metadata in its own system, for example, each business system can store metadata in its own system, and since there are many formats for storing metadata, the metadata management method in the prior art needs to manage metadata in various formats in each business system, which results in low efficiency of managing metadata and easy tampering of metadata.
Disclosure of Invention
The application provides a metadata processing method, a metadata processing device, a computer device and a media based on a block chain, which can improve the efficiency of managing metadata information and improve the security of the metadata information.
One aspect of the present application provides a metadata processing method based on a block chain, where the method includes:
acquiring M metadata information uploaded by N service systems; n and M are positive integers;
respectively analyzing the information format of each metadata information in the M metadata information, and acquiring a metadata information set of which the information format accords with the format standard;
when an information uplink command is detected, selecting metadata information to be uplink from a metadata information set according to the information uplink command, and generating a metadata block according to the metadata information to be uplink;
the metadata chunk is added to the chain of service chunks.
An aspect of the present application provides a metadata processing apparatus based on a block chain, including:
the information acquisition module is used for acquiring M metadata information uploaded by the N service systems; n and M are both positive integers;
the format analysis module is used for respectively analyzing the information format of each metadata information in the M metadata information and acquiring a metadata information set of which the information format accords with the format standard;
the block generating module is used for selecting the metadata information to be uplink from the metadata information set according to the information uplink command and generating a metadata block according to the metadata information to be uplink when the information uplink command is detected;
and the block uplink module is used for adding the metadata block to the service block chain.
Optionally, the metadata processing apparatus is applied to an accounting node in the service block chain; the metadata processing apparatus is further configured to:
generating a metadata uploading standard;
encrypting the metadata uploading standard based on a node private key of the accounting node to obtain an encrypted metadata uploading standard, and adding the encrypted metadata uploading standard to the service block chain;
and broadcasting the node public key of the accounting node to the N service systems so that the N service systems decrypt the encrypted metadata uploading standard on the service block chain according to the node public key to obtain a data uploading standard, and uploading M metadata information to the accounting node according to the metadata uploading standard.
Optionally, the format parsing module parses the information format of each metadata information in the M metadata information, and obtains a metadata information set whose information format meets the format standard, including:
calling a metadata uploading standard, and respectively analyzing the information formats of the M pieces of metadata information based on the called metadata uploading standard;
determining the metadata information of which the information format is the format indicated by the metadata uploading standard in the M pieces of metadata information as target metadata information conforming to the format standard;
and generating a metadata information set according to the target metadata information.
Optionally, the metadata processing apparatus is further configured to:
setting an information uplink period;
when the time indicated by the periodic node of the information uplink period is reached, generating an information uplink instruction;
when detecting an information uplink command, a block generation module selects a mode of metadata information to be uplink from a metadata information set according to the information uplink command, wherein the mode comprises the following steps:
when an information uplink command is detected, detecting L pieces of metadata information acquired in a target period corresponding to a period node when the metadata information set generates the information uplink command; l is a positive integer less than or equal to M;
and selecting the metadata information to be uplink from the L metadata information.
Optionally, the manner of selecting the metadata information to be linked from the L pieces of metadata information by the block generation module includes:
acquiring an information identifier of each metadata information in the L metadata information;
dividing the metadata information with the same information identifier in the L pieces of metadata information into the same information groups to obtain K information groups; k is a positive integer less than or equal to L;
determining the metadata information with the largest acquired timestamp in each information packet of the K information packets as the de-duplication metadata information;
determining the de-duplication metadata information in each information packet as the metadata information to be uplink.
Optionally, any service system of the N service systems is represented as an ith service system, where i is a positive integer less than or equal to N; the metadata processing apparatus is further configured to:
distributing a system key for the ith service system;
the system key and the system identification of the ith service system are stored in an associated manner;
then, the manner for the information obtaining module to obtain the M metadata information uploaded by the N service systems includes:
acquiring a data uploading request sent by an ith service system; the data uploading request comprises a system identifier, a system key to be verified and metadata information to be verified;
acquiring a system key which is stored in association with the system identifier in the data uploading request;
and if the system key is the same as the system key to be verified, determining the metadata information to be verified as the metadata information uploaded by the ith service system.
Optionally, the manner in which the block uplink module adds the metadata block to the service block chain includes:
broadcasting the metadata blocks to a consensus node in a service block chain so that the consensus node performs consensus on the metadata blocks;
and if the consensus node passes the metadata block consensus, adding the metadata block to the service block chain.
Optionally, after the metadata block is added to the service block chain, the metadata processing apparatus is further configured to:
determining metadata information added to a metadata block on a service block chain as uplink metadata information;
determining a service system to which uplink metadata belongs in the N service systems as a target service system;
returning the block index information of the metadata block on the service block chain to the target service system so that the target service system obtains uplink metadata information from the metadata block on the service block chain according to the block index information;
wherein the block index information includes at least one of: block height of a metadata block, mercker tree root in a metadata block.
Optionally, the uplink metadata information is metadata information generated by settling the target order;
the metadata processing apparatus is further configured to:
acquiring an information acquisition request sent by a target service system; the information acquisition request comprises block index information;
acquiring a metadata block on a service block chain according to the block index information;
and returning the uplink metadata information in the acquired metadata block to the target service system so that the target service system verifies the settlement result of the target order according to the uplink metadata information.
Optionally, the metadata processing apparatus is further configured to:
if a correction instruction aiming at the uplink metadata information in the metadata block is obtained, a correction request aiming at the uplink metadata information is broadcasted to the block chain link point in the service block chain according to the correction instruction;
and if a confirmation instruction of the block link point in the service block chain aiming at the correction request is obtained, correcting the uplink metadata information in the metadata block according to the correction instruction.
An aspect of the application provides a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the method of an aspect of the application.
An aspect of the application provides a computer-readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the above aspect.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternatives of the above aspect and the like.
The method and the device can acquire M metadata information uploaded by N service systems; n and M are positive integers; respectively analyzing the information format of each metadata information in the M metadata information, and acquiring a metadata information set of which the information format accords with the format standard; when an information uplink command is detected, selecting metadata information to be uplink from a metadata information set according to the information uplink command, and generating a metadata block according to the metadata information to be uplink; the metadata chunk is added to the chain of service chunks. Therefore, the method provided by the application can uniformly manage the metadata information of the N service systems through the service block chain (for example, uplink is performed through a uniform information format), so that the efficiency of managing the metadata information of the N service systems is improved, and the security of the metadata information of the N service systems is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a network architecture for managing metadata information according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram illustrating a scenario of uplink of metadata information according to the present application;
FIG. 3 is a flow chart illustrating a block chain-based metadata processing method provided herein;
fig. 4 is a schematic view of a scenario for uploading metadata information provided by the present application;
fig. 5 is a schematic diagram illustrating a scenario for acquiring metadata information to be linked according to the present application;
fig. 6 is a schematic diagram illustrating a block uplink scenario provided in the present application;
FIG. 7 is a schematic diagram of a scenario for acquiring data on a chain according to the present application;
FIG. 8 is a schematic structural diagram of a block chain-based metadata processing apparatus provided in the present application;
fig. 9 is a schematic structural diagram of a computer device provided in the present application.
Detailed Description
The technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings in the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The application also relates to a related technology of the block chain. The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer. The Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, once a new Block is added into the Block chain, the new Block cannot be removed any more, and the blocks record the record data submitted by the nodes in the Block chain system. In the application, the metadata information of the N service systems can be added to the service block chain, and then the metadata information of each service system can be managed on the service block chain in a unified manner.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a network architecture for managing metadata information according to an embodiment of the present disclosure. As shown in fig. 1, the network architecture may include a plurality of (at least two) service systems and a service block chain, and here, the example of the network architecture includes 4 service systems, and the 4 service systems may include a service system 1, a service system 2, a service system 3, and a service system 4. The service blockchain may then include a plurality of blockchain nodes, where the plurality of blockchain nodes may specifically include a blockchain link point 100a, a blockchain link point 101a, a blockchain link point 102a, a blockchain link point 103a, and a blockchain link point 104a. Wherein the block link point 100a may be a billing node in the traffic block chain for generating blocks and adding the generated blocks to the traffic block chain.
Therefore, in the present application, each service system (such as the service system 1, the service system 2, the service system 3, and the service system 4) may upload its metadata information to the service block chain, and the uploading of the metadata information by the service system to the service block chain may be directed to upload its metadata information at a block chain link point in the service block chain. Then, the metadata information of each service system can be managed uniformly through the service block chain.
Further, please refer to fig. 2, wherein fig. 2 is a schematic diagram of a scenario of uplink of metadata information according to the present application. As shown in fig. 2, the service system 1, the service system 2, the service system 3, and the service system 4 may all upload their metadata information to the billing node 100a according to a unified information format, as shown in a block 100b, the metadata information uploaded by the service system acquired by the billing node 100a may include the metadata information 1 uploaded by the service system 1, the metadata information 2 uploaded by the service system 2, the metadata information 3 uploaded by the service system 3, the metadata information 4 uploaded by the service system 4, and the like, and the billing node may uplink the newly acquired metadata information at intervals (e.g., a time period), where it is assumed that the billing node performs uplink on the metadata information 1, the metadata information 2, the metadata information 3, and the metadata information 4 as an example, and please refer to the following description.
The accounting node 100a may generate a metadata block 101b according to the metadata information 1, the metadata information 2, the metadata information 3, and the metadata information 4, the block link points in the service block chain may further include a consensus node, and the accounting node 100a may broadcast the generated metadata block 101b to the consensus node in the service block chain, so that the consensus node performs consensus on the metadata block 101 b. The accounting node 100a, upon detecting that the consensus node has passed the metadata chunk 101b (i.e., the consensus is successful), may add the metadata chunk to the service chunk chain (as shown in block 102 b).
By adopting the method provided by the application, the information formats of the metadata information of each service system can be unified, the metadata information of each service system is managed uniformly through the service block chain, the security of the metadata information of each service system is improved, and the efficiency of managing the metadata information of each service system is improved.
Further, please refer to fig. 3, wherein fig. 3 is a schematic flowchart of a metadata processing method based on a block chain according to the present application. As shown in fig. 3, the method may include:
step S101, M metadata information uploaded by N service systems is obtained; n and M are both positive integers;
in the present application, metadata information of a service system may be added to a service block chain for management, so an execution main body in this application embodiment may be an accounting node in the service block chain, where the accounting node is also an official node, the accounting node belongs to a block chain node in the service block chain, and the accounting node is a node in the service block chain for issuing a metadata upload standard and generating a metadata block, where the metadata upload standard specifies an information format of the metadata information uploaded when the metadata information is uploaded, and the metadata block is a generated block that includes the metadata information uploaded by the service system, which may be specifically referred to the following step S103. The accounting node may be formed by one or more computer devices, and the computer devices may be terminal devices or servers.
The N service systems may be a plurality of service systems with services to and from each other, where N is a positive integer, and a specific value of N may be determined according to an actual application scenario. For example, the N service systems may be systems of N service departments, one service department may correspond to one service system, and the N service systems may upload metadata information that can be viewed from each other to a service block chain. The N service systems upload (may be referred to as broadcasting) metadata information to the service blockchain, i.e. to all blockchain nodes (including accounting nodes) in the service blockchain.
Therefore, the billing node may obtain the M metadata information uploaded by the N service systems, where the M metadata information may not be uploaded by the N service systems at the same time point, or may be continuously uploaded by the N service systems within a period of time, and actually, any service system in the N service systems may upload the metadata information to the service block chain at any time point. M is also a positive integer, and the specific value of M is determined according to the actual application scene.
Here, the metadata information may be simply referred to as metadata, which is data describing a relationship between data. Metadata in a business system generally refers to data describing Concepts (Concepts), relationships between data (rolls), and Rules for data processing (Rules), wherein domain Semantics (Semantics) and Knowledge (Knowledge) also belong to the category of metadata.
Optionally, there may be two types of metadata information, one type is technical metadata information (may be referred to as technical metadata for short), and the other type is service metadata information (may be referred to as service metadata for short).
The technical metadata information is a technical statistical index generated in the data development process, and refers to data used by design and management personnel of the data warehouse for developing and daily managing the data warehouse. The technical metadata information may specifically include a plurality of types, and the plurality of types of technical metadata information may include data source information, description information of data conversion, definition information of objects and data structures in the database, rule information used in data cleaning and data updating, and mapping information of source data to destination data.
The business metadata information represents various attributes and concepts in the enterprise environment by using information such as business names, definitions and descriptions, and the business context behind all data can be regarded as business metadata to a certain extent.
Optionally, the accounting node may further allocate a system key to each service system, where the system key is used to provide the service system with metadata information uploaded to the service block chain, and the accounting node may broadcast the system key allocated to each service system to the corresponding service systems respectively. Each service system can correspond to its own system identifier, the accounting node can respectively store the system identifier of each service system and the system key of each service system in an associated manner, and the subsequent accounting node can quickly retrieve the system key corresponding to the service system through the system identifier of the service system.
For example, any service system in the N service systems may be represented as the ith service system, where i is a positive integer less than or equal to N. Therefore, the accounting node can distribute the system key for the ith service system, and the accounting node can store the system identification of the ith service system and the system key of the ith service system in an associated manner.
Subsequently, the accounting node may obtain a data upload request sent by the ith service system, where the data upload request may include a system identifier of the ith service system, a to-be-verified system key of the ith service system, and to-be-verified metadata information uploaded by the ith service system. Therefore, the accounting node may obtain the system key corresponding to the ith service system according to the system identifier in the data upload request, and when detecting that the system key is the same as the to-be-verified system key in the data upload request, the accounting node may regard the to-be-verified metadata information in the data upload request as authentic, and may use the to-be-verified metadata information as the metadata information uploaded by the ith service system.
In fact, the billing node may obtain the metadata information uploaded by each service system in the same manner as the metadata information uploaded by the ith service system, so as to obtain the M pieces of metadata information.
Alternatively, each service system may be formed by one or more computer devices, and thus operations performed by the service system (such as the operation of uploading metadata information to the service blockchain as described above or the operation of obtaining and viewing metadata information from the service blockchain as described below) may be performed by the computer devices forming the service system. The computer equipment can be terminal equipment or a server.
More, when the service system acquires new metadata information, the newly acquired metadata information can be uploaded to the service block chain (that is, to each block chain node in the service block chain), so as to realize real-time reporting of the metadata information. Or, the service system may set an information uploading period, and upload the metadata information acquired in the corresponding time period to the service block chain when the time corresponding to the node of the period is not reached.
Referring to fig. 4, fig. 4 is a schematic view of a scenario of uploading metadata information provided in the present application. As shown in fig. 4, billing node 100c may generate metadata upload criteria 101c, which metadata upload criteria 101c may include the type of field information that the uploaded metadata information needs to include and the order (e.g., between) the field information. Further, the billing node 100c may encrypt the metadata upload standard 101c by using its own node private key to obtain an encrypted metadata upload standard 102c, and the billing node 100c may issue the encrypted metadata upload standard 101c to the service block chain (as in block 103 c).
Billing node 100c may also broadcast its node public key to service system 104c, which service system 104c may be any one of the service systems. Further, as shown in block 105c, the service system 104c may obtain the encrypted metadata uploading standard 102c from the service block chain (e.g., from any block link point in the service block chain), and may decrypt the encrypted metadata uploading standard 102c by using the obtained node public key of the accounting node 100c, so as to obtain the metadata uploading standard 101c. Further, the service system 104c may upload the metadata information to the service block chain according to the metadata upload standard 101c obtained by decryption.
Step S102, respectively analyzing the information format of each metadata information in the M metadata information, and acquiring a metadata information set of which the information format meets the format standard;
in this application, the billing node may analyze the information format of each metadata information in the M metadata information, respectively. One piece of metadata information may include a plurality of pieces of field information, and thus, an information format of the metadata information may refer to a type of the field information included in the metadata information and an arrangement order between the plurality of pieces of field information.
It will be appreciated, therefore, that the billing node may issue a metadata upload criterion on the service block chain in advance, which indicates which information format of metadata information the service system needs to upload when uploading the metadata information. Specifically, the billing node may first generate a metadata upload standard, the billing node may generate the metadata upload standard according to the metadata upload standard generated by the relevant user operation of the developer, and a metadata client may be provided, and may assign a user account in the metadata client to the developer, so that the developer may instruct the billing node to generate the metadata upload standard in the metadata client through the user account in the metadata client.
The accounting node has a public and private key pair, a public key of the accounting node can be called a node public key of the accounting node, a private key of the accounting node can be called a node private key of the accounting node, and after the metadata uploading standard is generated, the accounting node can encrypt the metadata uploading standard through the node private key of the accounting node to obtain the encrypted metadata uploading standard. The accounting node may add the encrypted metadata upload criterion to the service blockchain, i.e., publish the encrypted metadata upload criterion to the service blockchain.
Meanwhile, the accounting node can broadcast the node public key of the accounting node to the N service systems, and subsequently, each service system can acquire the encrypted metadata uploading standard from the service block chain and decrypt the encrypted metadata uploading standard through the acquired node public key of the accounting node, so that the unencrypted metadata uploading standard can be acquired. Thus, each business system can upload metadata information in the format indicated by the metadata upload standard.
It is understood that an information format conforming to a format standard may refer to a format indicated by a metadata upload standard. Therefore, when the billing node analyzes the information format of each metadata information uploaded by the service system, the billing node may call the metadata uploading standard and analyze the information format of each metadata information through the called metadata uploading standard. The billing node may use, as the metadata information conforming to the format standard, the metadata information in the M pieces of metadata information in the format indicated by the metadata upload standard, and may refer to the metadata information in which the information format conforms to the format standard as the target metadata information. Therefore, the billing node can generate a metadata information set according to the target metadata information, the metadata information set can comprise all the target metadata information, and the number of the target metadata information can be one or more.
For example, when the metadata information is the above-mentioned technical metadata information, a plurality of pieces of field information (one piece of field information may be understood as just one piece of field information) included in one piece of technical metadata information indicated by the data upload standard may sequentially include field information of a data blood margin, field information of a fan-in number, field information of a field name, field information of a field length, and field information of a database table structure.
The data blood relationship is also called as data blood relationship, and the data blood relationship refers to a relationship similar to human social blood relationship formed between data in the processes of generation, processing and circulation to extinction. The fan-in number refers to the number of calling superior modules, and the fan-out number refers to the number of calling inferior modules.
For another example, when the metadata information is the above-mentioned service metadata information, the plurality of field information included in one service metadata information indicated by the data upload standard may sequentially include field information of the service field, field information of the service definition, field information of the service description, field information of the importance level, and field information of the sensitivity level, and therefore, if the service metadata information uploaded by the service system sequentially includes field information of the service field, field information of the service definition, field information of the service description, field information of the importance level, and field information of the sensitivity level, it may be considered that the information format of the service metadata information uploaded by the service system conforms to the format standard.
Step S103, when the information uplink command is detected, selecting the metadata information to be uplink from the metadata information set according to the information uplink command, and generating a metadata block according to the metadata information to be uplink;
in this application, the M pieces of metadata information may be all pieces of metadata information uploaded by N service systems acquired by the accounting node before detecting an information uplink instruction (a latest information uplink instruction), and it can be understood that, each time the accounting node (actually, all block chain nodes) acquires one piece of metadata information, the information format of the metadata information may be analyzed, and whether the information format of the metadata information meets a format standard is determined, in other words, the accounting node may not be the information format of the M pieces of metadata information analyzed at the same time, but may analyze the information format of the acquired metadata information each time each piece of metadata information in the M pieces of metadata information is acquired.
The information uplink command may be generated by a developer indicated in the metadata client through a user account in the metadata client, and sent to the service billing node through the metadata client. Alternatively, the accounting node may also set an information uplink period, where the information uplink period is sent to the accounting node by a developer through a metadata client, and the accounting node may automatically generate an information uplink instruction each time the time indicated by a period node of the information uplink period is reached. For example, the information uplink period may be once every other week for the uplink of metadata information, i.e., blocks are generated every other week, and the accounting node may generate information uplink commands every other week. For example, if the uplink period of the information is set to 2 hours from point 1, the time indicated by the node of the period after point 1 may be point 3, the time indicated by the node of the period after point 3 may be point 5, and so on.
When the accounting node detects the ul command (i.e. detects that the ul command is newly generated), the accounting node may select the metadata information to be uplinked from the metadata information set according to the ul command. The following described information uplink commands are all newly generated information uplink commands, wherein the process of the accounting node obtaining the metadata information to be uplink from the metadata information set may be:
a period corresponding to the period node when the information uplink command is generated may be referred to as a target period, if the 1 st point starts to set the information uplink period to be 2 hours, then the 3 rd point may be calculated as a period node, the 3 rd point may generate an information uplink command, and then the period corresponding to the information uplink command generated by the 3 rd point may be a time period from the 1 st point to the 3 rd point. Therefore, when the information uplink command is detected, the accounting node can detect L pieces of metadata information acquired in a target period in the metadata information set, and the value of L is determined according to an actual application scenario. In other words, the L pieces of metadata information are metadata information whose metadata information centralized acquisition timestamp is in the target period, and the acquisition timestamp of the metadata information may refer to a time when the billing node acquires the metadata information, and may also be understood as a time when the service system uploads the metadata information to the billing node.
After obtaining the L pieces of metadata information in the target period, the bookkeeping node may also perform deduplication on the metadata information, and the specific process may be: each piece of metadata information may correspond to an information identifier, and the same piece of metadata information may correspond to the same information identifier, so it can be understood that each piece of metadata information in the L pieces of metadata information corresponds to an information identifier. Since the same metadata information may be repeatedly broadcast to the billing node at different times by the service system, which may cause the billing node to obtain the same plurality of metadata information, the billing node may perform deduplication on the plurality of metadata information and only reserve the metadata information with the latest timestamp from the plurality of metadata information.
Therefore, optionally, a specific process of obtaining the metadata information to be uplinked from the L pieces of metadata information may be as follows: the accounting node may group the L pieces of metadata information, divide the metadata information having the same information identifier in the L pieces of metadata information into the same information groups, and obtain K pieces of information groups, where K is a positive integer less than or equal to L, a specific value of K is determined according to an actual application scenario, and one information group may include one or more pieces of metadata information having the same information identifier. Thus, the accounting node may use the metadata information with the largest (i.e. the latest) acquisition timestamp in each information packet as the deduplication metadata information, and one information packet may correspond to one deduplication metadata information. Furthermore, the accounting node can use the deduplication metadata information in each information packet as the metadata information to be uplinked.
Referring to fig. 5, fig. 5 is a schematic view of a scenario for acquiring metadata information to be linked according to the present application. As shown in fig. 5, first, L pieces of metadata information acquired in a target period may be acquired from the metadata information set 100d, where L may be equal to 5, and thus the L pieces of metadata information may include metadata information 1, metadata information 2, metadata information 3, metadata information 4, and metadata information 5 in a box 101d, the acquisition time stamps of the metadata information 1, metadata information 2, metadata information 3, metadata information 4, and metadata information 5 sequentially increase, that is, the metadata information 1 is acquired earliest and the metadata information 5 is acquired latest.
The metadata information 1 corresponds to an information identifier a, the metadata information 2 corresponds to an information identifier a, the metadata information 3 corresponds to an information identifier b, the metadata information 4 corresponds to an information identifier b, and the metadata information 5 corresponds to an information identifier c. Further, the L pieces of metadata information may be grouped, and metadata information having the same information identifier may be divided into the same information groups, i.e., information group 1, information group 2, and information group 3 (as shown in block 102 d).
The information packet 1 may include metadata information 1 and metadata information 2 both having an information identifier a, the information packet 2 may include metadata information 3 and metadata information 4 both having an information identifier b, and the information packet 3 may include metadata information 5. Thus, the deduplication metadata information in information packet 1 is metadata information 2, the deduplication metadata information in information packet 2 is metadata information 4, and the deduplication metadata information in information packet 3 is metadata information 5.
The billing node may treat this metadata information 2, 4 and 5 as metadata information to be uplinked (as shown in block 103 d).
After obtaining the metadata information to be uplink, the accounting node may generate a block to which the metadata information to be uplink belongs, and the block may be referred to as a metadata block. The metadata block includes a block header and a block body, the block body includes all metadata information to be linked, and the block header may include a mercker tree root calculated according to the metadata information to be linked in the block body. The metadata block may include metadata information uploaded by different service systems.
Step S104, adding the metadata block to the service block chain;
in this application, the service block chain further includes a plurality of service nodes of common nodes and non-common nodes, the service node does not participate in the common identification of the block, the common nodes participate in the common identification of the block, and both the common nodes and the service nodes record the block passing the common identification on the service block chain. Therefore, the accounting node may broadcast the generated metadata block to a consensus node in the service block chain, so that the consensus node may perform consensus on the metadata block, and after the consensus on the metadata block is completed, the consensus node may broadcast a consensus result for the metadata block to the accounting node, where the consensus result may include a consensus passed result and a consensus failed result. The accounting node may also belong to a consensus node, and if the accounting node detects that the number of consensus nodes, which are consensus passing results of the consensus results of the metadata blocks, in all the consensus nodes reaches a node number threshold (the node number threshold may be determined according to an actual application scenario, and if the node number threshold may be 2/3 of all the consensus nodes), it may consider that all the consensus nodes pass the metadata blocks, and at this time, the accounting node may add the metadata blocks to the service block chain.
Referring to fig. 6, fig. 6 is a schematic view of a block uplink scenario provided in the present application. As shown in fig. 6, it is assumed that the information uplink period is set at time t0, times t0 to t1 belong to a time period, times t1 to t2 belong to a time period, times t2 to t3 belong to a time period, and so on. Therefore, it can be understood that a period node corresponds to each of the time t1, the time t2, and the time t3, for example, the time t1 corresponds to the period node 1, the time t2 corresponds to the period node 2, and the time t3 corresponds to the period node 3, \8230.
Therefore, an information uplink command may be generated at time t1, the M pieces of metadata information at this time are metadata information acquired by the billing node in a time period from t0 to t1, and the billing node may generate a metadata block 1 according to the metadata information acquired in the time period from t0 to t1 and uplink (i.e., add) the metadata block 1 to the service block chain.
Similarly, an information uplink command may be generated at time t2, the M pieces of metadata information at this time are metadata information acquired by the billing node in the time period from t1 to t2, and the billing node may generate a metadata block 2 according to the metadata information acquired in the time period from t1 to t2 and uplink the metadata block 2.
Similarly, an information uplink command may be generated at time t3, the M pieces of metadata information at this time are metadata information acquired by the billing node in the time period from t2 to t3, and the billing node may generate a metadata block 3 according to the metadata information acquired in the time period from t2 to t3, and uplink the metadata block 3. And so on.
After the metadata block is added to the service block chain, the metadata information in the metadata block added to the service block chain may be referred to as uplink metadata information, and the service system to which the uplink metadata information belongs in the N service systems may be referred to as a target service system, in other words, a plurality of uplink metadata information in the metadata block includes metadata information uploaded by the target service system. Therefore, the accounting node can also return the block index information of the metadata block on the service block chain to the target service system, so that the subsequent target service system can acquire the metadata block from the service block chain according to the block index information, and further acquire the metadata information uploaded by the accounting node from the acquired metadata block.
The block index information may be a block height of the metadata block on the service block chain, or may also be a mercker tree root in a block header of the metadata block, or may include both the block height and the mercker tree root, and the mercker tree root may also be used by the service system to perform reliability verification on the metadata block acquired from the service block chain.
It should be noted that each service system can acquire and view metadata information uploaded by the other party on the service block chain. For example, a user account may be assigned to a worker of each service system in the metadata client, and the worker may obtain and view metadata information uploaded by each service system from a service block chain through the user account in the metadata client.
Each service system can acquire metadata information added to the service block chain from any block chain link point in the service block chain.
Further, the uplink metadata information may be metadata information generated by settling (e.g., paying) a target order, which may be completed by the target business system. Therefore, the accounting node can acquire the information acquisition request sent by the target service system, and the information acquisition request may include the block index information. The accounting node may quickly acquire the metadata block on the service block chain according to the block index information, and the accounting node may return the uplink metadata information acquired in the metadata block to the target service system, and the target service system may verify a settlement result of the target order according to the uplink metadata information, where the settlement result may include a payment amount, a payment object (e.g., a payment user), a payment account, and other results.
Referring to fig. 7, fig. 7 is a schematic view of a scene for acquiring data on a chain according to the present application. First, the service system to which the uplink metadata information 100f belongs can be used as the target service system 101f, and after the metadata block is added to the service blockchain 104f, the billing node 102f can return the block height of the metadata block on the service blockchain 104f and the mercker tree root (i.e., the block index information) to the target service system 101f.
Furthermore, when the target service system needs to obtain the uplink metadata information (e.g., when data related to the uplink metadata information needs to be verified), the target service system 101f may quickly find the metadata block from the service block chain by obtaining the block height and/or the root of the mercker tree, and obtain the uplink metadata information from the metadata block (e.g., block 103 f), and the target service system 101f may perform related data verification (e.g., verification of the settlement result of the target order) according to the obtained uplink metadata information.
Furthermore, if the uplink metadata information in the metadata block added to the service block chain has an error, the uplink metadata information in the metadata block may also be modified, and the specific process may be:
if the accounting node acquires the correction instruction for the uplink metadata information, it may broadcast a correction request for the uplink metadata information to the block link points (which may include the above-mentioned common identification node and the service node) in the service block chain according to the correction instruction, and after acquiring the correction request broadcast by the accounting node, if the block link points in the service block chain agree to modify the uplink metadata information, it may generate an acknowledgement instruction for the correction request, and send the acknowledgement instruction to the accounting node. If the accounting node acquires the confirmation instruction sent by the blockchain node exceeding the specified ratio (for example, 2/3) in the service blockchain, the accounting node may modify uplink metadata information in the metadata block in the service blockchain according to the modification instruction, where the modification instruction may instruct the accounting node how to modify the uplink metadata information specifically. The correction instruction may be initiated by a staff of the target business system through a user account in the metadata client, the staff of the target business system may perform a corresponding user operation in the metadata client to generate the correction instruction, and a manner of correcting the uplink metadata information indicated by the correction instruction may be determined by the user operation in the metadata client that the staff of the target business system can perform.
By adopting the method provided by the application, the metadata information of the N service systems can be uniformly managed through the service block chain, and the interfaces of each service system are uniform when the metadata information is uploaded, namely the information formats of the uploaded metadata information are uniform (specifically the formats indicated by the metadata uploading standards), so that the management of the whole metadata information of each service system is more convenient, and the efficiency of managing the metadata information of each service system is improved. In addition, by adding the metadata information of each business system to the business block chain, the security of the metadata information of each business system can be improved, and the non-tamper property of the metadata information of each business system is ensured. Among the purposes and benefits of managing metadata information may be: through the capabilities of collection, storage, retrieval, sharing, opening and the like aiming at the metadata, the business is helped to better understand and apply the data, and the data asset management is also a foundation.
The method and the device can acquire M metadata information uploaded by N service systems; n and M are positive integers; respectively analyzing the information format of each metadata information in the M metadata information, and acquiring a metadata information set of which the information format accords with the format standard; when an information uplink command is detected, selecting metadata information to be uplink from a metadata information set according to the information uplink command, and generating a metadata block according to the metadata information to be uplink; the metadata chunk is added to the service chunk chain. Therefore, the method provided by the application can uniformly manage the metadata information of the N service systems through the service block chain (for example, uplink is performed through a uniform information format), so that the efficiency of managing the metadata information of the N service systems is improved, and the security of the metadata information of the N service systems is improved.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a metadata processing apparatus based on a block chain according to the present application. The blockchain-based metadata processing apparatus may be a computer program (including program code) running in a computer device, for example, the blockchain-based metadata processing apparatus is an application software, and the blockchain-based metadata processing apparatus may be configured to perform corresponding steps in the method provided by the embodiment of the present application. As shown in fig. 8, the block chain-based metadata processing apparatus 1 may include: an information acquisition module 11, a format analysis module 12, a block generation module 13 and a block uplink module 14.
The information acquisition module 11 is configured to acquire M pieces of metadata information uploaded by the N service systems; n and M are positive integers;
the format analysis module 12 is configured to analyze an information format of each metadata information in the M pieces of metadata information, and obtain a metadata information set whose information format meets a format standard;
a block generating module 13, configured to select, when an information uplink command is detected, to-be-uplink metadata information from a metadata information set according to the information uplink command, and generate a metadata block according to the to-be-uplink metadata information;
a block uplink module 14 for adding the metadata block to the service block chain.
Optionally, the metadata processing apparatus 1 is applied to a billing node in the service block chain; the metadata processing apparatus is further configured to:
generating a metadata uploading standard;
encrypting the metadata uploading standard based on a node private key of the accounting node to obtain an encrypted metadata uploading standard, and adding the encrypted metadata uploading standard to the service block chain;
and broadcasting the node public key of the accounting node to the N service systems so that the N service systems decrypt the encrypted metadata uploading standard on the service block chain according to the node public key to obtain a data uploading standard, and uploading M metadata information to the accounting node according to the metadata uploading standard.
Optionally, the manner in which the format parsing module 12 parses the information format of each metadata information in the M metadata information, and obtains the metadata information set whose information format meets the format standard includes:
calling a metadata uploading standard, and respectively analyzing the information formats of the M pieces of metadata information based on the called metadata uploading standard;
determining the metadata information of which the information format is the format indicated by the metadata uploading standard in the M pieces of metadata information as target metadata information conforming to the format standard;
and generating a metadata information set according to the target metadata information.
Optionally, the metadata processing apparatus 1 is further configured to:
setting an information uplink period;
when the time indicated by the periodic node of the information uplink period is reached, generating an information uplink instruction;
when detecting the information uplink command, the block generating module 13 selects a mode of the metadata information to be uplink from the metadata information set according to the information uplink command, including:
when an information uplink instruction is detected, detecting L pieces of metadata information acquired in a target period corresponding to a period node when the metadata information centralizes and generates the information uplink instruction; l is a positive integer less than or equal to M;
and selecting the metadata information to be uplink from the L metadata information.
Optionally, the manner of selecting the metadata information to be linked from the L pieces of metadata information by the block generation module 13 includes:
acquiring an information identifier of each metadata information in the L metadata information;
dividing the metadata information with the same information identification in the L pieces of metadata information into the same information groups to obtain K information groups; k is a positive integer less than or equal to L;
determining the metadata information with the largest acquired timestamp in each information packet of the K information packets as the de-duplication metadata information;
and determining the de-duplication metadata information in each information packet as the metadata information to be uplink.
Optionally, any service system in the N service systems is denoted as an ith service system, where i is a positive integer less than or equal to N; the above-described metadata processing apparatus 1 is further configured to:
distributing a system key for the ith service system;
the system key and the system identification of the ith service system are stored in a correlated manner;
then, the manner for the information obtaining module 11 to obtain the M metadata information uploaded by the N service systems includes:
acquiring a data uploading request sent by an ith service system; the data uploading request comprises a system identifier, a system key to be verified and metadata information to be verified;
acquiring a system key which is stored in association with the system identifier in the data uploading request;
and if the system key is the same as the system key to be verified, determining the metadata information to be verified as the metadata information uploaded by the ith service system.
Optionally, the manner in which the block uplink module 14 adds the metadata block to the service block chain includes:
broadcasting the metadata blocks to a consensus node in a service block chain so that the consensus node performs consensus on the metadata blocks;
and if the consensus node passes the metadata block consensus, adding the metadata block to the service block chain.
Optionally, after the metadata block is added to the service block chain, the metadata processing apparatus 1 is further configured to:
determining metadata information added to a metadata block on a service block chain as uplink metadata information;
determining a service system to which uplink metadata belongs in the N service systems as a target service system;
returning the block index information of the metadata block on the service block chain to the target service system so that the target service system obtains uplink metadata information from the metadata block on the service block chain according to the block index information;
wherein the block index information includes at least one of: block height of a metadata block, mercker tree root in a metadata block.
Optionally, the uplink metadata information is metadata information generated by settling the target order;
the above-described metadata processing apparatus 1 is further configured to:
acquiring an information acquisition request sent by a target service system; the information acquisition request comprises block index information;
acquiring a metadata block on a service block chain according to the block index information;
and returning the uplink metadata information in the acquired metadata block to the target service system so that the target service system verifies the settlement result of the target order according to the uplink metadata information.
Optionally, the metadata processing apparatus 1 is further configured to:
if a correction instruction aiming at the uplink metadata information in the metadata block is obtained, a correction request aiming at the uplink metadata information is broadcasted to the block chain link point in the service block chain according to the correction instruction;
and if a confirmation instruction of the block link point in the service block chain aiming at the correction request is obtained, correcting the uplink metadata information in the metadata block according to the correction instruction.
According to an embodiment of the present application, the steps involved in the block chain based metadata processing method shown in fig. 3 may be performed by respective modules in the block chain based metadata processing apparatus 1 shown in fig. 8. For example, step S101 shown in fig. 3 may be performed by the information obtaining module 11 in fig. 8, and step S102 shown in fig. 3 may be performed by the format parsing module 12 in fig. 8; step S103 shown in fig. 3 may be performed by the block generation module 13 in fig. 8, and step S104 shown in fig. 3 may be performed by the block uplink module 14 in fig. 8.
The method and the device can acquire M metadata information uploaded by N service systems; n and M are positive integers; respectively analyzing the information format of each metadata information in the M metadata information, and acquiring a metadata information set of which the information format accords with the format standard; when an information uplink command is detected, selecting metadata information to be uplink from a metadata information set according to the information uplink command, and generating a metadata block according to the metadata information to be uplink; the metadata chunk is added to the chain of service chunks. Therefore, the device provided by the application can uniformly manage the metadata information of the N service systems through the service block chain (for example, cochain is performed through a uniform information format), so that the efficiency of managing the metadata information of the N service systems is improved, and the security of the metadata information of the N service systems is improved.
According to an embodiment of the present application, each module in the metadata processing apparatus 1 based on the block chain shown in fig. 8 may be respectively or entirely combined into one or several units to form the unit, or some unit(s) therein may be further split into multiple sub-units smaller in function, which may implement the same operation without affecting implementation of technical effects of the embodiment of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of units, or the functions of a plurality of modules can be realized by one unit. In other embodiments of the present application, the block chain based metadata processing apparatus 1 may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of a plurality of units.
According to an embodiment of the present application, the block chain based metadata processing apparatus 1 as shown in fig. 8 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the corresponding method as shown in fig. 3 on a general-purpose computer device such as a computer including a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), and the like processing elements and storage elements, and the block chain based metadata processing method of the embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded into and executed by the computing apparatus via the computer-readable recording medium.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computer device provided in the present application. As shown in fig. 9, the computer apparatus 1000 may include: the processor 1001, the network interface 1004, and the memory 1005, and the computer device 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 9, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the computer device 1000 shown in fig. 9, the network interface 1004 may provide a network communication function; the user interface 1003 is an interface for providing a user with input; and the processor 1001 may be configured to invoke the device control application stored in the memory 1005 to implement:
acquiring M metadata information uploaded by N service systems; n and M are positive integers;
respectively analyzing the information format of each metadata information in the M metadata information, and acquiring a metadata information set of which the information format accords with the format standard;
when an information uplink instruction is detected, selecting metadata information to be uplink from the metadata information set according to the information uplink instruction, and generating a metadata block according to the metadata information to be uplink;
the metadata chunk is added to the service chunk chain.
It should be understood that the computer device 1000 described in this embodiment may perform the description of the above metadata processing method based on a block chain in the embodiment corresponding to fig. 3, and may also perform the description of the above metadata processing apparatus 1 based on a block chain in the embodiment corresponding to fig. 8, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: the present application further provides a computer readable storage medium, and the computer readable storage medium stores therein the aforementioned computer program executed by the block chain based metadata processing apparatus 1, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the block chain based metadata processing method in the embodiment corresponding to fig. 3 can be performed, so that the description will not be repeated herein. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium referred to in the present application, reference is made to the description of the embodiments of the method of the present application.
As an example, the program instructions described above may be executed on one computer device, or on multiple computer devices located at one site, or on multiple computer devices distributed over multiple sites and interconnected by a communication network, which may constitute a blockchain network.
The computer-readable storage medium may be the metadata processing apparatus based on the block chain provided in any of the foregoing embodiments or an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash card (flash card), and the like, provided on the computer device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the computer device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the computer device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
A computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the computer device performs the description of the above metadata processing method based on the block chain in the embodiment corresponding to fig. 3, which will not be described herein again. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application.
The terms "first," "second," and the like in the description and in the claims and drawings of the embodiments of the present application are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or modules recited, but may alternatively include other steps or modules not recited, or may alternatively include other steps or elements inherent to such process, method, apparatus, article, or apparatus.
Those of ordinary skill in the art will appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The method and the related apparatus provided by the embodiments of the present application are described with reference to the flowchart and/or the structural diagram of the method provided by the embodiments of the present application, and specifically, each flow and/or block of the flowchart and/or the structural diagram of the method, and the combination of the flows and/or blocks in the flowchart and/or the block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block or blocks.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (15)

1. A method for processing metadata based on a block chain, the method comprising:
acquiring M metadata information uploaded by N service systems; n and M are both positive integers;
respectively analyzing the information format of each metadata information in the M metadata information, and acquiring a metadata information set of which the information format accords with the format standard;
when an information uplink instruction is detected, selecting metadata information to be uplink from the metadata information set according to the information uplink instruction, and generating a metadata block according to the metadata information to be uplink;
adding the metadata chunk to a chain of service chunks.
2. The method of claim 1, wherein the metadata processing method is performed by a billing node in the service block chain; the method further comprises the following steps:
generating a metadata uploading standard;
encrypting the metadata uploading standard based on a node private key of the accounting node to obtain the encrypted metadata uploading standard, and adding the encrypted metadata uploading standard to the service block chain;
and broadcasting the node public key of the accounting node to the N service systems, so that the N service systems decrypt the encrypted metadata uploading standard on the service block chain according to the node public key to obtain the data uploading standard, and uploading the M pieces of metadata information to the accounting node according to the metadata uploading standard.
3. The method according to claim 2, wherein the parsing the information format of each of the M pieces of metadata information and obtaining a set of metadata information whose information format conforms to a format standard respectively comprises:
calling the metadata uploading standard, and respectively analyzing the information formats of the M pieces of metadata information based on the called metadata uploading standard;
determining the metadata information of which the information format is the format indicated by the metadata uploading standard in the M pieces of metadata information as target metadata information conforming to the format standard;
and generating the metadata information set according to the target metadata information.
4. The method of claim 1, further comprising:
setting an information uplink period;
generating the information uplink command when the time indicated by the periodic node of the information uplink period is reached;
when the information uplink instruction is detected, selecting the metadata information to be uplink from the metadata information set according to the information uplink instruction, including:
when the information uplink command is detected, detecting L pieces of metadata information acquired in a target period corresponding to a period node when the metadata information set generates the information uplink command; l is a positive integer less than or equal to M;
and selecting the metadata information to be uplinked from the L pieces of metadata information.
5. The method of claim 4, wherein the selecting the metadata information to be uplink from the L metadata information comprises:
acquiring an information identifier of each metadata information in the L metadata information;
dividing the metadata information with the same information identification in the L pieces of metadata information into the same information groups to obtain K information groups; k is a positive integer less than or equal to L;
determining the metadata information with the largest acquired timestamp in each information packet of the K information packets as de-duplication metadata information;
determining the deduplication metadata information in each information packet as the metadata information to be uplinked.
6. The method of claim 1, wherein any of the N business systems is represented as an ith business system, i being a positive integer less than or equal to N; the method further comprises the following steps:
distributing a system key for the ith service system;
the system key and the system identification of the ith service system are stored in an associated manner;
then, the obtaining of the M pieces of metadata information uploaded by the N service systems includes:
acquiring a data uploading request sent by the ith service system; the data uploading request comprises the system identification, a system key to be verified and metadata information to be verified;
acquiring the system key which is stored in association with the system identifier in the data uploading request;
and if the system key is the same as the system key to be verified, determining the metadata information to be verified as the metadata information uploaded by the ith service system.
7. The method of claim 1, wherein adding the metadata chunk to a service chunk chain comprises:
broadcasting the metadata blocks to a consensus node in the service block chain so that the consensus node performs consensus on the metadata blocks;
and if the consensus node passes the consensus on the metadata block, adding the metadata block to the service block chain.
8. The method of claim 1, wherein after adding the metadata chunk to the service chunk chain, the method further comprises:
determining metadata information added to the metadata block on the service block chain as uplink metadata information;
determining a service system to which the uplink metadata belongs in the N service systems as a target service system;
returning the block index information of the metadata block on the service block chain to the target service system so that the target service system acquires the uplink metadata information from the metadata block on the service block chain according to the block index information;
wherein the block index information includes at least one of: a block height of the metadata block, a root of a Merck tree in the metadata block.
9. The method of claim 8 wherein the uplink metadata information is metadata information generated by settling a target order;
the method further comprises the following steps:
acquiring an information acquisition request sent by the target service system; the information acquisition request comprises the block index information;
acquiring the metadata block on the service block chain according to the block index information;
and returning the uplink metadata information in the acquired metadata block to the target service system so that the target service system verifies the settlement result of the target order according to the uplink metadata information.
10. The method of claim 8, further comprising:
if a correction instruction aiming at the uplink metadata information in the metadata block is obtained, a correction request aiming at the uplink metadata information is broadcasted to block chain nodes in the service block chain according to the correction instruction;
and if a confirmation instruction of a block link point in the service block chain aiming at the correction request is obtained, correcting the uplink metadata information in the metadata block according to the correction instruction.
11. An apparatus for block chain based metadata processing, the apparatus comprising:
the information acquisition module is used for acquiring M metadata information uploaded by the N service systems; n and M are both positive integers;
the format analysis module is used for respectively analyzing the information format of each metadata information in the M metadata information and acquiring a metadata information set of which the information format accords with the format standard;
the block generation module is used for selecting metadata information to be uplink-linked from the metadata information set according to the information uplink-linking instruction when the information uplink-linking instruction is detected, and generating a metadata block according to the metadata information to be uplink-linked;
a block uplink module for adding the metadata block to a service block chain.
12. The apparatus according to claim 11, wherein the metadata processing means is applied to a billing node in the service block chain; the metadata processing apparatus is further configured to:
generating a metadata uploading standard;
encrypting the metadata uploading standard based on a node private key of the accounting node to obtain the encrypted metadata uploading standard, and adding the encrypted metadata uploading standard to the service block chain;
and broadcasting the node public key of the accounting node to the N service systems, so that the N service systems decrypt the encrypted metadata uploading standard on the service block chain according to the node public key to obtain the data uploading standard, and uploading the M pieces of metadata information to the accounting node according to the metadata uploading standard.
13. The apparatus of claim 12, wherein the format parsing module is specifically configured to:
calling the metadata uploading standard, and respectively analyzing the information formats of the M pieces of metadata information based on the called metadata uploading standard;
determining the metadata information of which the information format is the format indicated by the metadata uploading standard in the M pieces of metadata information as target metadata information conforming to the format standard;
and generating the metadata information set according to the target metadata information.
14. A computer arrangement comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the method according to any one of claims 1-10.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program adapted to be loaded by a processor and to perform the method of any of claims 1-10.
CN202110512498.XA 2021-05-11 2021-05-11 Metadata processing method and device based on block chain, computer equipment and medium Pending CN115329348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110512498.XA CN115329348A (en) 2021-05-11 2021-05-11 Metadata processing method and device based on block chain, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110512498.XA CN115329348A (en) 2021-05-11 2021-05-11 Metadata processing method and device based on block chain, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN115329348A true CN115329348A (en) 2022-11-11

Family

ID=83911966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110512498.XA Pending CN115329348A (en) 2021-05-11 2021-05-11 Metadata processing method and device based on block chain, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN115329348A (en)

Similar Documents

Publication Publication Date Title
CN110599173B (en) Block chain consensus node determination method, device, equipment and storage medium
CN111737724B (en) Data processing method and device, intelligent equipment and storage medium
CN111445333B (en) Block generation method, device, computer equipment and storage medium
CN108550037B (en) File processing method and device based on block chain
CN110933163B (en) Block chain contract deployment method, device, equipment and storage medium
WO2021233049A1 (en) Blockchain–based data processing method, apparatus, device, and readable storage medium
CN115210741B (en) Partially ordered blockchain
CN112686671B (en) Intelligent contract deployment method, device, equipment and medium based on block chain
CN111427957A (en) Block chain voting information verification method, device, equipment and storage medium
CN111314067A (en) Block storage method and device, computer equipment and storage medium
CN109067732A (en) Internet of things equipment and data insertion system, method and computer readable storage medium
CN111488372A (en) Data processing method, device and storage medium
CN111324663A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN111324517B (en) Application service supervision method, supervision server and storage medium
CN111475778A (en) Music data processing method and device based on block chain
CN113505260A (en) Face recognition method and device, computer readable medium and electronic equipment
CN112215710A (en) Annuity data processing method, block chain system, medium and electronic device
KR102196574B1 (en) Sales Information Management System Based on Block chain And Sales Information Management Method Based on Block chain
US20220114276A1 (en) Controlling a data network with respect to a use of a distributed database
US20200043016A1 (en) Network node for processing measurement data
CN111008900A (en) Data distribution method and device based on intelligent contract
CN113592453B (en) Information system operation compliance examining method and system based on block chain
CN115329348A (en) Metadata processing method and device based on block chain, computer equipment and medium
CN110598475A (en) Block chain-based work attribute information acquisition method and device and computer equipment
CN113259384B (en) Mechanism model call information processing method, server and system based on block chain

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