CN114610991A - Multi-source data fusion full-period traceability analysis method and system based on block chain - Google Patents

Multi-source data fusion full-period traceability analysis method and system based on block chain Download PDF

Info

Publication number
CN114610991A
CN114610991A CN202210195456.2A CN202210195456A CN114610991A CN 114610991 A CN114610991 A CN 114610991A CN 202210195456 A CN202210195456 A CN 202210195456A CN 114610991 A CN114610991 A CN 114610991A
Authority
CN
China
Prior art keywords
data
module
identity
user
block chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210195456.2A
Other languages
Chinese (zh)
Other versions
CN114610991B (en
Inventor
伍前红
沈宇婷
王堃
谢思芃
祝令柱
王亚淞
杜楚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
CETC 54 Research Institute
Original Assignee
Beihang University
CETC 54 Research Institute
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 Beihang University, CETC 54 Research Institute filed Critical Beihang University
Priority to CN202210195456.2A priority Critical patent/CN114610991B/en
Publication of CN114610991A publication Critical patent/CN114610991A/en
Application granted granted Critical
Publication of CN114610991B publication Critical patent/CN114610991B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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/24Querying
    • G06F16/248Presentation of query results
    • 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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Abstract

The invention belongs to the technical field of block chains, and relates to a block chain-based multi-source data fusion full-period traceability analysis method and system. The method comprises the steps of customizing different formats for multi-source data, and meeting the use requirements of a user on multi-source data fusion traceability analysis; by means of RPC, the system constructs micro-services interacting with the block chain evidence storing and tracing system for the user; the identity of the user is verified, and the user with the corresponding authority can report the data or confirm the data reported by the user by collecting letters; the block chain system records the whole period of legal data in a chain, and provides a source tracing function for data and behaviors while ensuring the consistency and integrity of the data; legal users can trace the source of the data, and the source tracing data are displayed by a visual interface.

Description

Multi-source data fusion full-period traceability analysis method and system based on block chain
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a block chain-based multi-source data fusion full-period traceability analysis method and system.
Background
Blockchain technology is a computer network, cryptography, and distributed system based technology. It uses cryptography to connect blocks. Each block contains the hash value, timestamp and ledger of the previous block. The information on the chain is identified through the whole network to form a permanent record. The purpose of block chain birth is to solve the problems of high commission charge, high dependence and the like in centralized accounting. As blockchains evolve, more and more blockchain-based applications are applied. The characteristics of the block chain are very helpful for solving the problems existing in the prior system application.
At present, the main application scenarios of the blockchain are data service, digital currency, finance, smart cities, internet of things and the like. The data service is gradually transited and upgraded from traditional manual processing and paper processing to automatic processing and networking processing. Important functions in data services are efficient recording of data and prevention of illegal tampering of data after recording. The current mainstream recording mode is to adopt a centralized database or to entrust a third party to record data. The former causes a problem of excessive data concentration, and reduces the usability of data when ineffectiveness occurs; the latter will make the data owner lose the absolute control right of the data, and the confidentiality and integrity of the data cannot be guaranteed.
At present, no effective method for solving the problems of data centralization and uncontrollable data access authority faced by data recording in data service exists.
Disclosure of Invention
The invention provides a block chain-based multi-source data fusion full-period traceability analysis method and system, which are used for solving the traceability tracking problem of multi-source data and promoting the development of a block chain in the data traceability aspect.
A multisource data fusion full-period traceability analysis method based on a block chain comprises the following steps:
designing an extensible data format, wherein the data format comprises required key fields, and designing a data transmission method based on the data format;
the user submits the data according to a designed transmission method, and after the data is transmitted to the letter collector, the letter collector confirms the letter collection of the data; the data reported by the user and the letter collection confirmation operation behavior of letter collection personnel on the reported data are all recorded in a chain to form traceability data;
and after the data records are linked, the users with the related authority inquire the linked data, and the inquired data is processed by the Web front end and then displayed to the system users for the users to analyze the traceability data.
Further, the extensible data comprises user data and source tracing data;
the user data is information data of system users and comprises user units, user names and user identities;
the tracing data comprises opinion data and letter collection confirmation data for the opinions, wherein the opinion data comprises opinion related fields and extension fields, and the letter collection confirmation data for the opinions comprises letter collection confirmation related fields and extension fields.
Furthermore, the data transmission method is a method for performing data interaction between a block chain and an entity outside the chain, and the realization principle is that the external service of the block chain is encapsulated, and a micro-service interacting with the chain is constructed by using an RPC technology;
the RPC is a transmission mode in a data transmission method.
Furthermore, the data reporting is that a user reports data to a block chain by using an RPC technology, after the data transmission is linked, the block chain calls a data transmission interface to transmit the data to a letter collector, and the letter collector with a legal identity submits letter collection confirmation data to the chain after letter collection confirmation is carried out on the data;
the data transmission structure is an interface packaged in the transmission method.
Further, the uplink of data records related information submitted by a user with a legal identity in a blockchain;
the related information comprises user information and data submitted by the user.
Further, the data tracing analysis includes: the RPC is utilized to realize the query of the block chain information and display the queried data by utilizing the front end;
the front-end display is the visual display of the data inquired by the RPC by utilizing the Echart.
A multisource data fusion full-cycle traceability analysis system based on a block chain comprises: the system comprises a block chain basic service module, a user identity management module, a traceability system basic function module, a data operation recording module and a traceability analysis module;
the block chain basic service module is used for constructing a block chain infrastructure supporting the traceability analysis system, receiving input parameters of the data operation recording module and the traceability analysis module, processing in a block chain network according to the input parameters, and returning a processing result to the data operation recording module and the data analysis module through the traceability system basic function module;
the user identity management module is used for carrying out identity management, identity distribution and identity authentication on the user based on the block chain infrastructure, the user identity exists in a file form, the distributed identity is authenticated by the traceability system basic function module, and the user passing identity authentication can use the functions of the traceability system basic function module;
the tracing system basic function module is used for providing an identity authentication and data transmission interface, the identity authentication function is interacted with the user identity management module, the data transmission interface is interacted with the block chain basic service module, the data operation recording module and the tracing analysis module, and the data transmission interface serves as an intermediate layer module for communication between the data operation recording module and the tracing analysis module and the block chain basic service module;
the data operation recording module is used for transmitting parameters by using a data transmission interface of the source tracing system basic function module, transmitting data to be recorded to the block chain basic service module for uplink, and recording data uplink state information returned by the block chain basic service module.
The tracing analysis module is used for providing a data query interface, transmitting parameters to the block chain basic service module by using the data transmission interface of the tracing system basic function module, receiving a query result given by the block chain basic service module and visually displaying data returned by the block chain basic service module.
Further, the block chain infrastructure constructed by the block chain basic service module comprises a block chain network parameter setting submodule, a creating and rule management submodule and an intelligent contract submodule;
the block chain network parameter setting submodule is used for meeting the network environment required by system operation based on the design requirement of the system;
the creating and rule management submodule is used for organizing and adding the block chain into a specific channel, wherein the channel is a communication channel created by a specific alliance, and the channel rule is used for auditing the user identity;
the intelligent contract submodule is a contract which can meet the multi-source data traceability requirement, the data operation recording module links data information through the contract, and the traceability analysis module inquires the required data content through the contract.
Furthermore, the user identity management module comprises an identity management sub-module, an identity distribution sub-module and an identity right sub-module;
the identity management submodule is used for CA deployment, the CA is interacted with a digital certificate issuing mechanism in a block chain when the CA is deployed, the CA is used for issuing a TLS certificate in an organization member to ensure the safety of user identity information in a alliance chain network, and the TLS certificate adopts an offline distribution mode;
the identity distribution submodule is divided into identity distribution of Order organization and identity distribution of Peer organization, the organization comprises an administrator and a plurality of users, the identity distribution in the two organizations is issued by an organization CA, the CA in one organization firstly issues the certificate of the administrator and then issues other user certificates, and the other user certificates are distributed offline by the administrator;
the identity authority sub-module is divided into four different identity authorities, namely admin, peer, order and user, and the identity authorities are marked in the distributed identity files; the admin identity has the highest authority in the organization, and directly interacts with the CA to manage the identity and make a calling strategy of a contract in the organization; the peer identity has the interactive authority with the block chain network, and a contract in the block chain network is called to generate a transaction block; the order identity has the authority to sort the blocks, so that the block chain network is consistent through a consensus algorithm; the user identity interacts with the peer node, and a contract is called according to a contract calling strategy; one Order organization only has the identities of the admin, the Order and the user, one Peer organization only has the identities of the admin, the Peer and the user, one organization can be both the Order organization and the Peer organization, and the CA directly issues the identities containing the four rights.
Furthermore, the source tracing system basic function module comprises a basic system function sub-module, a micro-service sub-module and a chain code operation sub-module;
the basic system function sub-module is used for providing an identity authentication function, wherein the identity refers to the identity on a user chain issued by the user identity management module, and the module receives identity information transmitted by a user and executes identity verification and identity authentication operation;
the micro-service sub-module comprises an RPC (remote procedure call) service end module, a data recording service module and a data query service module, wherein the RPC service end module is used for processing parameters transmitted by the data operation recording module and the data traceability analysis service module and distributing a request to the data recording service module and the data query service module, and the data recording service module and the data query service module call a multi-source traceability contract through a chain code operation sub-module to finish data recording operation and data query operation;
the chain code operation sub-module is divided into a data definition module, a data query module and a data storage module; the data definition module is used for defining data structures of opinion data and letter acquisition confirmation data, three extensible fields are reserved for increasing application scenes, the data definition module is a dependence condition of the data query module and the data storage module, and the data query module and the data storage module perform data increasing, changing and checking functions according to data defined in the data definition module; the data query module is used for processing query parameters transmitted by the data query service module in the micro-service sub-module, calling a multi-source data traceability contract in the block chain basic service module through the query parameters, and executing common query, joint query and rich query on a chain through a state database; and the data storage module is used for converting the data parameters transmitted by the data operation record service module in the micro-service submodule into JSON byte strings through a multi-source data source-tracing contract in the block chain basic service module and storing the byte strings into a chain state database.
Furthermore, the data operation recording module comprises a data definition submodule and a data updating submodule;
the data definition submodule defines user record information and data record information, the module is consistent with information in a data definition module in the chain code operation submodule and is additionally provided with a field for explaining the data type, the data definition submodule is a dependence condition of the data updating submodule, and the data which is additionally and additionally changed by the data updating submodule strictly complies with a data format defined in the data definition submodule;
the data updating submodule comprises: newly creating a user record, modifying the user record, newly creating a data record and modifying the data record, wherein the newly creating the user record and modifying the user record depend on the user identity management module function, namely, the identity of any data updating submodule for updating the record on the chain is the identity signed and issued in the identity management function; the newly-created data records and the modified data records depend on the data storage function of the chain code operation submodule, that is, the data records of any data updating submodule which updates and records on the chain are the data recorded by the data storage module.
Further, the source tracing analysis module comprises: the on-chain data query submodule and the source tracing data visualization submodule;
the on-chain data query submodule is used for querying on-chain information, verifying the identity of a user querying the information, and finally summarizing the queried data and providing the summarized data to the visual display module; the on-chain information query depends on a data query module of the chain code operation submodule, namely the on-chain data query submodule transmits the parameters to the data query module of the chain code operation submodule and obtains a return value from the parameters; the user identity verification depends on the identity authentication function provided by the basic system function sub-module, and only the user who passes the identity authentication has the right to perform the query operation;
the traceability data visualization sub-module comprises traceability data storage database selection and visualization display functions, wherein the traceability data storage database selects the state database as CouchDB in order to meet the functional requirements of system storage data, the visualization display function uses the Echarts drawing library for drawing, obtains query data to be displayed from the chained data query sub-module, and calls the front-end drawing library to display a corresponding visualization traceability interface after obtaining corresponding data.
The invention has the beneficial effects that:
according to the multisource data fusion full-period traceability analysis method and system based on the block chain, a new data traceability mode is established by utilizing the characteristics that the block chain is not falsifiable and the data is traceable, the integrity of the data is guaranteed, meanwhile, the data can be traced fully periodically, and the problem that the confidentiality and the integrity of the data are lost when the existing data is stored in a centralized database or a third-party database is solved; furthermore, the relevant information through the operation on the data is as follows: data operation objects, data operation time, data operation results and the like are recorded, and a data operator can be subjected to responsibility tracing when an abnormal situation occurs. The system provides services externally in a micro-service mode, supports an extensible visual interface display function, is convenient for users to use, and promotes the development of a block chain.
Drawings
FIG. 1 illustrates a block chain-based full-cycle traceability analysis method for multi-source fusion data in an embodiment of the present invention;
FIG. 2 shows a block chain-based full-cycle traceability analysis system for multi-source fusion data in an embodiment of the present invention.
Detailed Description
The multisource data fusion full-cycle traceability analysis method based on the block chain provided by the embodiment, as shown in fig. 1, includes the following processes:
designing a multi-source tracing data format: the tracing data is mainly divided into two categories, one is user information and the other is data information. The users are divided into six types, and the names and the responsibilities are respectively as follows: the network administrator manages network access and configures sequencing nodes; organizing administrators, assigning identities and certificate distribution; auditors, audit data and data source tracing; operating a recorder, and calling an intelligent contract to record information; the letter collecting personnel collects letters and confirms the information reported by the user and provides letter collecting confirmation opinions; the general members, reporting the opinions. The data is divided into opinion data and letter collecting confirmation data, and the opinion data and the description are respectively as follows: opinion IDs, representing ID entries in the opinion table; an opinion occurrence place which represents a place where recording occurs; an opinion object representing a recorded data object; an operation type indicating the operation type of the record; opinion time, which represents the initiation time of recording opinion; a decision time indicating a time at which the opinion is finally decided; and three extension fields are flexibly customized according to different use scenes. The data and description of the letter collection confirmation are respectively as follows: the generation place of the letter collection confirmation represents a letter collection confirmation department; the credit acquisition personnel represent credit acquisition confirmers; a letter collection confirmation object representing an opinion object of letter collection confirmation; the time for confirming the letter collection, which represents the time for confirming the letter collection; a letter acquisition confirmation result indicating a result of the letter acquisition confirmation; and three extension fields are flexibly customized according to different use scenes.
Multi-source tracing data transmission operation: the data transmission method is a method for performing data interaction between a block chain and an entity outside the chain, and the realization principle is that the external service of the block chain is packaged, and the micro-service interacting with the chain is constructed by using an RPC technology. The RPC technology mainly comprises a function system RPC call and a block chain interactive RPC; the functional system RPC comprises a query system RPC and an update system RPC; the RPC query system comprises data ID-opinion query, data ID-letter collection confirmation query, user information-opinion query, user information-letter collection confirmation query and Ad hoc (Ad hoc) query (the query function is provided for the user to define the query requirement, namely the query function of the user-defined query statement); the updating system RPC comprises creating opinion information, creating letter acquisition confirmation information and updating opinion information; the blockchain interaction RPC includes an evaluate transaction (evaluate transaction) call and a submit transaction (submit transaction) call. In general, a data operation may go through one of two routes: (1) firstly, calling a query system RPC in a functional system RPC, and then calling an assessment transaction RPC in a block chain interactive RPC; (2) the update system RPC is first called in the functional system RPC, and then the commit transaction RPC is called in the block chain interaction RPC. When issuing identity, the interaction mode between Fabric CA SDK and Fabric CA Server is realized by REST API, the API uses HTTP mode, calling can be completed by simple URL and HTTP command, REST API may also be one of introduction contents.
Multi-source tracing data reporting and letter collection confirmation operation: the operation of collecting confirmations of multi-source data is mainly divided into opinion submission and opinion collecting confirmation. The opinion submitting operation is carried out by a user, the system firstly checks whether the user authority of the submitted opinion meets the requirement, then the block chain system needs to carry out identity verification on the user submitting the opinion, and after the two rounds of identity verification, the opinion and information related to the opinion can be stored in the block chain. And after the opinions are confirmed to be effective, the system enters a letter collection confirmation process, the system sends a letter collection confirmation request to a letter collection confirmation program to inform letter collection personnel to carry out letter collection confirmation, the letter collection personnel receives the data and then carries out letter collection confirmation on the data, and the letter collection confirmation results comprise two results of approval execution and refution opinions. The method comprises the steps that after the letter picking personnel check data, letter picking confirmation opinions are proposed, the system firstly checks whether the personnel submitting the letter picking confirmation opinions have related authority, then the block chain system checks whether the personnel submitting the letter picking confirmation opinions have legal chain identities, and only the letter picking confirmation opinions proposed by the letter picking personnel with the legal identities after two rounds of checking can be recorded on a chain.
Multi-source traceability data record cochain: the operation that a user submits a data application and a letter collecting person confirms passing or refusing needs to be recorded in a block chain, and the step only needs that the user sends a calling parameter to the service of the system while calling the original system interface. There are two ways of data recording uplink: the operation of recording the uplink can occur after the user or the letter collector operates the data, which means that the blockchain is in a passive recording mode, and the blockchain only serves as a log system on one chain, thereby facilitating the subsequent tracing and tracing; the recording uplink operation may also occur before the user or the operator performs the data operation, which means that the blockchain is in the active recording mode, and the blockchain will serve as an auditing component to ensure that the data operation is performed, and this way also maintains the data tracking capability. And according to the operation record of the user or the letter collecting personnel on the data, the block chain records and chains the data transmitted from the data interface to prepare for the tracing of the subsequent data. The data uplink operation needs to verify the identity authority of the user, only the user with the related authority can submit the data to uplink, the identities are generally distributed by an administrator of an organization, and the distribution mode is generally offline distribution so as to ensure that the identity information of the administrator of the organization and the identity information of the user are not leaked.
Multi-source tracing data tracing analysis: the source tracing analysis of the multi-source data is the core function of the invention, and mainly comprises two key steps, namely data query and visualization processing. Data query needs to interact with a block chain, and a state database in a block chain network is accessed through a chain code; and the visualization processing is to collect the inquired data, interact with the front end and visually display the inquired data.
Further, data queries are divided into data-centric queries and user-centric queries. And submitting the inquired parameters to the Peer node by the user meeting the authority, and calling the chain code in the container by the Peer node to analyze the parameters. If the analysis fails, the Peer sends error information to the server, and if the analysis succeeds, the system inquires related data. And returning the query result through the JSON character string, wherein the return form is a K-V pair, the ID of the data or the user is the value of Key, and V is the detailed content of the data corresponding to Key. The query result will be passed through the form of a TCP network connection. Passed to the back-end SDK program.
Further, the visualization processing is responsible for visually displaying the queried data. The visualization display is carried out by Echarts, and the main flow is as follows: selecting a DIV label in an HTML webpage, defining the DIV label as a subsequent drawing canvas, displaying a Loading interface on the canvas, and waiting for the arrival of asynchronous data; the method comprises the steps that a front end applies for data to a rear end, after the data arrive, the front end analyzes Map type data by using a JavaScript script, the data are classified by taking a time sequence as the data, a first time option is selected by default for drawing, and a starting node and a destination node are drawn firstly in the process; according to the selection of time option, extracting data corresponding to time point from the acquired data, putting the opinion UUID, the opinion ID, the opinion department, the opinion presenter, the opinion type and the opinion time in each piece of opinion information into different opinion nodes, allocating a calculated X1 and Y value to the node, and connecting the initial node with the opinion node; for the nodes, inquiring the letter collection confirmation information, putting the UUID, the letter collection confirmation department, the letter collection personnel and the letter collection confirmation time of the letter collection confirmation information into the multimedia message confirmation node, distributing a calculated X1 and Y value to the node, connecting the corresponding opinion node with the letter collection confirmation node, and connecting the letter collection node with the destination node; extracting the information of the letter collection personnel in the letter collection confirmation information, inserting the information of the letter collection personnel into a selection column on the right side of the canvas, and enabling a user to click the information of the letter collection personnel for further checking; according to the clicked information of the letter collecting staff, the front end provides data query application, inquired opinions and letter collecting confirmation information are returned to two Map types in time sequence, and the front end uses JavaScript for analysis; on the two canvas below, the opinion information and the letter collection confirmation information of the user are respectively used for drawing, the system selects and draws a histogram, the time of the histogram is X1 axis, the List length corresponding to each time point is Y axis, and the system is intended to reflect the operation frequency of the submission opinion and the letter collection confirmation opinion executed by the user at each time point.
Correspondingly, this embodiment also provides a block chain-based multi-source data fusion full-cycle traceability analysis system, as shown in fig. 2, the system 200 includes a block chain basic service module 201, a user identity management module 202, a traceability system basic function module 203, a data operation recording module 204, and a traceability analysis module 205, where:
the block chain basic service module 201 is configured to construct a block chain infrastructure supporting a traceability analysis system; further, the blockchain basic service module 201 includes: the system comprises a block chain network parameter setting submodule 201-1, a channel and rule management submodule 201-2 and an intelligent contract submodule 201-3, wherein the block chain network parameter setting submodule 201-1 is used for configuring a network environment meeting the requirement of system operation, the channel and rule management submodule 201-2 is used for specifying an adding strategy organized in a union, and the intelligent contract submodule 201-3 is used for deploying and executing an intelligent contract meeting the multi-source data tracing requirement.
In an embodiment of the present application, the blockchain basic service module 201 pulls the Fabric Peer container, the Fabric order container, the Fabric CA container, the Fabric CouchDB container, and the corresponding configuration file, which have been packaged, from the open source network by using a Docker container technology, and configures each container into a virtual network to be deployed on the local computer; the block chain parameter setting submodule 201-1 and the channel and rule management submodule 201-2 use a YAML file reading packet to obtain configuration file data in a virtual network, and write corresponding configuration into a block chain created block; the intelligent contract sub-module 201-3 is written by using Golang, mainly uses a Fabric Chaincode Go package to realize the interactive function of the contract, and performs packaging and uplink by using a binary Peer file obtained from an open source network.
The user identity management module 202 is configured to perform operation management on the identity of the user in the system; further, the user identity management module 202 includes: the identity management sub-module 202-1, the identity distribution sub-module 202-2 and the identity right sub-module 202-3, wherein the identity management sub-module 202-1 is used for managing and interacting with the CA nodes in the system, the identity distribution sub-module 202-2 is used for distributing identities to the Orderer organization and the Peer organization, and the identity right sub-module 202-3 is used for defining the authority of the node identities in the organization.
In an embodiment of the present application, the CA deployment in the identity management sub-module 202-1 includes TLS-CA deployment and organization CA deployment, both TLS-CA and organization CA are packaged by a Docker container, and a user may interact with REST APIs in the container through a Fabric CA Java SDK; the TLS-CA may be a CA of an organization itself or a CA provided by a Fabric network, where the CA needs to own an administrator to issue TLS certificates for different organizations to ensure security of communication links in a federation chain network, the TLS certificates are generally distributed offline, and the organization CA is generally divided into an order organization CA and a Peer organization CA, which are logically separated but may be located in the same physical machine in actual deployment;
in an embodiment of the present application, the identity distribution sub-module 202-2 includes an identity distribution of an order organization and an identity distribution of a Peer organization, which rely on a secure communication link ensured by a certificate issued by TLS-CA; the Orderer organization CA issues Orderer node identities and Orderer organization administrator identities, and one Orderer organization can only have one administrator identity but can have a plurality of Orderer node identities; the Peer organization CA issues Peer node identities, Peer organization administrator identities and terminal user identities, which are similar to the Orderer organization, and the Peer organization only has one administrator but can have a plurality of nodes and terminal users; only after owning the administrator identity and the node identity, the organization can start the corresponding node container;
in an embodiment of the present application, the identity authority sub-module 202-3 divides the identity into four different identity authorities, which are admin, peer, orderer, and user, and the identities are marked in the identity file in the clear; the admin identity has the highest authority in the organization, and directly interacts with the CA to manage the identity and make a calling strategy of a contract in the organization; the peer identity has the interactive authority with the block chain network, and a contract in the block chain network is called to generate a transaction block; the order identity has the authority to sort the blocks, so that the block chain network is consistent through a consensus algorithm; the user identity interacts with the peer node and invokes the contract according to the contract invocation policy.
The tracing system basic function module 203 is used for providing basic functions such as identity authentication and data transmission interface for the system; further, the tracing system basic function module 203 comprises a basic system function sub-module 203-1, a micro service sub-module 203-2 and a chain code operation sub-module 203-3, wherein the basic system function sub-module 203-1 is used for providing identity authentication, the identity is an on-chain identity signed and issued by the identity management module 202, the micro service sub-module 203-2 comprises three functions of an RPC service, a data recording service and a data query service, and the chain code operation sub-module 203-3 comprises three functions of a data definition, a data query and a data storage.
In an example of the application, the basic system function sub-module 203-1 verifies the distributed identity file by using a Fabric Java CA SDK, and verifies an RPC Token attached to the identity file by combining a Java Web Token package; the micro-service sub-module 203-2 uses Apache Thrift technology, uses a non-blocking multi-thread service end and a frame compression communication protocol, realizes RPC service, and distributes the transmitted parameters to data recording service and data query service through the RPC service, and the data recording service and the data query service call the data storage and data query functions of the chain code operation sub-module 203-3 in the module;
in an example of the application, the chain code operation sub-module 203-3 interacts with the intelligent contract sub-module 201-3 by using Fabric Java SDK, and parameters of the chain code operation are transmitted by using a gRPC technology, so that three functions of data definition, data query and data storage are realized, wherein the data definition function is used for defining a data structure of opinion data and letter acquisition confirmation data, and three extensible fields are reserved for increasing application scenes, the data definition function is a dependent condition of the data query function and the data storage function, and the data query function and the data storage function perform a data change and check function according to data defined in the data definition function; the data query function is used for processing query parameters transmitted by the data query service function in the micro-service sub-module, calling a multi-source data traceability contract in the block chain basic service function through the query parameters, executing common query, joint query and rich query on a chain through a state database, and accelerating query through an index if a queried data field contains the index in the query process; the data storage function is used for converting data parameters transmitted by the data operation record service function in the micro service function into JSON byte strings through a multi-source data source-tracing contract in the block chain basic service function and storing the byte strings into a chain state database, and a user can set required index fields according to a pre-estimated result or update indexes in a subsequent use process.
The data operation recording module 204 is configured to define a data structure and update a data record. Further, the data operation recording module 204 includes a data definition sub-module 204-1 and a data update sub-module 204-2, wherein the data definition sub-module 204-1 defines user record information and data record information, and the data record update sub-module stores data and updates data, and further, the data record update sub-module 204-2 includes four main functions of creating a user record, modifying a user record, creating a data record, and modifying a data record.
In an example of the application, the data definition sub-module 204-1 is realized by means of hard coding, a developer has already made a full investigation on the user requirements before realizing the work, a defined data structure already comprises main fields of required data, and three extension fields are reserved for providing the user with special requirements; the data structure defined in the data definition sub-module 204-1 is consistent with the data structure defined in the data definition function in the chain code operation sub-module 203-3; the data definition submodule 204-1 encapsulates the defined data structure into Bean by using a Spring framework, and opens a JSON analysis interface so that the data updating submodule 204-2 obtains data from a user;
in an example of the application, the data update sub-module 204-2 is realized by relying on a Spring framework, an Http interface is opened to realize an application mode of Rest APIs, the data update sub-module 204-2 also uses an Apache thread technology, a compressed frame protocol is used as a thread client to access the micro-service sub-module 203-2, the micro-service sub-module 203-2 forwards a request to the chain code operation sub-module 203-3, and a data storage function in the micro-service sub-module is called according to the transmitted parameters; the data updating sub-module 204-2 includes four functions of creating a user record, modifying a user record, creating a data record and modifying a data record, wherein the creating of a user record and the modifying of a user record depend on the user identity management module 202, that is, the identity of any data record updating sub-module updating record on the chain is the identity signed in the identity management sub-module 202-1; the newly-created data record and the modified data record depend on the data storage function of the chain code operation module 203-3, that is, the data record of any data record updating submodule updating the record on the chain is the data recorded by the data storage function; all data are received from the outside by a user through an open Http interface or Rest APIs, the form of the data is JSON data packaged into byte strings, and the data are resolved and then restored into beans, namely the data structure of the data definition submodule 204-1.
The source tracing analysis module 205 is configured to provide a data source tracing query function and a visual display function for the system; further, the traceability analysis module 205 comprises an on-chain data query sub-module 205-1 and a traceability data visualization sub-module 205-2, wherein the on-chain data query sub-module 205-1 is configured to query data information recorded on the block chain, and collect the information to the traceability data visualization sub-module 205-2, which locally stores the obtained information and draws a visualization display graph.
In an example of the application, the on-chain data query submodule 205-1 is implemented by relying on a Spring framework, an Http interface is opened to implement an application mode of Rest APIs, the data query submodule 205-1 also uses an Apache thread technology, uses a compressed frame protocol to become a thread client for accessing the micro-service submodule 203-2, the micro-service submodule 203-2 forwards a request to the chain code operation submodule 203-3, and calls a data query function according to a transmitted parameter; the inquired data structure conforms to the data structure defined by the data definition function in the data definition submodule 204-1 and the chain code operation submodule 203-3, and is returned in the form of a JSON list;
in an example of the application, the traceability data visualization sub-module 205-2 is implemented by relying on an Echarts framework and a CouchDB database, wherein the CouchDB is used as a local database, data queried by the on-face data query sub-module 205-1 is locally cached, the database is consistent with a Peer node database on a chain, and the data can be stored without format conversion; the Echarts frame is used as a front-end drawing frame, and the drawing of the traceable visual graph can be completed through a JavaScript script.

Claims (12)

1. A multisource data fusion full-period traceability analysis method based on a block chain is characterized by comprising the following processes:
designing an extensible data format, wherein the data format comprises required key fields, and designing a data transmission method based on the data format;
the user submits the data according to a designed transmission method, and after the data is transmitted to the letter collector, the letter collector confirms the letter collection of the data; the data reported by the user and the letter collection confirmation operation behavior of letter collection personnel on the reported data are all recorded in a chain to form traceability data;
and after the data records are linked, the users with the related authority inquire the linked data, and the inquired data is processed by the Web front end and then displayed to the system users for the users to analyze the traceability data.
2. The block chain-based multi-source data fusion full-cycle traceability analysis method of claim 1, wherein the extensible data comprises user data and traceability data;
the user data is information data of system users and comprises user units, user names and user identities;
the tracing data comprises opinion data and letter collection confirmation data for the opinions, wherein the opinion data comprises opinion related fields and extension fields, and the letter collection confirmation data for the opinions comprises letter collection confirmation related fields and extension fields.
3. The block chain-based multi-source data fusion full-cycle traceability analysis method of claim 1, wherein the data transmission method is a method for performing data interaction between a block chain and an entity outside the chain, and the implementation principle is to encapsulate an external service of the block chain and construct a micro-service interacting with the chain by using an RPC technology;
the RPC is a transmission mode in a data transmission method.
4. The block chain-based multisource data fusion full-period traceability analysis method of claim 1, wherein the data report is that a user reports data to a block chain by using an RPC technology, after the data transmission is linked, the block chain calls a data transmission interface to transmit the data to a letter collector, and the letter collector with a legal identity submits letter confirmation data to the chain after letter confirmation is performed on the data;
the data transmission structure is an interface packaged in the transmission method.
5. The blockchain-based full cycle traceability analysis method for multi-source data fusion of claim 1, wherein the uplink of data records relevant information submitted by a user with a legal identity in a blockchain for the blockchain;
the related information comprises user information and data submitted by the user.
6. The block chain-based multi-source data fusion full-cycle traceability analysis method of claim 1, wherein the data traceability analysis comprises: the RPC is utilized to realize the query of the block chain information and display the queried data by utilizing the front end;
the front-end display is the visual display of the data inquired by the RPC by utilizing the Echart.
7. The utility model provides a multisource data fusion full cycle analysis of tracing to source system based on block chain which characterized in that includes: the system comprises a block chain basic service module, a user identity management module, a traceability system basic function module, a data operation recording module and a traceability analysis module;
the block chain basic service module is used for constructing a block chain infrastructure supporting the traceability analysis system, receiving input parameters of the data operation recording module and the traceability analysis module, processing in a block chain network according to the input parameters, and returning a processing result to the data operation recording module and the data analysis module through the traceability system basic function module;
the user identity management module is used for carrying out identity management, identity distribution and identity authentication on the user based on the block chain infrastructure, the user identity exists in a file form, the distributed identity is authenticated by the traceability system basic function module, and the user passing identity authentication can use the functions of the traceability system basic function module;
the tracing system basic function module is used for providing an identity authentication and data transmission interface, the identity authentication function is interacted with the user identity management module, the data transmission interface is interacted with the block chain basic service module, the data operation recording module and the tracing analysis module, and the data transmission interface serves as an intermediate layer module for communication between the data operation recording module and the tracing analysis module and the block chain basic service module;
the data operation recording module is used for transmitting parameters by using a data transmission interface of the tracing system basic function module, transmitting data to be recorded to the block chain basic service module for uplink and recording data uplink state information returned by the block chain basic service module;
the tracing analysis module is used for providing a data query interface, transmitting parameters to the block chain basic service module by using the data transmission interface of the tracing system basic function module, receiving a query result given by the block chain basic service module and visually displaying data returned by the block chain basic service module.
8. The blockchain-based multi-source data fusion full-cycle traceability analysis system of claim 7, wherein the blockchain basic service module building blockchain infrastructure comprises a blockchain network parameter setting sub-module, a creation and rule management sub-module and an intelligent contract sub-module;
the block chain network parameter setting submodule is used for meeting the network environment required by system operation based on the design requirement of the system;
the creating and rule management submodule is used for organizing and adding the block chain into a specific channel, wherein the channel is a communication channel created by a specific alliance, and the channel rule is used for auditing the user identity;
the intelligent contract submodule is a contract which can meet the multi-source data traceability requirement, the data operation recording module links data information through the contract, and the traceability analysis module inquires the required data content through the contract.
9. The block chain-based multi-source data fusion full-cycle traceability analysis system of claim 7, wherein the user identity management module comprises an identity management sub-module, an identity distribution sub-module and an identity authority sub-module;
the identity management submodule is used for CA deployment, the CA is interacted with a digital certificate issuing mechanism in a block chain when the CA is deployed, the CA is used for issuing a TLS certificate in an organization member to ensure the safety of user identity information in a alliance chain network, and the TLS certificate adopts an offline distribution mode;
the identity distribution submodule is divided into identity distribution of Order organization and identity distribution of Peer organization, the organization comprises an administrator and a plurality of users, the identity distribution in the two organizations is issued by an organization CA, the CA in one organization firstly issues the certificate of the administrator and then issues other user certificates, and the other user certificates are distributed offline by the administrator;
the identity authority sub-module is divided into four different identity authorities, namely admin, peer, order and user, and the identity authorities are marked in the distributed identity files; the admin identity has the highest authority in the organization, and directly interacts with the CA to manage the identity and make a calling strategy of a contract in the organization; the peer identity has the interactive authority with the block chain network, and a contract in the block chain network is called to generate a transaction block; the order identity has the authority to sort the blocks, so that the block chain network is consistent through a consensus algorithm; the user identity interacts with the peer node, and a contract is called according to a contract calling strategy; one Order organization only has the identities of the admin, the Order and the user, one Peer organization only has the identities of the admin, the Peer and the user, one organization can be both the Order organization and the Peer organization, and the CA directly issues the identities containing the four rights.
10. The block chain-based multi-source data fusion full-cycle traceability analysis system of claim 7, wherein the traceability system basic function module comprises a basic system function sub-module, a micro-service sub-module and a chain code operation sub-module;
the basic system function sub-module is used for providing an identity authentication function, wherein the identity refers to the identity on a user chain issued by the user identity management module, and the module receives identity information transmitted by a user and executes identity verification and identity authentication operation;
the micro-service sub-module comprises an RPC (remote procedure call) service end module, a data recording service module and a data query service module, wherein the RPC service end module is used for processing parameters transmitted by the data operation recording module and the data traceability analysis service module and distributing a request to the data recording service module and the data query service module, and the data recording service module and the data query service module call a multi-source traceability contract through a chain code operation sub-module to finish data recording operation and data query operation;
the chain code operation sub-module is divided into a data definition module, a data query module and a data storage module; the data definition module is used for defining data structures of opinion data and letter acquisition confirmation data, three extensible fields are reserved for increasing application scenes, the data definition module is a dependence condition of the data query module and the data storage module, and the data query module and the data storage module perform data increasing, changing and checking functions according to data defined in the data definition module; the data query module is used for processing query parameters transmitted by the data query service module in the micro-service sub-module, calling a multi-source data traceability contract in the block chain basic service module through the query parameters, and executing common query, joint query and rich query on a chain through a state database; and the data storage module is used for converting the data parameters transmitted by the data operation record service module in the micro-service submodule into JSON byte strings through a multi-source data source-tracing contract in the block chain basic service module and storing the byte strings into a chain state database.
11. The block chain-based multi-source data fusion full-cycle traceability analysis system of claim 10, wherein the data operation recording module comprises a data definition sub-module and a data update sub-module;
the data definition submodule defines user record information and data record information, the module is consistent with information in a data definition module in the chain code operation submodule and is additionally provided with a field for explaining the data type, the data definition submodule is a dependence condition of the data updating submodule, and the data which is additionally and additionally changed by the data updating submodule strictly complies with a data format defined in the data definition submodule;
the data updating submodule comprises: newly creating a user record, modifying the user record, newly creating a data record and modifying the data record, wherein the newly creating the user record and modifying the user record depend on the user identity management module function, namely, the identity of any data updating submodule for updating the record on the chain is the identity signed and issued in the identity management function; the newly-created data records and the modified data records depend on the data storage function of the chain code operation submodule, that is, the data records of any data updating submodule which updates and records on the chain are the data recorded by the data storage module.
12. The block chain-based multi-source data fusion full-cycle traceability analysis system of claim 10, wherein the traceability analysis module comprises an on-chain data query sub-module and a traceability data visualization sub-module;
the on-chain data query submodule is used for querying on-chain information, verifying the identity of a user querying the information, and finally summarizing the queried data and providing the summarized data to the source tracing data visualization submodule; the on-chain information query depends on a data query module of the chain code operation submodule, namely the on-chain data query submodule transmits the parameters to the data query module of the chain code operation submodule and obtains a return value from the parameters; the user identity verification depends on the identity authentication function provided by the basic system functional sub-module, and only the user passing the identity authentication has the right to perform the query operation;
the source tracing data visualization submodule comprises a source tracing data storage database selection function and a visualization display function, wherein the source tracing data storage database selects a state database as CouchDB in order to meet the functional requirements of system storage data, the visualization display function uses an Echarts drawing library for drawing, obtains query data required to be displayed from a chained data query submodule, and calls a front end drawing library to display a corresponding visualization source tracing interface after corresponding data is obtained.
CN202210195456.2A 2022-03-01 2022-03-01 Multi-source data fusion full-period traceability analysis method and system based on block chain Active CN114610991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210195456.2A CN114610991B (en) 2022-03-01 2022-03-01 Multi-source data fusion full-period traceability analysis method and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210195456.2A CN114610991B (en) 2022-03-01 2022-03-01 Multi-source data fusion full-period traceability analysis method and system based on block chain

Publications (2)

Publication Number Publication Date
CN114610991A true CN114610991A (en) 2022-06-10
CN114610991B CN114610991B (en) 2024-04-16

Family

ID=81861106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210195456.2A Active CN114610991B (en) 2022-03-01 2022-03-01 Multi-source data fusion full-period traceability analysis method and system based on block chain

Country Status (1)

Country Link
CN (1) CN114610991B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185668A (en) * 2023-04-26 2023-05-30 上海帆声图像科技有限公司 Efficient multi-model matching deployment method based on grpc

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110135860A (en) * 2019-04-17 2019-08-16 中山大学 A kind of safe traceability system of crop seeds based on block chain technology
CN111539750A (en) * 2020-04-27 2020-08-14 中山大学 Commodity traceability system based on block chain and big data technology
WO2021043144A1 (en) * 2019-09-03 2021-03-11 杭州趣链科技有限公司 Blockchain-based evidence collection service system
CN113010906A (en) * 2021-04-12 2021-06-22 福建省海峡信息技术有限公司 Credible data tracing method and system based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110135860A (en) * 2019-04-17 2019-08-16 中山大学 A kind of safe traceability system of crop seeds based on block chain technology
WO2021043144A1 (en) * 2019-09-03 2021-03-11 杭州趣链科技有限公司 Blockchain-based evidence collection service system
CN111539750A (en) * 2020-04-27 2020-08-14 中山大学 Commodity traceability system based on block chain and big data technology
CN113010906A (en) * 2021-04-12 2021-06-22 福建省海峡信息技术有限公司 Credible data tracing method and system based on block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185668A (en) * 2023-04-26 2023-05-30 上海帆声图像科技有限公司 Efficient multi-model matching deployment method based on grpc
CN116185668B (en) * 2023-04-26 2023-06-30 上海帆声图像科技有限公司 Efficient multi-model matching deployment method based on grpc

Also Published As

Publication number Publication date
CN114610991B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
US11886421B2 (en) Systems, methods, and apparatuses for distributing a metadata driven application to customers and non-customers of a host organization using distributed ledger technology (DLT)
US11803537B2 (en) Systems, methods, and apparatuses for implementing an SQL query and filter mechanism for blockchain stored data using distributed ledger technology (DLT)
US11783024B2 (en) Systems, methods, and apparatuses for protecting consumer data privacy using solid, blockchain and IPFS integration
US10705823B2 (en) Application templates and upgrade framework for a multi-tenant identity cloud service
US20190102409A1 (en) System and method for managing a blockchain cloud service
CN112686671B (en) Intelligent contract deployment method, device, equipment and medium based on block chain
US20060235882A1 (en) System and method for developing arbitrary and efficient mappings between complex message structures
WO2007109235A2 (en) Inter domain services manager
CN112540980A (en) Government affair data co-construction sharing method based on block chain technology
CN112835985B (en) Spatial data sharing system and method based on distributed account book
CN114567643B (en) Cross-blockchain data transfer method, device and related equipment
CN113434175B (en) Data processing method, device, storage medium and equipment
CN111915301A (en) Data processing method and device based on block chain, electronic equipment and readable medium
DE602005005435T2 (en) System and method for communication management of component applications
CN109005058A (en) A kind of intelligence system control platform and management-control method
CN114610991B (en) Multi-source data fusion full-period traceability analysis method and system based on block chain
US20200118120A1 (en) Methods and systems for providing a customized network
CN115048080A (en) Science and technology special distributor service cloud platform construction system based on big data
CN110991573A (en) Product management method, system, client node and storage medium
CN113259714B (en) Content distribution processing method and device, electronic equipment and storage medium
CN115145976A (en) Data processing method and device based on block chain, computer equipment and medium
CN113537985B (en) Data verification method and device
CN115168916B (en) Digital object credible evidence storing method and system for mobile terminal application
US20230315428A1 (en) Extensibility platform
US20230319054A1 (en) Tenant-specific solution subscriptions for an extensibility platform

Legal Events

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