CN114610991B - 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
CN114610991B
CN114610991B CN202210195456.2A CN202210195456A CN114610991B CN 114610991 B CN114610991 B CN 114610991B CN 202210195456 A CN202210195456 A CN 202210195456A CN 114610991 B CN114610991 B CN 114610991B
Authority
CN
China
Prior art keywords
data
module
user
identity
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210195456.2A
Other languages
Chinese (zh)
Other versions
CN114610991A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention belongs to the technical field of blockchains, and relates to a blockchain-based multi-source data fusion full-period traceability analysis method and system. Customizing different formats for the multi-source data, and meeting the use requirement of a user on multi-source data fusion traceability analysis; by means of RPC, the system builds a micro-service for the user to interact with the blockchain evidence-storing and tracing system; the identity of the user is checked, and the user with corresponding authority can report the data or confirm the data reported by the user; the block chain system records the full period of legal data in a chain, and provides a tracing function for data and behaviors while guaranteeing the consistency and the integrity of the data; the legal user can trace the source of the data, and a visual interface is provided for displaying the trace source data.

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 blockchains, and particularly relates to a blockchain-based multi-source data fusion full-period traceability analysis method and system.
Background
Blockchain technology is a technology based on computer networks, cryptography, and distributed systems. Which uses cryptography to connect blocks. Each chunk contains the hash value, timestamp, and ledger of the previous chunk. The information on the chain forms a permanent record through the whole network consensus. The purpose of the block chain birth is to solve the problems of high handling expense, high dependence and the like in centralized accounting. As blockchains develop, blockchain-based applications are increasing. The characteristics of the blockchain are helpful in solving problems with the original system application.
Currently, the main application scenarios of blockchains include data services, digital money, finance, smart cities, the internet of things, and the like. The data service is gradually transited and upgraded from the traditional manual processing and paper processing to the automatic processing and networking processing. An important function in data service is to effectively record data and prevent illegal tampering of the data after recording. The current mainstream recording mode is to use a centralized database or entrust a third party to record data. The former causes a problem that data is too concentrated, and the usability of the data is lowered when unreliability occurs; the latter would cause the data owner to lose absolute control of the data, failing to guarantee confidentiality and integrity of the data.
At present, no effective method for solving the problems of data centralization and uncontrollable data access authority of recorded data in data service exists.
Disclosure of Invention
The invention provides a multi-source data fusion full-period traceability analysis method and system based on a blockchain, which are used for solving the problem of tracing and traceability of multi-source data and promoting the development of the blockchain in the aspect of data traceability.
A multi-source 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 the designed transmission method, and after transmitting the data to the letter collector, the letter collector confirms the letter collection of the data; the data submitted by the user and the letter collecting confirmation operation behaviors of the letter collecting personnel on the submitted data are all recorded in a chain to form traceability data;
after the data record is linked, the user with relevant authority inquires the linked data, and the inquired data is processed by the Web front end and then displayed to the system user for the user to analyze the traceable data.
Further, the extensible data comprises user data and traceability data;
the user data is information data of a system user and comprises a user unit, a user name and a user identity;
the tracing data comprises opinion data and opinion collection confirmation data for the opinions, wherein the opinion data comprises opinion related fields and extension fields, and the opinion collection confirmation data comprises opinion collection confirmation related fields and extension fields.
Further, the data transmission method is a method for carrying out data interaction between the blockchain and an entity outside the chain, and the implementation principle is that the blockchain is packaged with external service, and the RPC technology is used for constructing micro-service for interacting with the chain;
The RPC is used for transmitting modes in a data transmission method.
Further, the data reporting is that a user reports data to a block chain by utilizing an RPC technology, after the data is transmitted and uplink, the block chain calls a data transmission interface to transmit the data to a letter collector, and the letter collector with legal identity submits letter collecting confirmation data to the chain after carrying out letter collecting confirmation on the data;
the data transmission structure is an interface encapsulated in the transmission method.
Further, the data record uplink records related information submitted by a user with legal identity in the blockchain;
the related information includes user information and data submitted by the user.
Further, the data trace analysis includes: the RPC is utilized to realize the inquiry of the block chain information and the front end is utilized to display the inquired data;
the front end display is used for visually displaying the data queried by the RPC by using Echart.
A multi-source data fusion full-period traceability analysis system based on a blockchain comprises: the system comprises a block chain basic service module, a user identity management module, a tracing system basic function module, a data operation record module and a tracing analysis module;
the system comprises a block chain basic service module, a data operation recording module, a tracing analysis module, a data analysis module, a tracing system basic function module and a data analysis module, wherein the block chain basic service module is used for constructing a block chain infrastructure supporting the tracing analysis system, receiving input parameters of the data operation recording module and the tracing 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 tracing system basic function module;
The user identity management module is used for carrying out identity management, identity distribution and identity confirmation on the user based on the blockchain infrastructure, the user identity exists in a file form, the distributed identity is authenticated by the basic function module of the traceability system, and the user passing the identity verification can use the function of the basic function module of the traceability system;
the system comprises a tracing system basic function module, a user identity management module, a block chain basic service module, a tracing analysis module, a data transmission interface, a data operation recording module and a middle layer module, wherein the tracing system basic function module is used for providing identity authentication and a data transmission interface, the identity authentication function interacts with the user identity management module, the data transmission interface interacts with the block chain basic service module, the data operation recording module and the tracing analysis module, and the data transmission interface acts as the middle 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 the data transmission interface of the tracing system basic functional module, transmitting the data to be recorded to the blockchain basic service module for uplink, and recording the data uplink state information returned by the blockchain basic service module.
The traceability analysis module is used for providing a data query interface, and the module uses the data transmission interface of the traceability system basic function module to transmit parameters to the blockchain basic service module, receives a query result given by the blockchain basic service module and performs visual display on data returned by the blockchain basic service module.
Further, the blockchain infrastructure building block chain 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 sub-module is used for meeting the network environment required by the system operation based on the design requirement of the system;
the creation and rule management submodule is used for adding the blockchain organization 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 identity of a user;
the intelligent contract sub-module is a contract capable of meeting the multi-source data tracing requirement, the data operation recording module is used for uploading data information through the contract, and the tracing analysis module is used for inquiring the required data content through the contract.
Further, the user identity management module comprises an identity management sub-module, an identity distribution sub-module and an identity verification sub-module;
the identity management submodule is used for CA deployment, the CA is used for interacting with a digital certificate issuing mechanism in a blockchain during CA deployment, the CA is used for issuing a TLS certificate in an organization member, and the security of user identity information in a alliance chain network is ensured, wherein the TLS certificate adopts an off-line distribution form;
The identity distribution sub-module is divided into identity distribution of an Order organization and identity distribution of a Peer organization, wherein the organization comprises an administrator and a plurality of users, the identity distribution in the organization is the organization CA issuance, the CA in the 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 authentication submodule is divided into admin, peer, order and user four different identity authorities, 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 formulate a calling strategy of a contract in the organization; the peer identity has the authority of interacting with the blockchain network, and invokes contracts in the blockchain network to generate a transaction block; the order identity has the authority of ordering the blocks, so that the blockchain network is agreed through a consensus algorithm; the user identity interacts with the peer node and invokes the contract according to the contract invoking policy; the organization only has the identities of the admin, order and user, the Peer organization only has the identities of the admin, peer and user, and the organization can be the Order organization or the Peer organization, and the CA directly signs the identities with the four rights.
Further, the 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 submodule is used for providing an identity authentication function, 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 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 tracing analysis service module and distributing requests 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 tracing contract through a chain code operation sub-module to complete 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 the data structure of opinion data and acquisition confirmation data, and three extensible fields are reserved for increasing application scenes, the data definition module is a dependent condition of the data query module and the data storage module, and the data query module and the data storage module perform data modification function according to the 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 tracing contract in the block chain basic service module through the query parameters, and executing common query, joint query and rich query on the chain through the state database; the data storage module is used for converting the data parameters transmitted by the data operation record service module in the micro-service sub-module into JSON byte strings through the multi-source data tracing contract in the block chain basic service module and storing the byte strings into the on-chain state database.
Further, the data operation recording module comprises a data definition sub-module and a data updating sub-module;
the data definition submodule defines user record information and data record information, the information in the data definition module in the chain code operation submodule is consistent with the information in the data definition module, a field for explaining the data type is added, the data definition submodule is the dependent condition of the data update submodule, and the data modified by the data update submodule strictly complies with the data format defined in the data definition submodule;
the data update sub-module comprises: the method comprises the steps of creating a user record, modifying the user record, creating a data record and modifying the data record, wherein the created user record and the modified user record depend on the function of a user identity management module, namely the identity of any data updating sub-module for updating the record on a chain is the identity issued in the identity management function; the newly built data record and the modified data record depend on the data storage function of the chain code operation sub-module, namely, the data record of any data update sub-module for updating record on the chain is recorded by the data storage module.
Further, the traceability analysis module includes: the on-chain data query sub-module and the traceability data visualization sub-module;
the on-chain data query submodule is used for querying on-chain information, checking the identity of a user querying the information, and finally summarizing the queried data and providing the queried data to the visual display module; the on-chain information inquiry depends on the data inquiry module of the chain code operation sub-module, namely the on-chain data inquiry sub-module transmits parameters to the data inquiry module of the chain code operation sub-module and obtains a return value from the parameters; the user identity verification depends on an identity authentication function provided by a basic system function sub-module, and only a user passing identity authentication is authorized to perform inquiry operation;
the traceability data visualization submodule comprises a traceability data storage database selection function and a visualization display function, wherein the traceability data storage database is used for selecting a state database as a CouchDB in order to meet the functional requirement of system storage data, the visualization display function is used for drawing by using an Echarts drawing library, query data required to be displayed are obtained from the on-chain data query submodule, and a front-end drawing library is called to display a corresponding visualization traceability interface after the corresponding data are obtained.
The beneficial effects of the invention are as follows:
according to the multi-source data fusion full-period traceability analysis method and system based on the blockchain, a new data traceability mode is established by utilizing the characteristics of non-falsification and traceability of the blockchain, the data integrity is ensured, and meanwhile, the data can be traced in a full period, so that the problems of data confidentiality and integrity loss existing in the existing data stored in a centralized database or a third party database are avoided; moreover, by the related information of the data operation such as: the data operation object, the data operation time, the data operation result and the like are recorded, and the responsibility of the data operator can be recovered when an abnormal situation occurs. The system adopts a micro-service mode to provide services to the outside, supports an extensible visual interface display function, is convenient for users to use, and promotes the development of block chains.
Drawings
FIG. 1 illustrates a blockchain-based multi-source fusion data full-period traceability analysis method in an embodiment of the invention;
FIG. 2 illustrates a blockchain-based multi-source fusion data full-cycle traceability analysis system in accordance with an embodiment of the invention.
Detailed Description
The full-period traceability analysis method for multi-source data fusion based on the blockchain provided by the embodiment, as shown in fig. 1, comprises the following steps:
and (3) designing a multi-source tracing data format: the traceability data is mainly divided into two major categories, one is information of the user, and the other is information of the data. The users are divided into six types, the names and responsibilities are respectively: a network manager for managing network access and configuring the ordering nodes; an organization administrator, assigning identities and certificate distributions; audit personnel, examination data and data tracing; operating a recorder, and calling an intelligent contract to record information; the personnel for collecting the information and providing the opinion for the confirmation of the collection; and the common member submits comments. The data is divided into opinion data and letter-collecting confirmation data, and the opinion data and the description are respectively: opinion ID, representing an ID item in an opinion table; opinion places, representing where records occur; opinion objects representing recorded data objects; an operation type representing the operation type of the record; opinion time, which indicates the time of initiation of recording opinion; determining a time, which represents a time when the opinion is finally determined; and the three extension fields are flexibly customized according to different use scenes. The acquisition confirmation data and description are respectively: the acquisition confirming place represents an acquisition confirming department; the letter collecting personnel represents a letter collecting affirmer; a letter confirmation object representing an opinion object of letter confirmation; the acquisition confirming time represents acquisition confirming time; the acquisition confirming result represents the acquisition confirming result; and the 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 carrying out data interaction between the blockchain and an entity outside the chain, and the implementation principle is that the blockchain is packaged with external service, and the RPC technology is used for constructing micro-service for interacting with the chain. The RPC technology mainly comprises the steps of calling a functional system RPC and interacting the RPC with a blockchain; the functional system RPC comprises a query system RPC and an update system RPC; the query system RPC comprises data ID-opinion query, data ID-opinion confirmation query, user information-opinion confirmation query and Ad hoc (impromptu) query (the query function is a query function which is provided by a user-defined query requirement, namely a user-defined query statement); the updating system RPC comprises creating opinion information, creating letter confirmation information and updating opinion information; the blockchain interactions RPC then include evaluate transaction (evaluate transaction) calls and commit transaction (submit transaction) calls. In general, a data operation may take one of two routes: (1) Firstly, calling a query system RPC in a functional system RPC, and then calling an evaluation transaction RPC in a blockchain interaction RPC; (2) The update system RPC is first invoked in the functional system RPC, followed by the commit transaction RPC in the blockchain interaction RPC. When the identity is signed, the interaction mode of the Fabric CA SDK and the Fabric CA Server is realized through a REST API, the API uses an HTTP mode, the call can be completed through a simple URL and an HTTP command, and the REST API can possibly be used as one of introduction contents.
And (3) multi-source tracing data reporting and acquisition confirming operation: the operation of confirming the collection of the multi-source data is mainly divided into opinion report and opinion collection confirmation. The opinion submitting operation is submitted by a user, the system firstly checks whether the authority of the user for submitting the opinion meets the requirement, then the blockchain system needs to carry out identity verification on the user for submitting the opinion, and after two rounds of identity verification, the opinion and the information related to the opinion can be stored in the blockchain. After the opinion confirmation is effective, the system enters a message collection confirmation flow, the system sends a message collection confirmation request to a message collection confirmation program, the message collection personnel is informed to carry out message collection confirmation, the message collection personnel carries out message collection confirmation on the data after receiving the data, and the message collection confirmation result comprises two results of agreeing to execute and refusing the opinion. The system firstly checks whether the personnel submitting the letter confirmation comments possess relevant authorities or not, then the blockchain system checks whether the personnel submitting the letter confirmation comments have legal on-chain identities or not, and only the letter confirmation comments submitted by the letter personnel with legal identities which pass two-round checking can be recorded on the chain.
The multi-source tracing data record is uplink: the operations of submitting a data application by a user and confirming the passing or rejecting of the letter collecting by a letter collector are required to be recorded in a blockchain, and the step only requires the user to send calling parameters to the service of the system while calling the original system interface. There are two ways in which data records can be linked: the operation of recording the uplink can occur after a user or a letter collector operates data, the mode means that the blockchain is in a passive recording mode, and the blockchain is only used as a log system on one chain, so that the follow-up tracing is convenient; the record-up operation may also occur before the user or the trusted party operates on the data, which means that the blockchain is in an active record mode, and that the blockchain will act as an audit component to ensure that the data operation is actually performed, while also maintaining data tracking capabilities. And according to the operation record of the user or the letter collector on the data, the blockchain records and links the data transmitted from the data interface, so as to prepare for the follow-up data tracing. The data uplink operation needs to verify the identity authority of the user, and only the user with the relevant authority can submit the data to the uplink, the identities are generally distributed by an organization administrator, and the distribution mode is generally off-line distribution, so that the identity information of the organization administrator and the identity information of the user are ensured not to be revealed.
And (3) multi-source tracing data tracing analysis: the traceability analysis of the multi-source data is a core function of the invention, and mainly comprises two key steps, namely data query and visualization processing. The data query needs to interact with the blockchain, and a state database in the blockchain network is accessed through a chain code; the visualization processing is to collect the queried data, then interact with the front end and perform visualization display on the queried data.
Further, data queries are classified into data-centric queries and user-centric queries. And submitting the inquired parameters to the Peer node by the user conforming to the authority, and calling the chain code in the container by the Peer node to analyze the parameters. If analysis fails, the Peer sends error information to the server, and if analysis is successful, the system queries related data. The query result is returned through the JSON character string, the returned form is K-V pair, the ID of the data or the user is the value of Key, and V is the data detail corresponding to Key. The query results will be delivered in the form of a TCP network connection. And transferring the data to a back-end SDK program.
Further, the visualization process is responsible for visually displaying the queried data. The visualized display is carried out by using Echarts, and the main flow is as follows: selecting a DIV label in the HTML webpage, defining the DIV label as a follow-up drawing canvas, displaying a Loading interface on the canvas, and waiting for the arrival of asynchronous data; the front end applies for data from the rear end, after the data arrives, the front end uses JavaScript script to analyze Map type data, sorts the data by time sequence, and defaults to select a first time option for drawing, and in the way, we draw a starting node and an end node first; according to the time option, extracting data of a corresponding time point from the acquired data, putting opinion UUID, opinion ID, opinion departments, opinion proposers, opinion types and opinion time in different opinion nodes in each opinion message, distributing a calculated X1 and Y value to the node, and connecting a starting node with the opinion node; for the node, inquiring the message collection confirmation information, putting UUID, message collection confirmation department, message collection personnel and message collection confirmation time of the message 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 message collection confirmation node, and connecting the message collection node with the terminal node; extracting the information of the letter collecting personnel in the letter collecting confirmation information, inserting the information of the letter collecting personnel into a selection column on the right side of the canvas, and enabling a user to click the information of the letter collecting personnel for further checking; according to the information of the point-selected letter collector, the front end provides a data query application, the queried opinion and letter collection confirmation information return to two Map types in order of time, and the front end uses JavaScript to analyze; and drawing by using opinion information and letter collecting confirmation information of the user on two canvases at the lower part, wherein the system selects to draw a histogram, the time of the histogram is taken as an X1 axis, the length of a List corresponding to each time point is taken as a Y axis, and the operation frequency of the opinion submitted by the user and the letter collecting confirmation opinion executed by each time point is meant to be reflected.
Correspondingly, the present embodiment further provides a blockchain-based multi-source data fusion full-period traceability analysis system, as shown in fig. 2, the system 200 includes a blockchain 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, wherein:
the blockchain basic service module 201 is used for constructing a blockchain infrastructure supporting a traceability analysis system; further, the blockchain basic service module 201 includes: the system comprises a blockchain network parameter setting sub-module 201-1, a channel and rule management sub-module 201-2 and an intelligent contract sub-module 201-3, wherein the blockchain network parameter setting sub-module 201-1 is used for configuring a network environment required by system operation, the channel and rule management sub-module 201-2 is used for prescribing a joining strategy organized in a alliance, and the intelligent contract sub-module 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 packaged Fabric Peer container, fabric Orderer container, fabric CA container, fabric CouchDB container and corresponding configuration files from the open source network through the Docker container technology, and deploys each container to form a virtual network on the local machine; the blockchain parameter setting sub-module 201-1 and the channel and rule management sub-module 201-2 use the YAML file read package to obtain configuration file data in the virtual network, and write corresponding configuration into the blockchain creation block; the intelligent contract submodule 201-3 is written by Golang, mainly uses Fabric Chaincode Go packets to realize the interactive function of contracts, and performs packing and chaining through binary Peer files obtained in an open source network.
The user identity management module 202 is used for performing operation management on the identity of the user of the system; further, the user identity management module 202 includes: the system comprises an identity management sub-module 202-1, an identity distribution sub-module 202-2 and an identity verification sub-module 202-3, wherein the identity management sub-module 202-1 is used for managing and interacting with CA nodes in a system, the identity distribution sub-module 202-2 is used for distributing identities to Orderer organizations and Peer organizations, and the identity verification sub-module 202-3 is used for specifying the authority of the identities of the nodes in the organizations.
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 of which are encapsulated by a Docker container, and the user may interact by Fabric CA Java SDK using REST APIs in the container; the TLS-CA may be an organization's own CA or a CA provided by a Fabric network, where the CA needs to have its own administrator to issue TLS certificates for different organizations to ensure security of communication links in the federated chain network, where the TLS certificates are typically distributed offline, and where the organization CA is typically divided into an Orderer organization CA and a Peer organization CA, which are logically separated, but may be located in the same physical machine in actual deployment;
In one embodiment of the present application, the identity distribution sub-module 202-2 includes an Orderer organization's identity distribution and a Peer organization's identity distribution that relies on a secure communication link secured by a certificate issued by a TLS-CA; the Orderer organization CA will issue Orderer node identities and Orderer organization manager identities, one Orderer organization can only possess one manager identity, but can possess multiple Orderer node identities; the Peer organization CA will issue Peer node identities, peer organization administrator identities, and end user identities, similar to Orderer organization, the Peer organization can only have one administrator, but can have multiple nodes and end users; the organization can start the corresponding node container only after having the manager identity and the node identity;
in an embodiment of the present application, the identity verification sub-module 202-3 divides the identities into four different identity authorities, admin, peer, orderer and user, and these 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 formulate a calling strategy of a contract in the organization; the peer identity has the authority of interacting with the blockchain network, and invokes contracts in the blockchain network to generate a transaction block; the order identity has the authority of ordering the blocks, so that the blockchain network is agreed through a consensus algorithm; the user identity interacts with the peer node and invokes the contract according to a contract invocation policy.
The tracing system basic function module 203 is used for providing basic functions such as identity authentication and data transmission interfaces for the system; further, the trace source system basic function module 203 includes a basic system function sub-module 203-1, a micro service sub-module 203-2, and a chain code operation sub-module 203-3, where the basic system function sub-module 203-1 is configured to provide identity authentication, and the identity is an on-chain identity issued by the identity management module 202, and the micro service sub-module 203-2 includes three functions of RPC service, data recording service, and data query service, and the chain code operation sub-module 203-3 includes three functions of data definition, data query, and data storage.
In an example of the present application, the basic system function sub-module 203-1 uses Fabric Java CA SDK to verify the distributed identity file, and verifies the RPC Token attached to the identity file in combination with the Java Web Token package; the micro-service sub-module 203-2 uses an Apache thread technology, uses a non-blocking multithreading service end and a frame compression communication protocol, realizes RPC service, distributes the transmitted parameters to a data recording service and a data query service through the RPC service, and invokes the data storage and data query functions of the chain code operation sub-module 203-3 in the micro-service sub-module;
In an example of the present application, the chain code operation sub-module 203-3 uses the Fabric Java SDK to interact with the intelligent contract sub-module 201-3, and parameters of the chain code operation are transmitted through the gRPC technology, so as to implement three functions of data definition, data query and data storage, where the data definition function is used to define a data structure of opinion data and credit confirmation data, and three extensible fields are reserved, so as to increase application scenarios, the data definition function is a dependency condition of the data query function and the data storage function, and the data query function and the data storage function perform a data modification 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 tracing contract in the block chain basic service function through the query parameters, executing common query, joint query and rich query on the chain through the state database, and in the query process, if the queried data field contains an index, carrying out query acceleration through the index; 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 the multi-source data tracing contract in the blockchain basic service function, storing the byte strings into the on-chain state database, and enabling a user to set required index fields according to a pre-estimated result or update indexes automatically in a subsequent use process.
The data operation record module 204 is configured to define a data structure and update a data record. Further, the data operation record module 204 includes a data defining sub-module 204-1 and a data updating sub-module 204-2, wherein the data defining sub-module 204-1 defines user record information and data record information, and the data record updating sub-module user stores data and updates data, and further, the data record updating sub-module 204-2 includes four main functions of newly creating a user record, modifying a user record, newly creating a data record and modifying a data record.
In an example of the present application, the data defining sub-module 204-1 is implemented by hard coding, and a developer has made a full investigation on the user's needs before implementing the present work, and the defined data structure already includes the main fields of the required data, and leaves three extension fields for the user to meet the special needs thereof; 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 defining sub-module 204-1 encapsulates the defined data structure into beans using a Spring framework and opens a JSON parsing interface so that the data updating sub-module 204-2 obtains data from the user;
In an example of the present application, the data update sub-module 204-2 is implemented by means of a Spring framework, and opens an Http interface to implement application modes of Rest APIs, and the data update sub-module 204-2 also uses an Apache thread technology, uses a compressed frame protocol to become a thread client for accessing the micro-service sub-module 203-2, and the micro-service sub-module 203-2 forwards a request to the chain code operation sub-module 203-3, and invokes a data storage function therein according to the transferred parameters; the data updating sub-module 204-2 comprises four functions of new user record, modified user record, new data record and modified data record, wherein the new user record and the modified user record depend on the user identity management module 202, that is, the identity of any data record updating sub-module for updating record on the chain is the identity issued in the identity management sub-module 202-1; the newly built data record and the modified data record depend on the data storage function of the chain code operation module 203-3, namely, any data record update sub-module performs data record of update record on the chain through the data storage function; all data is received by the user from outside using an open Http interface or Rest APIs in the form of JSON data packed into byte strings, which are parsed and restored to beans, the data structure of data definition submodule 204-1.
The traceability analysis module 205 is configured to provide a data traceability query function and a visual display function for the system; further, the traceability analysis module 205 includes 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 blockchain and collect the information to the traceability data visualization sub-module 205-2, and the latter locally stores the obtained information and draws a visual display graph.
In an example of the present application, the on-chain data query sub-module 205-1 is implemented by means of a Spring framework, and opens an Http interface to implement application modes of Rest APIs, where the data query sub-module 205-1 also uses an Apache thread technology, uses a compressed frame protocol to become a thread client, and is configured to access the micro-service sub-module 203-2, and the micro-service sub-module 203-2 forwards a request to the chain code operation sub-module 203-3, and invokes a data query function therein according to the transferred parameters; the queried data structure accords with the data structure defined by the data definition function of the data definition sub-module 204-1 and the chain code operation sub-module 203-3 and returns in the form of a JSON list;
In an example of the present application, the traceability data visualization submodule 205-2 is implemented by means of an echartis framework and a CouchDB database, wherein CouchDB is used as a local database, the data queried by the on-face data query submodule 205-1 is locally cached, the database is consistent with an on-chain Peer node database, and the data can be stored without a conversion format; the Echarts framework is used as a front-end drawing framework, and the drawing of the traceable visual graph can be completed through JavaScript script.

