CN117539645B - Block chain network construction method, system and storage medium based on service chain - Google Patents

Block chain network construction method, system and storage medium based on service chain Download PDF

Info

Publication number
CN117539645B
CN117539645B CN202410028422.3A CN202410028422A CN117539645B CN 117539645 B CN117539645 B CN 117539645B CN 202410028422 A CN202410028422 A CN 202410028422A CN 117539645 B CN117539645 B CN 117539645B
Authority
CN
China
Prior art keywords
transaction
channel
serial number
blockchain
service 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.)
Active
Application number
CN202410028422.3A
Other languages
Chinese (zh)
Other versions
CN117539645A (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.)
Sichuan Xunyi Technology Co ltd
Original Assignee
Sichuan Xunyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Xunyi Technology Co ltd filed Critical Sichuan Xunyi Technology Co ltd
Priority to CN202410028422.3A priority Critical patent/CN117539645B/en
Publication of CN117539645A publication Critical patent/CN117539645A/en
Application granted granted Critical
Publication of CN117539645B publication Critical patent/CN117539645B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • 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/2453Query optimisation
    • 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/2455Query execution
    • 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/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Abstract

The invention relates to a block chain technology and discloses a block chain network construction method, a system and a storage medium based on a service chain, wherein the method is characterized in that two channels are created in a block chain network consensus service and block chain nodes subscribing to the two channels are configured, so that the block chain node subscribing to a first channel can call a first intelligent contract, execute transaction appointed by a transaction request, write generated transaction data into a full account book, and enable the block chain node subscribing to a second channel to cache the transaction data which are transmitted by different transaction parties and carry transaction requests of the same transaction serial number and are positioned in a Hash address of the full account book to be packed as a tracing block and written into a sub account book by calling a second intelligent contract; since the transaction serial number is unique and is shared by all transaction parties of the business chain when performing the associated transaction; therefore, the blockchain network constructed by the method can realize the on-chain evidence storage of the traceability block based on the service chain through the sub account book.

Description