Claims (10)

1. A multi-source data fusion full-period traceability analysis method based on a blockchain is characterized by comprising 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 the designed transmission method, and after transmitting the data to the letter collector, the letter collector confirms the letter collection of the data; the data submitted by the user and the letter collecting confirmation operation behaviors of the letter collecting personnel on the submitted data are all recorded in a chain to form traceability data;
after the data record is linked, the user with relevant authority inquires the linked data, and the inquired data is processed by the Web front end and then displayed to the system user for the user to analyze the traceable data;
Wherein the extensible data comprises user data and traceability data;
the user data is information data of a system user and comprises a user unit, a user name and a user identity;
the tracing data comprises opinion data and opinion collection confirmation data for the opinions, wherein the opinion data comprises opinion related fields and extension fields, and the opinion collection confirmation data comprises opinion collection confirmation related fields and extension fields;
the data transmission method is a method for carrying out data interaction between a block chain and an entity outside the chain, and the implementation principle is that the block chain is packaged with external service, and an RPC technology is used for constructing micro-service for interacting with the chain;
the RPC is used for transmitting modes in a data transmission method.
2. The multi-source data fusion full-period traceability analysis method based on the blockchain according to claim 1, wherein the data reporting is that a user reports data to the blockchain by utilizing an RPC technology, after the data is transmitted and uplinked, the blockchain calls a data transmission interface to transmit the data to a letter collector, and the letter collector with legal identity submits letter collection confirmation data to the chain after carrying out letter collection confirmation on the data;
the data transmission structure is an interface encapsulated in the transmission method.
3. The blockchain-based multi-source data fusion full-period traceability analysis method according to claim 1, wherein the data record uplink records related information submitted by a user with legal identity in a blockchain;
the related information includes user information and data submitted by the user.
4. The blockchain-based multi-source data fusion full-period traceability analysis method according to claim 1, wherein the traceability data analysis comprises: the RPC is utilized to realize the inquiry of the block chain information and the front end is utilized to display the inquired data;
the front end display is used for visually displaying the data queried by the RPC by using Echart.
5. A multi-source data fusion full-period traceability analysis system based on a blockchain is characterized by comprising: the system comprises a block chain basic service module, a user identity management module, a tracing system basic function module, a data operation record module and a tracing analysis module;
the system comprises a block chain basic service module, a data operation recording module, a tracing analysis module, a data analysis module, a tracing system basic function module and a data analysis module, wherein the block chain basic service module is used for constructing a block chain infrastructure supporting the tracing analysis system, receiving input parameters of the data operation recording module and the tracing 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 tracing system basic function module;
The user identity management module is used for carrying out identity management, identity distribution and identity confirmation on the user based on the blockchain infrastructure, the user identity exists in a file form, the distributed identity is authenticated by the basic function module of the traceability system, and the user passing the identity verification can use the function of the basic function module of the traceability system;
the system comprises a tracing system basic function module, a user identity management module, a block chain basic service module, a tracing analysis module, a data transmission interface, a data operation recording module and a middle layer module, wherein the tracing system basic function module is used for providing identity authentication and a data transmission interface, the identity authentication function interacts with the user identity management module, the data transmission interface interacts with the block chain basic service module, the data operation recording module and the tracing analysis module, and the data transmission interface acts as the middle 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 functional module, transmitting the data to be recorded to the blockchain basic service module for uplink, and recording the data uplink state information returned by the blockchain basic service module;
the traceability analysis module is used for providing a data query interface, and the module uses the data transmission interface of the traceability system basic function module to transmit parameters to the blockchain basic service module, receives a query result given by the blockchain basic service module and performs visual display on data returned by the blockchain basic service module.
6. The blockchain-based multi-source data fusion full-period traceability analysis system of claim 5, wherein the blockchain infrastructure building blockchain infrastructure includes 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 sub-module is used for meeting the network environment required by the system operation based on the design requirement of the system;
the creation and rule management submodule is used for adding the blockchain organization 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 identity of a user;
the intelligent contract sub-module is a contract capable of meeting the multi-source data tracing requirement, the data operation recording module is used for uploading data information through the contract, and the tracing analysis module is used for inquiring the required data content through the contract.
7. The blockchain-based multi-source data fusion full-period traceability analysis system according to claim 5, wherein the user identity management module comprises an identity management sub-module, an identity distribution sub-module and an identity verification sub-module;
The identity management submodule is used for CA deployment, the CA is used for interacting with a digital certificate issuing mechanism in a blockchain during CA deployment, the CA is used for issuing a TLS certificate in an organization member, and the security of user identity information in a alliance chain network is ensured, wherein the TLS certificate adopts an off-line distribution form;
the identity distribution sub-module is divided into identity distribution of an Order organization and identity distribution of a Peer organization, wherein the organization comprises an administrator and a plurality of users, the identity distribution in the organization is the organization CA issuance, the CA in the 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 authentication submodule is divided into admin, peer, order and user four different identity authorities, 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 formulate a calling strategy of a contract in the organization; the peer identity has the authority of interacting with the blockchain network, and invokes contracts in the blockchain network to generate a transaction block; the order identity has the authority of ordering the blocks, so that the blockchain network is agreed through a consensus algorithm; the user identity interacts with the peer node and invokes the contract according to the contract invoking policy; the organization only has the identities of the admin, order and user, the Peer organization only has the identities of the admin, peer and user, and the organization can be the Order organization or the Peer organization, and the CA directly signs the identities with the four rights.
8. The blockchain-based multi-source data fusion full-period traceability analysis system according to claim 5, wherein the traceability system basic functional module comprises a basic system functional sub-module, a microservice sub-module and a chain code operation sub-module;
the basic system function submodule is used for providing an identity authentication function, 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 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 tracing analysis service module and distributing requests 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 tracing contract through a chain code operation sub-module to complete 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 the data structure of opinion data and acquisition confirmation data, and three extensible fields are reserved for increasing application scenes, the data definition module is a dependent condition of the data query module and the data storage module, and the data query module and the data storage module perform data modification function according to the 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 tracing contract in the block chain basic service module through the query parameters, and executing common query, joint query and rich query on the chain through the state database; the data storage module is used for converting the data parameters transmitted by the data operation record service module in the micro-service sub-module into JSON byte strings through the multi-source data tracing contract in the block chain basic service module and storing the byte strings into the on-chain state database.
9. The blockchain-based multi-source data fusion full-period traceability analysis system according to claim 8, wherein the data operation record 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 information in the data definition module in the chain code operation submodule is consistent with the information in the data definition module, a field for explaining the data type is added, the data definition submodule is the dependent condition of the data update submodule, and the data modified by the data update submodule strictly complies with the data format defined in the data definition submodule;
the data update sub-module comprises: the method comprises the steps of creating a user record, modifying the user record, creating a data record and modifying the data record, wherein the created user record and the modified user record depend on the function of a user identity management module, namely the identity of any data updating sub-module for updating the record on a chain is the identity issued in the identity management function; the newly built data record and the modified data record depend on the data storage function of the chain code operation sub-module, namely, the data record of any data update sub-module for updating record on the chain is recorded by the data storage module.
10. The blockchain-based multi-source data fusion full-period traceability analysis system according to claim 8, 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, checking the identity of a user querying the information, and finally summarizing the queried data and providing the queried data for the traceability data visualization submodule; the on-chain information inquiry depends on the data inquiry module of the chain code operation sub-module, namely the on-chain data inquiry sub-module transmits parameters to the data inquiry module of the chain code operation sub-module and obtains a return value from the parameters; the user identity verification depends on an identity authentication function provided by a basic system function sub-module, and only a user passing identity authentication is authorized to perform inquiry operation;
the traceability data visualization submodule comprises a traceability data storage database selection function and a visualization display function, wherein the traceability data storage database is used for selecting a state database as a CouchDB in order to meet the functional requirement of system storage data, the visualization display function is used for drawing by using an Echarts drawing library, query data required to be displayed are obtained from the on-chain data query submodule, and a front-end drawing library is called to display a corresponding visualization traceability interface after the corresponding data are 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 CN114610991A (en) 2022-06-10
CN114610991B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185668B (en) * 2023-04-26 2023-06-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

Also Published As

Publication number Publication date
CN114610991A (en) 2022-06-10

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)
AU2020273341C1 (en) Telecommunications product defining and provisioning
CN109447811B (en) Method, accounting node and medium for inquiring transaction information in blockchain network
US20200065300A1 (en) Dag based methods and systems of transaction processing in a distributed ledger
US7831693B2 (en) Structured methodology and design patterns for web services
US7698398B1 (en) System and method for generating Web Service architectures using a Web Services structured methodology
US8346929B1 (en) System and method for generating secure Web service architectures using a Web Services security assessment methodology
CN113711536A (en) Extracting data from a blockchain network
US20060235882A1 (en) System and method for developing arbitrary and efficient mappings between complex message structures
Falazi et al. Smart contract invocation protocol (SCIP): A protocol for the uniform integration of heterogeneous blockchain smart contracts
CN108197895A (en) A kind of enterprise information system Rights Management System
CN102663009B (en) Web-service integration method supporting data privatization of enterprise users
WO2007109235A2 (en) Inter domain services manager
CN1997983A (en) Service oriented architecture
WO2014165967A1 (en) Method and system for managing cloud portals, and billing system therefor
CN112835985B (en) Spatial data sharing system and method based on distributed account book
CN111327613A (en) Distributed service authority control method and device and computer readable storage medium
WO2006010320A1 (en) Object-oriented information server, creation method thereof and browser
CN114610991B (en) Multi-source data fusion full-period traceability analysis method and system based on block chain
DE602005005435T2 (en) System and method for communication management of component applications
CN111915301A (en) Data processing method and device based on block chain, electronic equipment and readable medium
US11226943B2 (en) Assigning access control for flat data structure
CN110991573B (en) Product management method, system, client node and storage medium
CN112215710A (en) Annuity data processing method, block chain system, medium and electronic device

Legal Events

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