Block chain network construction method, system and storage medium based on service chain
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain network construction method, system and storage medium based on a service chain.
Background
The blockchain technology can prove the originality and the integrity of the data in the life cycle of the data, and the proving process does not depend on the trust relationship of any third party; thus, trust of all participants can be established by using blockchain technology, and authenticity and integrity of transactions of all participants are ensured. Because the bottom layer platform of the blockchain generally adopts a storage structure of a key value pair, the advantage is that the read-write efficiency is extremely high, but the deep processing is difficult to be implemented on transaction data in the blockchain, at present, systems such as a blockchain browser, an operation management platform, a monitoring platform, a supervision audit and the like generally adopt a strategy of ' on-chain block output, under-chain timely ETL (electronic toll collection) warehousing ', namely, the mirror image ' of the on-chain data can be constructed by writing the on-chain data into a relational database (such as MySQL) or a big data platform outside the chain, and the local analysis processing can be carried out; with the increasing complexity of the services participated by the blockchain, the massive growth of the data on the blockchain brings challenges to the analysis processing capability and privacy protection capability of the system under the blockchain, and the system under the blockchain is completely relied on to implement processing of the data on the blockchain, so that the system under the blockchain is difficult to adapt to the rapid development of the blockchain application.
Disclosure of Invention
In view of the above-described deficiencies of the prior art, the present invention aims to: the block chain network construction method based on the business chain is provided, and through creating two channels in the block chain network consensus service and configuring the block chain nodes subscribing the two channels, not only can the on-chain evidence storage of the full account book detail be realized, but also the on-chain evidence storage of the traceable block based on the business chain can be realized, so that the traceable block can be directly inquired during transaction traceability, the privacy leakage risk is prevented from being introduced during the inquiry through the full account book, and the workload of the block chain system is increased.
In order to achieve the above object, the present invention provides the following technical solutions:
the block chain network construction method based on the service chain comprises the following steps:
after networking a plurality of node devices to form a blockchain network, creating a first channel and a second channel in a blockchain network consensus service;
configuring a plurality of blockchain nodes to collectively maintain a full ledger and subscribe to the first channel, and configuring a portion of blockchain nodes in the plurality of blockchain nodes to collectively maintain a sub ledger and subscribe to the second channel;
moreover, the blockchain node subscribed to the first channel is configured to: after a transaction request sent by a transaction party is acquired, a first intelligent contract is called for executing a transaction appointed by the transaction request, generated transaction data is written into the full account book, whether the transaction request carries a transaction serial number or not is judged, and if the transaction serial number is carried, a Hash address of the transaction data in the full account book is forwarded to a blockchain node subscribing the second channel;
configuring blockchain nodes subscribed to the second channel to: after receiving the Hash address, invoking a second intelligent contract to cache the received Hash address, packaging the cached Hash address corresponding to the transaction request carrying the same transaction serial number sent by different transaction parties into a tracing block, and writing the tracing block into the sub account book;
the transaction serial numbers carry service chain identification information and are shared when each transaction party in the corresponding service chain carries out associated transaction.
According to a specific embodiment, the block chain network construction method based on the service chain provided by the invention comprises the following steps:
configuring a blockchain node subscribed to the first channel to: after a transaction serial number generation request sent by a transaction party is obtained, a third intelligent contract is called to check signature information carried by the transaction serial number generation request, after the signature is checked, a transaction serial number corresponding to the transaction serial number generation request is generated, and the generated transaction serial number is recorded in the full account book.
According to a specific embodiment, in the method for constructing a blockchain network based on a service chain provided by the invention, blockchain nodes subscribed to the first channel are configured as follows: after the first intelligent contract is called, if the transaction request carries a transaction serial number, further verifying whether the transaction serial number carried by the transaction request is recorded in the full account book, and if the transaction serial number is recorded, forwarding a Hash address corresponding to the transaction request to a blockchain node subscribed to the second channel.
According to a specific embodiment, in the method for constructing a blockchain network based on a service chain provided by the invention, the blockchain node subscribed to the second channel is configured as follows: after the second intelligent contract is called, judging whether a cache queue corresponding to the transaction serial number carried by the transaction request exists or not; if yes, the received Hash address is added into a corresponding cache queue, otherwise, a cache queue corresponding to the transaction serial number is established.
Further, in the block chain network construction method based on the service chain provided by the invention, the block chain node subscribed to the second channel is configured as follows: and establishing the cache queue in an isolated environment.
According to a specific embodiment, in the method for constructing a blockchain network based on a service chain provided by the invention, the blockchain node subscribed to the second channel is configured as follows: and after the obtained Hash address is added to the corresponding cache queue, judging whether the cache queue meets a packing condition, if so, packing the Hash address in the cache queue into the tracing block, and writing the tracing block into the sub account book.
Further, in the block chain network construction method based on the service chain provided by the invention, the block chain node subscribed to the second channel is configured as follows: and determining a tracing data structure of a corresponding service chain according to the service chain identification information carried by the transaction serial number, and respectively taking the Hash addresses in the cache queue as data items of the corresponding data elements according to the mapping relation between the data elements of the tracing data structure and transaction parties of the service chain, so as to obtain tracing data, and packaging the tracing data into tracing blocks.
Still further, in the block chain network construction method based on the service chain provided by the invention, the tracing data includes: an integrity flag and a compliance flag; the integrity mark is determined according to whether a data item of a data element in the traceability data is empty or not; the compliance mark is determined according to whether the time characteristic of each data element in the traceability data accords with a business rule or not, and the time characteristic is determined by the relation of the generation time of the Hash address in the data item among the data elements.
According to a specific embodiment, in the block chain network construction method based on the service chain provided by the invention, the packing conditions are as follows: acquiring a service inquiry request of the transaction serial number; and/or the establishment time of the cache queue or the time from last packaging time reaches the set time; and/or the buffer queue buffers the Hash address corresponding to the transaction party at the tail end in the service chain.
According to a specific embodiment, in the method for constructing a blockchain network based on a service chain provided by the invention, the blockchain node subscribed to the second channel is configured as follows: and if the cache queue has cached the Hash address corresponding to the transaction requester at the tail end in the service chain, after the trace-source block writes the sub-ledger, clearing the cache queue.
The invention also provides a block chain system which is constructed by adopting the block chain network construction method based on the service chain.
The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by one or more processors implements the business chain based blockchain network construction method provided by the present invention.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a block chain network construction method based on a service chain, which is characterized in that two channels are created in a block chain network consensus service and block chain nodes subscribing to the two channels are configured, so that the block chain nodes subscribing to a first channel can call a first intelligent contract, execute transaction appointed by a transaction request, write generated transaction data into a full account book, enable the block chain nodes subscribing to a second channel to be capable of packaging the cached transaction data which are transmitted by different transaction parties and carry transaction requests of the same transaction serial number into a tracing block by calling a second intelligent contract, and write the tracing block into a sub account book; since the transaction serial number is unique and is shared by all transaction parties of the business chain when performing the associated transaction; therefore, the blockchain network constructed by the method can realize the on-chain evidence storage of the detail of the full account book, and can also realize the on-chain evidence storage of the tracing block based on the business chain through the sub account book, so that the tracing block can be directly inquired through the sub account book when the transaction is traced, the privacy leakage risk is avoided from being introduced and the workload of the blockchain system is increased when the transaction is inquired through the full account book.
Drawings
FIG. 1 is a schematic diagram of a block chain network construction process based on a service chain according to the present invention;
FIG. 2 is a schematic diagram illustrating the operation of a blockchain node configured to subscribe to a first channel and a second channel in accordance with the present invention;
FIG. 3 is a schematic diagram of a blockchain network based on a business chain constructed in one embodiment of the invention;
FIG. 4 is a schematic diagram illustrating the operation of the blockchain node of the present invention in configuring a subscribing first channel in the embodiment of FIG. 3;
FIG. 5 is a schematic diagram illustrating the operation of a blockchain node configured to subscribe to a second channel in one embodiment of the present invention;
FIG. 6 is a schematic flow chart of a source block packing process according to the present invention;
FIG. 7 is a schematic diagram of a service chain, a cache queue and a trace-source data structure according to the present invention;
FIG. 8 is a block chain system architecture diagram of the present invention.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention.
Generally, when a block chain is utilized to conduct a transaction, a transaction request is required to be sent to a block chain link point by the transaction direction, then the block chain link point executes a transaction designated by the transaction request, specifically, the block chain node completes the designated transaction by calling a corresponding intelligent contract, and after the transaction execution is completed, transaction data is recorded on the block chain.
As shown in fig. 1 and 2, the block chain network construction method based on the service chain includes:
firstly, before networking a blockchain network, networking configuration is required to be carried out on node equipment to be networked, and then after each node equipment is started, the node equipment is networked to form the blockchain network according to networking configuration; wherein, the data layer, the network layer and the consensus layer of the blockchain network can be defined through networking configuration; for example, the data layer includes an created block, a chained structure, a random number on the block, a time stamp, public and private key data, etc.; the network layer comprises a point-to-point networking mechanism, a data transmission mechanism, a data verification mechanism and the like; the network layer contains a consensus algorithm and a consensus mechanism.
Specifically, the blockchain network employs a Hyperledger Fabric blockchain architecture, hyperledger Fabric, using a message passing channel with guaranteed publish-subscribe patterns (e.g., subject partition in Kafka), separates consensus services from transaction logs (ledgers), which are provided by network nodes called Orders, and the ledgers are managed by Peer nodes. Each Peer node is connected to one or more channels of a consensus service, just like clients in a publish-subscribe communication system. Transactions broadcast on the channels are arranged in a consensus order (e.g., PBFT, kafka), and the Peer nodes subscribing to the channels receive the encrypted chunks. Each peer node validates the block and submits it to the ledger and then provides other services to the application that use the ledger.
After networking a plurality of node devices to form a blockchain network, creating a first channel and a second channel in a blockchain network consensus service; then, configuring a plurality of blockchain nodes to commonly maintain a full ledger and subscribe to the first channel, and configuring part of blockchain nodes in the plurality of blockchain nodes to commonly maintain a sub ledger and subscribe to the second channel;
after the subscription relation between the blockchain node and the first channel and the second channel of the blockchain consensus service is established, because the services among different channels are mutually isolated, corresponding intelligent contracts are required to be installed on the blockchain nodes subscribing to the first channel and the second channel respectively and are deployed on the first channel and the second channel.
By installing the first smart contract S1 at blockchain nodes subscribed to the first channel, blockchain nodes subscribed to the first channel may be configured to: after a transaction request sent by a transaction party is acquired, a first intelligent contract S1 is called to execute a transaction appointed by the transaction request, generated transaction data is written into the full account book, whether the transaction request carries a transaction serial number is judged, and if the transaction serial number is carried, a Hash address of the transaction data in the full account book is forwarded to a blockchain node subscribed to the second channel;
by installing a second smart contract S2 at blockchain nodes subscribed to a second channel, blockchain nodes subscribed to the second channel may be configured to: after receiving the Hash address, invoking a second intelligent contract S2 to buffer the received Hash address, packaging the buffered Hash addresses corresponding to the transaction requests carrying the same transaction serial number sent by different transaction parties into a tracing block, and writing the tracing block into the sub account book;
the transaction serial numbers carry service chain identification information and are shared when each transaction party in the corresponding service chain carries out associated transaction. Specifically, when each transaction party participating in a service chain initiates an associated transaction based on the service chain, a unique transaction serial number is corresponding to the associated transaction, and the transaction serial number is shared by each transaction party of the service chain in the execution process of the associated transaction, that is, the transaction serial number is carried in a transaction request sent by each transaction party.
Therefore, the invention can package the on-chain evidence storage information of the related transaction based on one business chain into the tracing block by creating two channels and configuring the blockchain nodes subscribed to the two channels in the blockchain network consensus service, and realize the on-chain evidence storage of the tracing block based on the business chain, thereby directly inquiring the tracing block during transaction tracing, avoiding the introduction of privacy leakage risk and the increase of the workload of the blockchain system during the inquiry of a full account book.
Specifically, as shown in fig. 3 and fig. 4, consider that when initiating a business chain-based association transaction for each transaction party participating in a business chain, a unique transaction serial number is corresponding to the association transaction, and for unified management of the transaction serial number, a third intelligent contract S3 is installed at a blockchain node subscribed to the first channel; therefore, the blockchain network construction method based on the service chain further configures the blockchain node subscribed to the first channel as follows: and after the transaction serial number generation request sent by the transaction party is acquired, a third intelligent contract S3 is called for checking signature information carried by the transaction serial number generation request, and after the signature checking is passed, the transaction serial number corresponding to the transaction serial number generation request is generated, and meanwhile, in order to ensure that the transaction serial number carried by the transaction request sent by the transaction party is unique and cannot be tampered, the generated transaction serial number is recorded in the full account book. After the transaction serial number is stored on the chain, the transaction serial number can be directly distributed to each transaction party in the service chain through the block chain link point of the first channel, and of course, the transaction party sending the transaction serial number generation request can also be synchronized to other transaction parties in the service chain through the transaction party after acquiring the transaction serial number returned by the block chain node of the first channel.
Further, in order to verify the uniqueness of the transaction serial number carried by the transaction request sent by the transaction party, after the blockchain node of the first channel determines that the transaction serial number is carried in the transaction request, it is further verified whether the transaction serial number carried by the transaction request is recorded in the full account book, if the transaction serial number is recorded, the Hash address of the transaction data generated by responding to the execution of the transaction request to specify the transaction is forwarded to the blockchain node subscribing to the second channel for caching. When the block chain node of the first channel forwards the Hash address, the Hash address is submitted to the block chain consensus service, and then is published to the block chain node subscribing the second channel through the block chain consensus service.
Specifically, as shown in fig. 5, in order to better realize the caching of Hash addresses associated with different transaction serial numbers, in the blockchain network construction method based on the service chain provided by the invention, the blockchain nodes subscribed to the second channel are configured as follows: after the second intelligent contract is called, firstly judging whether a cache queue corresponding to the transaction serial number carried by the transaction request exists or not by the block chain link point of the second channel; if yes, adding the obtained Hash address into a corresponding cache queue, otherwise, establishing a cache queue corresponding to the transaction serial number, and adding the obtained Hash address into the corresponding cache queue after establishing the cache queue corresponding to the transaction serial number.
Meanwhile, in order to ensure the security of the Hash address associated with the transaction serial number, a cache queue is established in an isolation environment, and access is limited; in implementation, the isolation environment is realized by adopting a sandbox technology, and the security of the Hash address in the cache queue can be ensured by limiting the access authority through the sandbox technology.
Further, after the block chain link point of the second channel adds the obtained Hash address to the corresponding cache queue, the block chain node of the second channel judges whether the cache queue meets the packing condition, if so, the Hash address in the cache queue is packed into the tracing block and written into the sub account book.
Wherein the packing condition is set as: acquiring a service inquiry request of the transaction serial number; and/or the establishment time of the cache queue or the time from last packaging time reaches the set time; and/or the buffer queue is added into the Hash address corresponding to the transaction party at the tail end in the service chain. Thus, by responding to the service inquiry request, the real-time inquiry of the transaction traceability condition based on the service chain can be realized; realizing automatic on-chain evidence storage of a tracing block based on a service chain through setting time; and by monitoring the ID identification of the transaction party at the tail end in the service chain, whether the associated transaction of the service chain is finished or not can be identified, and then a final tracing block of the associated transaction is directly generated.
As shown in fig. 6, in the method for constructing a blockchain network based on a service chain provided by the present invention, a manner of packing the Hash address in the cache queue into the tracing block is as follows: and determining a tracing data structure of a corresponding service chain according to the service chain identification information carried by the transaction serial number, and respectively taking the Hash addresses in the cache queue as data items of the corresponding data elements according to the mapping relation between the data elements of the tracing data structure and transaction parties of the service chain, so as to obtain tracing data, and packaging the tracing data into tracing blocks.
The type of the traceability data structure is determined by the construction condition of the service chain, as shown in fig. 7, the service chain participated by the transaction parties a-D is linear, and then the traceability data structure is also linear; meanwhile, the transaction parties in the service chain and the data elements in the traceability data structure have a one-to-one mapping relation, and the Hash addresses in the cache queue correspond to transaction requests sent by different transaction parties, so that the Hash addresses in the cache queue are respectively used as data items of the corresponding data elements, and the data elements can be organized according to the traceability data structure to obtain traceability data. In implementation, the trace data includes: an integrity flag and a compliance flag; the integrity mark is determined according to whether a data item of a data element in the traceability data is empty or not; the compliance mark is determined according to whether the time characteristic of each data element in the traceability data accords with a business rule or not, and the time characteristic is determined by the relation of the generation time of the Hash address in the data item among the data elements. For example, when the related transaction of the service chain is not completed and the packaging condition is met, at the moment, the data item of the data element in the tracing data is null, and at the moment, the integrity mark of the tracing data indicates that the service chain is incomplete; the business rule refers to constraint requirements of the business chain in a business scene, for example, the transaction time between the transaction party A and the transaction party B is required not to exceed the appointed time, and then whether the business chain accords with the compliance can be primarily judged through comparison of the generation time of the corresponding Hash address of the transaction data of the transaction party A and the transaction party B when the transaction party A participates in the associated transaction of the business chain.
Therefore, by setting the integrity mark and the compliance mark, the preliminary conclusion of whether the related transaction of the service chain is complete or not and whether the related transaction is compliant or not can be directly obtained after the traceability data is obtained, and the efficiency of subsequent traceability analysis is improved.
As shown in fig. 8, the present invention further provides a blockchain system, which is constructed by adopting the blockchain network construction method based on the service chain provided by the present invention. Specifically, in the blockchain system, nodes 1-N subscribe to a first channel of a consensus service and together maintain a full account book; while node 1, node 2 and node N subscribe to a second channel of the consensus service at the same time and maintain the sub-ledgers together; meanwhile, the first intelligent contracts S1 are installed on the nodes 1-N, and the second intelligent contracts S2 are installed on the nodes 1, 2 and N. In addition, as shown in fig. 3, the blockchain system is further based on fig. 8, and a third smart contract S3 is installed at each of the nodes 1 to n.
Meanwhile, the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by one or more processors, implements the blockchain network construction method based on service chains provided by the invention.
It should be understood that the system disclosed in the present invention may be implemented in other manners. For example, the modules may be divided into only one logic function, and there may be other manners of dividing the modules when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. In addition, the communication connection between modules may be an indirect coupling or communication connection via some interfaces, devices or units, and may be in electrical or other forms.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (12)

1. The block chain network construction method based on the service chain is characterized by comprising the following steps:
after networking a plurality of node devices to form a blockchain network, creating a first channel and a second channel in a blockchain network consensus service;
configuring a plurality of blockchain nodes to collectively maintain a full ledger and subscribe to the first channel, and configuring a portion of blockchain nodes in the plurality of blockchain nodes to collectively maintain a sub ledger and subscribe to the second channel;
moreover, the blockchain node subscribed to the first channel is configured to: after a transaction request sent by a transaction party is acquired, a first intelligent contract is called for executing a transaction appointed by the transaction request, generated transaction data is written into the full account book, whether the transaction request carries a transaction serial number or not is judged, and if the transaction serial number is carried, a Hash address of the transaction data in the full account book is forwarded to a blockchain node subscribing the second channel;
configuring blockchain nodes subscribed to the second channel to: after receiving the Hash address, invoking a second intelligent contract to cache the received Hash address, packaging the cached Hash address corresponding to the transaction request carrying the same transaction serial number sent by different transaction parties into a tracing block, and writing the tracing block into the sub account book;
the transaction serial numbers carry service chain identification information and are shared when each transaction party in the corresponding service chain carries out associated transaction.
2. The blockchain network construction method based on the service chain of claim 1, wherein the blockchain node subscribed to the first channel is configured to: after a transaction serial number generation request sent by a transaction party is obtained, a third intelligent contract is called to check signature information carried by the transaction serial number generation request, after the signature is checked, a transaction serial number corresponding to the transaction serial number generation request is generated, and the generated transaction serial number is recorded in the full account book.
3. The blockchain network construction method based on the service chain of claim 2, wherein the blockchain node subscribed to the first channel is configured to: after the first intelligent contract is called, if the transaction request carries a transaction serial number, further verifying whether the transaction serial number carried by the transaction request is recorded in the full account book, and if the transaction serial number is recorded, forwarding a Hash address corresponding to the transaction request to a blockchain node subscribed to the second channel.
4. The blockchain network construction method based on the service chain of claim 3, wherein the blockchain node subscribed to the second channel is configured to: after the second intelligent contract is called, judging whether a cache queue corresponding to the transaction serial number carried by the transaction request exists or not; if yes, the received Hash address is added into a corresponding cache queue, otherwise, a cache queue corresponding to the transaction serial number is established.
5. The blockchain network construction method based on the service chain of claim 4, wherein the blockchain node subscribed to the second channel is configured to: and establishing the cache queue in an isolated environment.
6. The blockchain network construction method based on the service chain of claim 4, wherein the blockchain node subscribed to the second channel is configured to: and after the obtained Hash address is added to the corresponding cache queue, judging whether the cache queue meets a packing condition, if so, packing the Hash address in the cache queue into the tracing block, and writing the tracing block into the sub account book.
7. The blockchain network construction method based on the service chain of claim 6, wherein the blockchain node subscribed to the second channel is configured to: and determining a tracing data structure of a corresponding service chain according to the service chain identification information carried by the transaction serial number, and respectively taking the Hash addresses in the cache queue as data items of the corresponding data elements according to the mapping relation between the data elements of the tracing data structure and transaction parties of the service chain, so as to obtain tracing data, and packaging the tracing data into tracing blocks.
8. The blockchain network construction method based on the service chain of claim 7, wherein the traceability data comprises: an integrity flag and a compliance flag; the integrity mark is determined according to whether a data item of a data element in the traceability data is empty or not; the compliance mark is determined according to whether the time characteristic of each data element in the traceability data accords with a business rule or not, and the time characteristic is determined by the relation of the generation time of the Hash address in the data item among the data elements.
9. The blockchain network construction method based on the service chain of claim 6, wherein the packing condition is: acquiring a service inquiry request of the transaction serial number; and/or the establishment time of the cache queue or the time from last packaging time reaches the set time; and/or the buffer queue buffers the Hash address corresponding to the transaction party at the tail end in the service chain.
10. The blockchain network construction method based on the service chain of claim 9, wherein the blockchain node subscribed to the second channel is configured to: and if the cache queue has cached the Hash address corresponding to the transaction requester at the tail end in the service chain, after the trace-source block writes the sub-ledger, clearing the cache queue.
11. A blockchain system, comprising: the block chain network construction method based on the service chain is used for construction according to any one of claims 1-10.
12. A computer readable storage medium having stored thereon a computer program, which when executed by one or more processors implements the business chain based blockchain network construction method of any of claims 1-10.
CN202410028422.3A 2024-01-09 2024-01-09 Block chain network construction method, system and storage medium based on service chain Active CN117539645B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410028422.3A CN117539645B (en) 2024-01-09 2024-01-09 Block chain network construction method, system and storage medium based on service chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410028422.3A CN117539645B (en) 2024-01-09 2024-01-09 Block chain network construction method, system and storage medium based on service chain

Publications (2)

Publication Number Publication Date
CN117539645A CN117539645A (en) 2024-02-09
CN117539645B true CN117539645B (en) 2024-03-26

Family

ID=89782687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410028422.3A Active CN117539645B (en) 2024-01-09 2024-01-09 Block chain network construction method, system and storage medium based on service chain

Country Status (1)

Country Link
CN (1) CN117539645B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490514A (en) * 2019-08-01 2019-11-22 深圳市珍久库科技有限公司 A kind of assets digitlization of the intelligent repository based on block chain management and device
CN111126086A (en) * 2019-12-23 2020-05-08 传神语联网网络科技股份有限公司 Block chain system fusing translation term authentication and modification traceability
CN113411189A (en) * 2021-06-16 2021-09-17 北京沃东天骏信息技术有限公司 Data processing method and device, tracing method and device, and electronic device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10839320B2 (en) * 2018-12-18 2020-11-17 Rokfin, Inc. Determining network-effects with decentralized applications
US20200320518A1 (en) * 2019-04-02 2020-10-08 Parachute Wallet LLC Architecture for facilitating data transfer for blockchain-based units in packet-based systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490514A (en) * 2019-08-01 2019-11-22 深圳市珍久库科技有限公司 A kind of assets digitlization of the intelligent repository based on block chain management and device
CN111126086A (en) * 2019-12-23 2020-05-08 传神语联网网络科技股份有限公司 Block chain system fusing translation term authentication and modification traceability
CN113411189A (en) * 2021-06-16 2021-09-17 北京沃东天骏信息技术有限公司 Data processing method and device, tracing method and device, and electronic device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Distributed Storage System for Dispatch Information Supported by Blockchain Technology;Huahua Wu等;《2021 International Conference on Power System Technology (POWERCON)》;20220208;第2129-2133页 *
基于通用数据保护条例的数据隐私安全综述;赵景欣等;《计算机研究与发展》;20221015;第2130-2163页 *

Also Published As

Publication number Publication date
CN117539645A (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN111461723B (en) Data processing system, method and device based on block chain
KR102566892B1 (en) Blockchain consensus method, device and system
CN110599095B (en) Block chain network-based hazardous waste treatment method and node of block chain network
CN111741114A (en) System, method and equipment capable of monitoring cross-chain interaction based on block chain
CN113347164B (en) Block chain-based distributed consensus system, method, device and storage medium
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
WO2020186807A1 (en) System and method for power data linking based on blockchain technology
CN112307501B (en) Big data system based on block chain technology, storage method and using method
CN113157733A (en) Efficient tracing query method for multi-chain data relevance
CN111899019A (en) Method and system for cross validation and sharing of blacklist and multiple parties
CN113271311A (en) Digital identity management method and system in cross-link network
CN112532718A (en) Block chain based offshore equipment data sharing system, method and medium
CN112134834A (en) Data lake system architecture based on block chain
WO2023040453A1 (en) Transaction information processing method and apparatus
US20210211286A1 (en) System and methods for data exchange using a distributed ledger
CN117539645B (en) Block chain network construction method, system and storage medium based on service chain
CN117539644B (en) Block chain transaction query method, system and storage medium based on service chain
CN116204904A (en) Data processing method and device for loosely coupled blockchain middleware
CN115001707B (en) Device authentication method based on block chain and related device
CN110928923A (en) Data storage method and system based on block chain
CN111682934B (en) Method and system for storing, accessing and sharing comprehensive energy metering data
CN117118640A (en) Data processing method, device, computer equipment and readable storage medium
CN114331441A (en) Data tracing and circulating method and system based on network trust
CN113256305A (en) Security check information traceability system based on block chain
Guo Application of blockchain based on deep learning algorithm in enterprise Internet of Things system

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