Microkernel-based blockchain supply chain system customizable method
By using a blockchain supply chain system based on microkernel and domain-driven design, the problem of low adaptability to diverse application scenarios is solved, achieving flexible adaptation to business needs and data transparency, while reducing system complexity and development costs.
Patent Information
- Application Number
- CN202411687447.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Existing blockchain supply chain systems have low adaptability to diverse application scenarios, resulting in high development costs and increased system complexity. Traditional supply chain systems also suffer from insufficient information transparency and data is easily forged and tampered with.
Adopting a microkernel-based architecture, the main functions in supply chain application scenarios are divided into core modules, and the special functions are divided into plug-in modules. Combining domain-driven design and microkernel architecture, it supports users to select modules to assemble the system according to business needs, and introduces blockchain technology to ensure data transparency and traceability.
It lowers the barrier to system development, improves system development efficiency and scalability, simplifies calling logic, enables flexible adaptation to business needs and data transparency, and reduces the cost of building and managing blockchain networks.
Smart Images

Figure CN119597247B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of software development, and particularly relates to a block chain supply chain system customizable method based on a microkernel. BACKGROUND
[0002] In the globalized economy, the supply chain covers a wide range of industries, such as manufacturing, food, medicine and many other industries. The supply chain management is constantly improving, and through the integration and optimization of resources in the entire supply chain, the supervision and coordination of the entire supply chain are realized. At present, various industries use digital supply chain systems to manage each link from procurement to final sales of the supply chain, so as to ensure product circulation and quality. However, the traditional supply chain system usually uses a centralized data storage mode, which has the problems of insufficient information transparency, easy forgery and tampering of data, and the like, making it difficult for each participant to cooperate in a low-trust environment.
[0003] The block chain can effectively solve the above problems and ensure the transparency, non-tamperability and traceability of the supply chain data in a decentralized manner. However, the introduction of the block chain also brings corresponding problems: on the one hand, the traditional supply chain system is complex and has many links, and the introduction of the block chain will increase the coupling between different business modules, resulting in more complex calling logic between each supply chain link, which brings higher cost for the development and maintenance of the system; on the other hand, most of the existing supply chain system design schemes based on the block chain are limited to specific fields, and cannot take into account multiple supply chain application scenarios and business characteristics. Designing and implementing a system with different business characteristic functions but similar main functions for different sub-application scenarios will significantly increase the development cost.
[0004] Based on the above background, the application designs and implements a block chain supply chain system customizable method based on a microkernel, which supports supply chain enterprises to customize and create a block chain-based supply chain system according to their business processes and needs. In view of the problem of high business complexity, the method introduces domain-driven design to divide the supply chain business into domains, build domain models, reduce the coupling between business modules, and simplify the calling logic. In view of the problem of low adaptability of multiple application scenarios, the method introduces a microkernel architecture mode, divides similar main functions in different supply chain application scenarios into core modules, and divides characteristic functions into plug-in modules, so that users can select modules to assemble and build a supply chain system according to business needs, thereby flexibly responding to changes in the needs of different supply chain scenarios. The method aims to reduce the development threshold and cost of the block chain-based supply chain system, improve the development efficiency of the system, and flexibly respond to the business needs of different supply chain scenarios. SUMMARY
[0005] The purpose of this invention is to address the shortcomings of existing methods by providing a customizable approach to a microkernel-based blockchain supply chain system. By introducing blockchain technology, this invention aims to ensure the transparency and traceability of supply chain data. Simultaneously, based on domain-driven design, it achieves customizable domain business and functional division within the blockchain-based supply chain system, clearly describing the complex business processes of the blockchain-based supply chain, thereby constructing a reusable and comprehensive supply chain product traceability system architecture. This method not only reduces system complexity but also improves system scalability, maintainability, and development efficiency. Furthermore, this invention combines a microkernel and plugins, enabling independent operation and updates of various domain models through microservices, providing flexible support for changes in supply chain business. By implementing common domains and feature domains, it meets different changing requirements through plugins and embedded parameters.
[0006] To achieve the above objectives, the technical solution of the present invention is: a customizable method for a microkernel-based blockchain supply chain system, the method comprising the following steps:
[0007] S1: Investigate the business requirements for customizable construction methods of blockchain supply chain systems, introduce domain-driven design, and divide the domain business domain functions of blockchain-based supply chain systems.
[0008] S2: Conduct overall system architecture design and blockchain network architecture design;
[0009] S3: Introducing a microkernel architecture pattern, the main functions in the supply chain application scenario are divided into core modules, and the feature functions are divided into plug-in modules, so as to realize the independent operation and updating of each sub-domain model;
[0010] S4: Develop and code the system to complete the mapping between the domain model and the code, and finally realize a customizable method for a microkernel-based blockchain supply chain system.
[0011] This solution addresses the issue of low adaptability to diverse application scenarios by introducing a microkernel architecture pattern. Similar main functions in different supply chain application scenarios are divided into core modules, while special functions are divided into plug-in modules. This allows users to select modules to assemble and build a supply chain system according to their business needs, flexibly responding to the business requirements of different supply chain scenarios, reducing the development threshold and cost of blockchain-based supply chain systems, and improving system development efficiency.
[0012] Preferably, step S1 includes the following steps:
[0013] S1-1: Functional requirement analysis is conducted on the customizable construction method of the blockchain supply chain system. The main stakeholders are two types of users, namely supply chain enterprises and administrators. The system needs to support supply chain enterprises to quickly customize the construction of the blockchain supply chain system according to their business needs, allowing users to focus more on the business logic of the supply chain and less on the underlying technical details;
[0014] Based on the above analysis, the functions of the customizable construction method of the blockchain supply chain system are further divided into supply chain system construction function, blockchain management function, and enterprise information management function;
[0015] The supply chain system construction function supports users to construct and customize the blockchain supply chain system on demand. This function includes three core sub-functions: creating a system, customizing a system, and accessing a system. The creating a system function is mainly used to determine the overall framework of the system, including configuring basic system information, selecting business modules on demand, and selecting a blockchain as the underlying infrastructure of the system. The customizing a system function is used to customize each business module in the system in detail, including customizing fields, configuring channels, and configuring chaincode. The accessing a system function is used to access and operate the created and customized blockchain supply chain system;
[0016] The blockchain management function encapsulates the complex tasks of building and managing a blockchain network into a service provided to users. Users do not need to understand a large amount of Fabric blockchain technology knowledge to quickly build and manage a Fabric blockchain network visually on this platform. This blockchain network can provide infrastructure support for the supply chain system built by users. The blockchain management function includes three core functions: creating a blockchain, viewing a blockchain, and managing blockchain members;
[0017] The enterprise information management function includes three core sub-functions: registering enterprise information, perfecting enterprise qualifications, and auditing information and qualifications. After registration and first login, users need to register the basic information of the enterprise and perfect the qualifications of the enterprise. Platform administrators can audit the basic information and qualifications of the enterprise;
[0018] S1-2: Introduce domain-driven design to analyze different scenarios of supply chain business and divide business modules for users to select and flexibly customize according to business needs;
[0019] Through literature research and field research, typical scenario supply chain business demand characteristics are obtained and summarized, and the needs of different types of users for the system are analyzed. The system contains roles such as suppliers, manufacturers, processors, distributors, retailers, consumers, and regulatory organizations, and user stories are obtained;
[0020] All roles have the common need to store information on-chain to improve information transparency and reduce the trust cost between different enterprises or organizations; suppliers, manufacturers, and processors can manage basic information, including product information, warehouse information, and logistics company information; suppliers and manufacturers manage the procurement link, including managing purchase orders and order delivery, product warehousing; manufacturers can manage the production process, including developing production work orders and managing workshop information, production materials, and product warehousing; processors can manage the processing process, including factory information, processing work orders, and product warehousing; distributors can manage the sales link, including customer and sales order management, and can also handle order delivery and product warehousing; regulatory organizations have product quality inspection management functions; consumers and regulatory organizations can directly obtain product traceability information throughout the entire process without logging in;
[0021] S1-3: Based on the separation of concerns, the user stories obtained in step S1-2 are decomposed, with the goal of assigning different concerns or responsibilities in the supply chain business to different domains, so that each domain focuses on its own business responsibilities, and the decomposition stops when the decomposed sub-user stories only focus on a small domain problem or become an operation;
[0022] The user story decomposition of the supply chain business contains ten top-level user stories, namely user management, information management, procurement management, warehouse management, sales management, logistics management, production management, processing management, quality inspection management, and product traceability;
[0023] User management allows users to register, log in, and control permissions; information management can add product types, fill in product, warehouse, company, and supplier details; procurement includes filling out purchase orders; in warehouse management, users can query inventory information, fill in warehouse and warehouse documents, download warehouse documents, and view inventory; sales management involves filling in customer information and sales orders; logistics management includes finding logistics companies, filling in delivery information, and delivery times; production management focuses on filling in production work orders and factory information; processing management requires filling in processing work orders; quality inspection management covers uploading quality inspection reports, reviewing reports, and creating traceability codes; finally, the product traceability function allows users to download and query product traceability information, ensuring supply chain transparency and traceability;
[0024] S1-4: After user story decomposition, each user story is divided according to its focus, and user stories with similar focus are divided into the same sub-domain,
[0025] In the user story decomposition of supply chain operations, the three user-related sub-user stories—user registration, user login, and user access control—all focus on user management and are aggregated into the user domain. The two sub-user stories—adding product types and filling in product information—both focus on product information management operations and are classified into the product domain. The sub-user stories—filling in supplier information and filling in purchase orders—focus on procurement operations and are classified into a separate procurement domain. The sub-user stories—filling in warehouse information, searching for warehouse information, filling in inbound slips, filling in outbound slips, downloading outbound slips, and querying inventory—are all operations related to warehousing operations and are classified into the warehousing domain. The sub-user stories—filling in customer information and sales orders—are both sales-related areas and are aggregated into the sales domain. The two sub-user stories, namely "Company Information," "Find Logistics Company Information," and "Enter Shipment Information," both focus on logistics information management and are categorized under the Logistics domain. "Enter Workshop Information" and "Enter Production Work Orders" are production-related operations and are categorized under the Production domain. "Enter Factory Information" and "Enter Processing Work Orders" focus on processing-related business and are categorized under the Processing domain. "Uploading and Reviewing Quality Inspection Reports" are quality inspection-related business operations and are categorized under the Quality Inspection domain. Finally, operations related to traceability, such as "Creating Traceability Codes," "Downloading Traceability Codes," and "Querying Traceability Information," are aggregated under the Traceability domain. Ultimately, ten sub-domains are defined: User Domain, Procurement Domain, Warehousing Domain, Logistics Domain, Sales Domain, Production Domain, Processing Domain, Product Domain, Quality Inspection Domain, and Traceability Domain.
[0026] Preferably, step S2 includes the following steps:
[0027] S2-1: Based on the domain partitioning results of S1, the system is partitioned into bounded contexts, resulting in user context, product context, procurement context, warehousing context, sales context, logistics context, production context, processing context, quality inspection context, and logistics context.
[0028] S2-2: Combine the system's business logic and use the conformist, customer / supplier, and anti-corrosion layer bounded context mapping pattern to determine the system's bounded context mapping relationship, that is, the dependency relationship and logic between various bounded contexts in the system;
[0029] Among them, the procurement and sales contexts directly rely on and receive product information provided by the product context, forming a follower mapping relationship with the product context. The warehousing context needs to rely on data provided by the sales, procurement, and processing contexts, and also provides data to the quality inspection context. A customer / supplier mapping relationship is formed among these contexts. Both the warehousing context and the traceability context rely on data from multiple contexts, including procurement, sales, and production. Both of these contexts have been given an anti-corrosion layer.
[0030] S2-3: Combining the results of domain partitioning and bounded context partitioning, use microkernel architecture and domain-driven design methods to design the overall system architecture;
[0031] The overall architecture is mainly divided into a presentation layer, a gateway layer, a business service layer, a blockchain layer, and a data storage layer,
[0032] The presentation layer mainly includes the front-end UI interface of the customizable construction platform and the front-end UI interface of the blockchain supply chain system, which can provide a friendly interaction interface to various users and call the corresponding back-end interface according to user operations. The front-end implementation uses the Vue framework and the Element UI component library, which has user-friendly, flexible, and component-based features. Nginx server is used to manage front-end static resources and proxy back-end services.
[0033] The gateway layer mainly includes a unified entrance connecting the front-end to the back-end modules and services, and does not involve specific business logic. It can perform user authentication and route the front-end sent requests to the corresponding interface.
[0034] The business service layer mainly includes the core business services of the platform, which is composed of customization construction services and supply chain business. Through domain-driven design and microkernel architecture mode, the supply chain business of typical scenarios is analyzed, summarized and designed. The supply chain business is divided into six core modules: user management, product management, procurement management, logistics management, sales management, and warehouse management, as well as four plug-in modules: production management, processing management, quality inspection management, and traceability management. Customization construction services are used to support the construction and customization of the blockchain supply chain system. Based on the functional requirements of the platform, four functional modules are divided: supply chain system construction module, supply chain system customization module, blockchain management module, and enterprise information management module. Among them, the supply chain system construction module allows users to select the core modules and plug-in modules of the supply chain business to customize and assemble the supply chain system. The supply chain system customization module supports users to customize each business module in detail, including customizing fields, configuring channels, and configuring chaincode. The blockchain management module is used to provide blockchain infrastructure support for the system constructed by the user, allowing users to visually and quickly construct and manage the Fabric blockchain network.
[0035] The blockchain layer mainly includes Fabric blockchain as the underlying support. The Fabric blockchain network is deployed and run by Docker container services. Fabric blockchain network uses CouchDB as a state database. The functional interfaces of the business service layer manage the nodes, channels, and chaincodes of the Fabric blockchain network. Through the Fabric client, the supply chain business module can interact with the chaincode of the blockchain network.
[0036] The data storage layer mainly includes a MySQL database, Redis, OSS object storage, and a RabbitMQ message queue, which provide support for the storage and management of data for the business service layer. The MySQL database is used for persistent storage of structured data, Redis is used for caching data to improve platform response speed, OSS object storage is used to store various files uploaded by users, and the RabbitMQ message queue is used to support asynchronous communication in the platform, which can reduce the coupling degree of the platform and improve the performance of the platform,
[0037] S2-4: Based on the results of domain division and bounded context division, use alliance chain multi-channel technology and domain-driven design methods to design the blockchain storage network architecture,
[0038] Fabric blockchain is a kind of alliance chain, which is managed by multiple participants. Each participant in the chain can be referred to as an organization member. In the system, users can create a blockchain, and the platform will automatically build a corresponding Fabric blockchain network based on the information filled by the user. This blockchain network can be used by the supply chain system built by the user. In addition, users can invite other enterprise users of the platform to join the blockchain network as members on the chain, so as to jointly manage the Fabric blockchain network with other enterprises.
[0039] In addition to ordinary organization members, the Fabric blockchain network also includes a default ordering organization, which is a special organization that provides ordering services and is responsible for ordering transactions and maintaining a globally consistent transaction order. It does not correspond to enterprise users in the platform. Each organization has a CA (Certificate Authority, CA) node and a Cli node. The CA node is responsible for issuing and managing certificates for the organization, and the Cli node is mainly used for interaction and management with the blockchain network. The ordering organization also includes Raft consensus and ordering nodes, which are mainly responsible for managing transactions in the Fabric blockchain network, ordering received transactions, generating a new ordered transaction block, signing the generated block with its certificate, and finally distributing the transaction block to the corresponding channel. Other ordinary organizations include their own Peer nodes, which are responsible for handling transaction requests and saving and maintaining the blockchain ledger. Peer nodes can also be divided into master nodes, accounting nodes, anchor nodes, and endorsement nodes according to their functions.
[0040] Based on the business-based domain division idea, each supply chain business module selected and customized by the user corresponds to a channel, and the channel contains one or more chain codes to support the functions of the business module; the user needs to configure the channel and chain code of the module after selecting the business module according to the demand, and the business logic of the module is implemented in the chain code; the platform will automatically create a corresponding channel for each business module according to the information, and deploy the chain code into the channel.
[0041] Preferably, the S3 comprises the following steps:
[0042] Based on the domain division and bounding context results obtained in steps S1 and S2, each sub-domain is modeled, and the entities, value objects and domain services that should be included in each sub-domain are identified, thereby establishing a domain model, wherein the specific field attributes of the entities and value objects to be included can be customized by the user through the supply chain system customization module of the platform as needed.
[0043] The microkernel architecture is composed of two parts, the core system and the plug-in, the core system needs to provide the most basic function set required by the system, and the plug-in is used to extend the specific business functions of the core system. Among the ten supply chain business-related sub-domains divided, the six sub-domains of user domain, product domain, procurement domain, warehousing domain, logistics domain and sales domain are almost necessary in all supply chain scenarios, and they together constitute the skeleton of the supply chain system, so these six sub-domains are divided into the core system. The four sub-domains of production domain, processing domain, quality inspection domain and traceability domain are very important for the supply chain system of some industries, but they are selected by enterprises according to their business needs, and not all supply chain systems need the functions of these domains, so these four sub-domains are divided into the plug-in system.
[0044] Preferably, the S4 comprises the following steps:
[0045] Based on the architecture design of the system and the model of each sub-domain, the system is coded and developed, including six core modules of user management, product management, procurement management, logistics management, sales management and warehousing management, as well as four plug-in modules of production management, processing management, quality inspection management and traceability management, completing the mapping between the domain model and the code. The system code also includes the main function modules of the platform, including four modules of supply chain system construction, supply chain system customization, blockchain management and enterprise information management;
[0046] The supply chain system construction module supports users to select the supply chain business core module and plug-in module identified in the text on demand to quickly assemble and construct the system, and allows the users to access and operate the system; the supply chain system customization module allows the users to make detailed customization on each business module selected by the users, including customization of field attributes, configuration of corresponding Fabric network channels and chain code containing business logic; the blockchain management module allows the users to visualize the quick construction and management of the Fabric blockchain network which will serve as the infrastructure to support the system constructed by the users; and the enterprise information management module is mainly responsible for managing and authenticating the enterprise information and qualifications of the users.
[0047] An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the microkernel-based blockchain supply chain system customizable method when executing the program.
[0048] A computer readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed by a processor to implement the microkernel-based blockchain supply chain system customizable method.
[0049] The beneficial effects of the present application are:
[0050] Compared with the traditional supply chain system, the microkernel-based blockchain supply chain system customizable method designed and implemented by the present application can support users to quickly and customizably construct a blockchain supply chain system. On the one hand, the platform applies the domain-driven design method and the microkernel architecture mode to the supply chain business in the design aspect, reduces the business complexity of the supply chain system, and can meet the characteristic needs of different supply chain scenarios; on the other hand, the platform realizes the customization construction service of the blockchain supply chain system, allows users to select and customize business modules on demand to assemble and construct a blockchain supply chain system, and can visualize one-key construction and management of the Fabric blockchain network. The platform can improve the development efficiency of the blockchain supply chain system, reduce the cost and difficulty of the construction and management of the blockchain network, and enable users to focus more on the business level of the supply chain. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 Fig. 1 is a flowchart of a microkernel-based blockchain supply chain system customizable method,
[0052] Figure 2 Fig. 2 is a use case diagram of the customizable method,
[0053] Figure 3 Fig. 3 is a system function use case diagram of the customization,
[0054] Figure 4 Fig. 4 is a domain division diagram of the system,
[0055] Figure 5 A diagram for mapping and partitioning the bounded context of the system,
[0056] Figure 6 A diagram for the overall architecture of the system,
[0057] Figure 7 A diagram for the blockchain network architecture of the system,
[0058] Figure 8 A diagram for the microkernel architecture based on domain driving. DETAILED DESCRIPTION
[0059] The application will be described in further detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the application, and not to limit the application. In addition, it should be noted that, for the sake of description, only the parts related to the application are shown in the drawings, not all the structures.
[0060] Embodiment: please refer to Figures 1 to 8 The application provides a microkernel-based blockchain supply chain system customization method, which includes the following steps:
[0061] The embodiment will select the effect of the application in the actual application scene, based on the process as Figure 1 The example provides a blockchain system customization construction method for supply chain for supply chain enterprises, which supports enterprises to quickly and customize the construction of the blockchain supply chain system according to their own business needs.
[0062] Step 1: Research the business requirements of the blockchain supply chain system customization construction method, introduce the domain driving design, and divide the domain function of the supply chain system based on the blockchain.
[0063] The main stakeholders of the method are two types of users, supply chain enterprises and platform administrators, and the method supports supply chain enterprises to quickly and customize the construction of the blockchain supply chain system according to their own business needs, allowing users to focus more on the supply chain business logic, and not too much on the underlying technical details. The main functions of the system are supply chain system construction function, blockchain management function and enterprise information management function, and the use case diagram of the system function is as Figure 2
[0064] The supply chain system construction function supports users to construct and customize the blockchain supply chain system on demand, and this function includes three core sub-functions of creating a system, customizing a system and accessing a system. Among them, the use case diagram of customizing a system is as Figure 3 As shown, the customization system function includes three sub-functions: customizing fields, configuring channels, and configuring chaincode. Through these three sub-functions, users can customize specific field attributes for each business module, visually create Fabric blockchain network channels, and deploy chaincode containing module business logic. Among them, the configuration channel sub-function is based on the multi-channel technology of Fabric blockchain and can support users to create corresponding channels for business modules on the system-dependent blockchain network. This function can isolate the data of each business module, ensure data privacy, and alleviate the data storage pressure on the chain.
[0065] The blockchain management function encapsulates the complex blockchain network building and management tasks into services for users. Users do not need to understand a large amount of Fabric blockchain technology knowledge to quickly build and manage Fabric blockchain networks visually on the platform. The use case description for creating a blockchain is shown in Table 1. In the create blockchain function, users need to configure the basic information of the blockchain, including the name and description of the blockchain. Then, users need to configure the member information to join the blockchain. Users who join the same blockchain network will jointly manage and maintain the entire blockchain network. After users submit the configuration information, the system stores the configuration information in the database, and the system needs to automatically build the corresponding Fabric blockchain network according to the user-configured basic information and member information of the blockchain.
[0066] Table Create blockchain use case description
[0067]
[0068] The enterprise information management function includes three core sub-functions: registering enterprise information, perfecting enterprise qualifications, and auditing information and qualifications. The use case descriptions for registering enterprise information and perfecting enterprise qualifications are shown in Tables 2 and 3, respectively. After registering and logging in to the platform for the first time, supply chain enterprises need to register enterprise basic information and perfect enterprise qualifications, which include uploading relevant qualification certificates such as business licenses, production permits, and health permits. After users submit the information and qualifications, the platform administrator will verify the information and qualifications. If the enterprise information and qualifications are accurate, the audit will be passed, and the user can use other functions of the platform. When the data filled in by the user or the files uploaded do not meet the filling rules of the platform, the platform will intercept and prompt the user with the correct rules.
[0069] Table 2: Registration of enterprise basic information use case description
[0070]
[0071] Table 3: Perfecting enterprise qualifications use case description
[0072]
[0073] After identifying the functional requirements of the system, the system further analyzes different scenarios of supply chain business and divides business modules for users to select and flexibly customize according to business requirements.
[0074] The user stories obtained by literature research and field research in this example are sorted out, and the user stories of different supply chain scenarios are integrated to obtain top-level user stories that can cover various typical supply chain scenarios, as shown in Table 4. Multiple supply chain enterprises are involved in the supply chain, and the supply chain enterprises play different roles in the supply chain, including suppliers, manufacturers, processors, distributors, retailers, consumers and regulatory organizations. Among them, the common demand of all roles is to store information on the chain to improve information transparency and reduce the trust cost between different enterprises or organizations; suppliers, manufacturers and processors hope to be able to manage basic information, including product information, warehouse information and logistics company information management; suppliers and manufacturers hope to manage the procurement link, including managing purchase orders and order delivery, product warehousing; manufacturers hope to be able to manage the production process, including developing production work orders and managing workshop information, production materials and product warehousing; processors hope to be able to manage the processing process, including factory information, processing work order and product warehousing management; distributors hope to be able to manage the sales link, including customer and sales order management, and also hope to be able to handle order delivery and product warehousing; regulatory organizations hope to have product quality inspection management functions; consumers and regulatory organizations both hope to be able to directly obtain product whole-process traceability information without logging in.
[0075] Table 4 Supply chain business top-level user stories
[0076]
[0077] After analyzing the supply chain business, the next step is to use the strategic design of domain-driven design to decompose the supply chain business. In the user story decomposition of the supply chain business, the three user-related sub-user stories of user registration, user login, and user permission control all focus on user management business, so they are aggregated into the user sub-domain. Adding product type and filling in product information are two sub-user stories that focus on the management of product information, so they are divided into the product sub-domain. Filling in supplier information and filling in purchase order sub-user stories are both focused on procurement business, so they are divided into the procurement sub-domain. Filling in warehouse information, finding warehouse information, filling in warehouse-in order, filling in warehouse-out order, downloading warehouse-out order, and querying inventory are all operations related to warehouse business, so they are divided into the warehouse sub-domain. Filling in customer information and sales order are both related to the sales domain, so they are aggregated into the sales sub-domain. Filling in logistics company information, finding logistics company information, and filling in shipping information are all operations related to logistics information management, so they are divided into the logistics sub-domain. Filling in workshop information and filling in production work order are both operations related to production, so they are divided into the production sub-domain. Filling in factory information and filling in processing work order are both focused on processing-related business, so they are divided into the processing sub-domain. Uploading and auditing quality inspection reports are both operations related to quality inspection, so they are divided into the quality inspection sub-domain. Finally, operations related to traceability, such as creating traceability code, downloading traceability code, and querying traceability information, are aggregated into the traceability sub-domain. The domain division result is shown in Figure 4 .
[0078] Step 2: Overall architecture design and blockchain network architecture design of the system.
[0079] Based on the domain division result of step 1, the system is divided into user context, product context, procurement context, warehouse context, sales context, logistics context, production context, processing context, quality inspection context, and logistics context. Combined with the business logic of the system, the conformist, customer / supplier, and anticorrosion context mapping patterns are used to determine the mapping relationship of the system's bounded context. Among them, the procurement and sales contexts directly depend on and receive product information provided by the product context, forming a conformist mapping relationship with the product context. The warehouse context needs to depend on the data provided by the sales, procurement, and processing contexts, and provide data to the quality inspection context, forming a customer / supplier mapping relationship among these contexts. The warehouse context and the traceability context both depend on the data of multiple contexts such as procurement, sales, and production, and both have an anticorrosion layer. The system's bounded context division and mapping diagram is shown in Figure 5 .
[0080] The overall architecture of the customizable system is shown in Figure 6As shown, the present example employs a front-end and back-end separation idea to design and develop the platform, with the goal of achieving a high-cohesion, low-coupling architecture. The architecture is mainly divided into a presentation layer, a gateway layer, a business service layer, a blockchain layer, and a data storage layer.
[0081] The presentation layer mainly includes the front-end UI interface of the customizable construction platform and the front-end UI interface of the blockchain supply chain system, which can provide a friendly interactive interface to various users and call the corresponding back-end interface according to user operations. The front-end implementation uses the Vue framework and the Element UI component library, which has user-friendly, flexible, and component-based features. Nginx server is used to manage front-end static resources and proxy back-end services.
[0082] The gateway layer mainly includes a unified entrance for connecting the front-end to the back-end modules and services, and does not involve specific business logic. It can perform user authentication and route the front-end sent requests to the corresponding interface.
[0083] The business service layer mainly includes the core business services of the platform, which is composed of two parts: customization construction service and supply chain business. Through domain-driven design and microkernel architecture mode, the supply chain business of typical scenarios is analyzed, summarized and designed. The supply chain business is divided into six core modules: user management, product management, procurement management, logistics management, sales management, and warehouse management, as well as four plug-in modules: production management, processing management, quality inspection management, and traceability management. The customization construction service is used to support the construction and customization of the blockchain supply chain system. Based on the functional requirements of the platform, four functional modules are divided: supply chain system construction module, supply chain system customization module, blockchain management module, and enterprise information management module. Among them, the supply chain system construction module allows users to select the core modules and plug-in modules of the supply chain business to customize and assemble the supply chain system as needed. The supply chain system customization module supports users to customize the selected business modules in detail, including customizing fields, configuring channels, and configuring chaincode. The blockchain management module is used to provide blockchain infrastructure support for the system constructed by the user, allowing users to visually and quickly construct and manage the Fabric blockchain network.
[0084] The blockchain layer mainly includes Fabric blockchain as the underlying support. The Fabric blockchain network is deployed and run by Docker container service. CouchDB is used as the state database of the Fabric blockchain network. The functional interfaces of the business service layer perform node management, channel management, and chaincode management on the Fabric blockchain network. The Fabric client connects and accesses the Fabric blockchain network. The supply chain business module can interact with the chaincode of the blockchain network.
[0085] The data storage layer mainly includes a MySQL database, Redis, OSS object storage, and a RabbitMQ message queue, which provide support for the storage and management of data for the business service layer. The MySQL database is used for the persistent storage of structured data, Redis is used for caching data to improve the response speed of the platform, OSS object storage is used to store various files uploaded by users, and the RabbitMQ message queue is used to support asynchronous communication of the platform, thereby reducing the coupling degree of the platform and improving the performance of the platform.
[0086] In this example, the blockchain network architecture is implemented using a Fabric blockchain, and the network architecture diagram is as shown in FIG. 1. Figure 7 In the system, a user can create a blockchain, and the platform will automatically build a corresponding Fabric blockchain network according to the information filled in by the user. This blockchain network can be used by the supply chain system constructed by the user. In addition, the user can invite other enterprise users of the platform to join the blockchain network as members on the chain, thereby jointly managing the Fabric blockchain network with other enterprises.
[0087] In addition to including ordinary organization members, the Fabric blockchain network also includes a default ordering organization, which is a special organization that provides ordering services and is responsible for ordering transactions and maintaining a globally consistent transaction order. It does not correspond to enterprise users in the platform. Each organization has a CA (Certificate Authority, CA) node and a Cli node. The CA node is responsible for issuing and managing certificates for the organization, and the Cli node is mainly used for interacting with and managing the blockchain network. The ordering organization also includes Raft consensus and ordering nodes, which are mainly responsible for managing transactions in the Fabric blockchain network, ordering received transactions, generating a new ordered transaction block, signing the generated block with its certificate, and finally distributing the transaction block to the corresponding channel. Other ordinary organizations include their own Peer nodes, which are responsible for processing transaction requests and saving and maintaining the blockchain ledger. According to function, Peer nodes can be divided into master nodes, accounting nodes, anchor nodes, and endorsement nodes.
[0088] Based on the idea of dividing domains based on business, each supply chain business module selected and customized by the user corresponds to a channel, and the channel includes one or more chaincodes to support the functions of the business module. After the user selects the business module according to the requirements, the user needs to configure the channel and chaincode of the module. The business logic of the module is implemented in the chaincode, and the platform will automatically create a corresponding channel for each business module and deploy the chaincode to the channel.
[0089] Step 3: Introduce the microkernel architecture mode, divide the subject function in the supply chain application scene into core modules, and divide the characteristic function into plug-in modules to realize the independent running and updating of each sub-field model.
[0090] Based on the domain division and bounded context results obtained in steps 1 and 2, each sub-domain is modeled, and the entities, value objects and domain services that should be included in each sub-domain are identified, thereby establishing a domain model, wherein the specific field attributes of the entities and value objects that should be included can be customized by users through the supply chain system customization module of the platform as needed.
[0091] The microkernel architecture consists of two parts: the core system and the plug-in. The core system needs to provide the most basic set of functions required by the system, while the plug-in is used to extend the specific business functions of the core system. Among the ten sub-domains related to supply chain business, the six sub-domains of user domain, product domain, procurement domain, warehousing domain, logistics domain and sales domain are almost necessary in all supply chain scenarios, and they together constitute the skeleton of the supply chain system, so these six sub-domains are divided into the core system. While the production domain, processing domain, quality inspection domain and traceability domain are very important to the supply chain system of some industries, but they are selected by enterprises according to their business needs, and are not necessary for all supply chain systems, so these four sub-domains are divided into plug-in systems. The microkernel architecture diagram of the present example is shown in Figure 8
[0092] Step 4: Coding development of the system, complete the mapping between the domain model and the code, and finally realize the customizable method of the microkernel-based blockchain supply chain system.
[0093] Based on the architecture design of the system and the model of each sub-domain, the system is coded and developed, including six core modules of user management, product management, procurement management, logistics management, sales management and warehousing management, as well as four plug-in modules of production management, processing management, quality inspection management and traceability management, completing the mapping between the domain model and the code. The system code also includes the main function modules of the platform, including four modules of supply chain system construction, supply chain system customization, blockchain management and enterprise information management;
[0094] The supply chain system construction module supports users to select the supply chain business core module and plug-in module identified in the text on demand to quickly assemble and construct the system, and allows the users to access and operate the system; the supply chain system customization module allows the users to make detailed customization on each business module selected by the users, including customization of field attributes, configuration of corresponding Fabric network channels and chain code containing business logic; the blockchain management module allows the users to visualize and quickly construct and manage the Fabric blockchain network which will serve as an infrastructure to support the system constructed by the users; and the enterprise information management module is mainly responsible for managing and authenticating the enterprise information and qualifications of the users.
[0095] It should be noted that the above embodiments are not intended to limit the protection scope of the present application, and equivalent transformations or substitutions made on the basis of the above technical solutions all fall within the protection scope of the claims of the present application.
Claims
1. A customizable method for a microkernel-based blockchain supply chain system, characterized in that: The method includes the following steps: S1: Investigate the business requirements for customizable construction methods of blockchain supply chain systems, introduce domain-driven design, and divide the domain business domain functions of blockchain-based supply chain systems. S2: Conduct overall system architecture design and blockchain network architecture design; S3: Introducing a microkernel architecture pattern, the main functions in the supply chain application scenario are divided into core modules, and the feature functions are divided into plug-in modules, so as to realize the independent operation and updating of each sub-domain model; S4: Develop and code the system to complete the mapping between the domain model and the code, and finally realize a customizable method for a microkernel-based blockchain supply chain system; S2 includes the following steps: S2-1: Based on the domain partitioning results of S1, the system is partitioned into bounded contexts, resulting in user context, product context, procurement context, warehousing context, sales context, logistics context, production context, processing context, quality inspection context, and logistics context. S2-2: Combine the system's business logic and use the conformist, customer / supplier, and anti-corrosion layer bounded context mapping pattern to determine the system's bounded context mapping relationship, that is, the dependency relationship and logic between various bounded contexts in the system; Among them, the procurement and sales contexts directly rely on and receive product information provided by the product context, forming a follower mapping relationship with the product context. The warehousing context needs to rely on data provided by the sales, procurement, and processing contexts, and also provides data to the quality inspection context. A customer / supplier mapping relationship is formed among these contexts. Both the warehousing context and the traceability context rely on data from multiple contexts, including procurement, sales, and production. Both of these contexts have been given an anti-corrosion layer. S2-3: Combining the results of domain partitioning and bounded context partitioning, use microkernel architecture and domain-driven design methods to design the overall system architecture; The overall architecture is mainly divided into a presentation layer, a gateway layer, a business service layer, a blockchain layer, and a data storage layer. The presentation layer mainly includes the front-end UI of the customizable platform and the front-end UI of the blockchain supply chain system. The gateway layer provides a unified entry point for connecting the frontend to various modules and services in the backend. It does not involve specific business logic, but it can perform user authentication and route requests sent by the frontend to the corresponding interfaces. The business service layer comprises the platform's core business services, consisting of two parts: customized construction services and supply chain business. Through domain-driven design and a microkernel architecture, it analyzes, summarizes, and designs supply chain business for typical scenarios, dividing it into six core modules: user management, product management, procurement management, logistics management, sales management, and warehousing management, as well as four plug-in modules: production management, processing management, quality inspection management, and traceability management. The customized construction service supports the construction and customization of the blockchain supply chain system. Based on the platform's functional requirements, it is divided into four functional modules: supply chain system construction module, supply chain system customization module, blockchain management module, and enterprise information management module. The supply chain system construction module allows users to select core and plug-in modules of the supply chain business to customize and assemble the supply chain system as needed. The supply chain system customization module allows users to customize each selected business module in detail, including custom fields, configuring channels, and configuring chaincode. The blockchain management module provides blockchain infrastructure support for the user-built system, allowing users to visually and quickly build and manage the Fabric blockchain network. The blockchain layer primarily consists of the Fabric blockchain as its underlying support. The Fabric blockchain network is deployed and run using Docker container services. The Fabric blockchain network uses CouchDB as its state database. The business service layer's functional interfaces manage nodes, channels, and chaincode within the Fabric blockchain network. It connects to and accesses the Fabric blockchain network through Fabric clients, and the supply chain business modules interact with the blockchain network's chaincode. The data storage layer primarily includes a MySQL database, Redis, OSS object storage, and RabbitMQ message queues, providing support for the storage and management of data in the business service layer. Specifically, the MySQL database is used for persistent storage of structured data, Redis is used for data caching to improve platform response speed, OSS object storage is used to store various files uploaded by users, and the RabbitMQ message queues support asynchronous communication, reducing platform coupling and improving platform performance. S2-4: Combining the results of domain partitioning and bounded context partitioning, design the blockchain storage network architecture using consortium blockchain multi-channel technology and domain-driven design method; S3 includes the following steps: Based on the domain partitioning and bounded partitioning context results obtained in steps S1 and S2, each subdomain is modeled, and the entities, value objects, and domain services that should be included in each subdomain are identified, thereby establishing a domain model. The specific field attributes that entities and value objects should include are customized by the user as needed through the platform's supply chain system customization module. The microkernel architecture consists of two parts: the core system and the plugins. The core system needs to provide the most basic set of functions required by the system, while the plugins are used to extend specific business functions to the core system. S4 includes the following steps: Based on the system architecture design and the models of each subdomain, the system is coded and developed, including six core modules: user management, product management, procurement management, logistics management, sales management, and warehouse management, as well as four plug-in modules: production management, processing management, quality inspection management, and traceability management. The mapping between the domain model and the code is completed. The system coding also includes the main functional modules of the platform, including four modules: supply chain system construction, supply chain system customization, blockchain management, and enterprise information management. The supply chain system building module allows users to quickly assemble and build a system by selecting the core supply chain business modules and plug-in modules identified in this article, and allows users to access and operate the system. The supply chain system customization module allows users to customize each selected business module in detail, including customizing field attributes, configuring corresponding Fabric network channels, and chaincode containing business logic. The blockchain management module allows users to visually and quickly build and manage the Fabric blockchain network, which will serve as the infrastructure to support the system built by the user. The enterprise information management module is mainly responsible for managing and authenticating the user's enterprise information and qualifications.
2. The customizable method for a microkernel-based blockchain supply chain system according to claim 1, characterized in that, S1 includes the following steps: S1-1: Conduct functional requirements analysis on the customizable construction method of blockchain supply chain system. The main stakeholders are two types of users: supply chain enterprises and administrators. It is necessary to support supply chain enterprises to quickly customize and build blockchain supply chain system according to their own business needs. Based on the above analysis, the functions of customizable construction methods for blockchain supply chain systems can be categorized into supply chain system construction functions, blockchain management functions, and enterprise information management functions. The supply chain system building function supports users in building and customizing blockchain supply chain systems on demand. This function includes three core sub-functions: system creation, system customization, and system access. The system creation function is used to determine the overall framework of the system, including three operations: configuring basic system information, selecting business modules as needed, and selecting blockchain as the underlying infrastructure of the system. The system customization function is used to customize each business module in detail, including three sub-functions: customizing fields, configuring channels, and configuring chaincode. The system access function is used to access and operate the created and customized blockchain supply chain system. Blockchain management encapsulates the cumbersome tasks of building and managing blockchain networks into a service provided to users. Users do not need to understand a lot of Fabric blockchain technology to quickly and visually build and manage Fabric blockchain networks on this platform. This blockchain network can provide infrastructure support for the supply chain system built by users. The blockchain management function includes three core functions: creating blockchains, viewing blockchains, and managing blockchain members. The enterprise information management function includes three core sub-functions: registering enterprise information, improving enterprise qualifications, and reviewing information and qualifications. After registering and logging in for the first time, users need to register the basic information of the enterprise and improve the enterprise qualifications. The platform administrator reviews the basic information and qualifications of the enterprise. S1-2: Introduce domain-driven design to analyze supply chain business in different scenarios and divide it into business modules for users to select and flexibly customize according to their business needs; We obtained and summarized the supply chain business demand characteristics of typical scenarios through literature review and field research, analyzed the needs of different types of users for the system, including the roles of suppliers, manufacturers, processors, distributors, retailers, consumers and regulatory organizations, and obtained user stories. The common requirement for all roles is the ability to store information on the blockchain to improve transparency and reduce trust costs between different enterprises or organizations. Suppliers, manufacturers, and processors can manage basic information, including product information, warehouse information, and logistics company information. Suppliers and manufacturers manage the procurement process, including managing purchase orders, order delivery, and product warehousing. Manufacturers can manage the production process, including creating production work orders and managing workshop information, production materials, and product warehousing. Processors can manage the processing process, including managing factory information, processing work orders, and product warehousing. Distributors can manage the sales process, including managing customers and sales orders, and handling order delivery and product warehousing. Regulatory organizations have product quality inspection and management functions. Consumers and regulatory organizations can directly access the entire product traceability information without logging in. S1-3: Based on the separation of concerns, the user stories obtained in step S1-2 are decomposed. The goal is to assign different concerns or responsibilities in the supply chain business to different areas, so that each area can focus on its own business responsibilities. The decomposition will stop when the decomposed sub-user stories only focus on a very small area problem or become an operation. The user stories of the supply chain business are broken down into ten top-level user stories, namely user management, information management, procurement management, warehousing management, sales management, logistics management, production management, processing management, quality inspection management and product traceability. User management features allow users to register, log in, and control permissions; information management includes adding product types and filling in detailed information about products, warehouses, companies, and suppliers; the procurement process includes filling in purchase orders; in warehouse management, users can query inventory information, fill in inbound and outbound documents, download outbound documents, and view inventory status; sales management involves filling in customer information and sales orders; logistics management includes finding logistics companies, filling in shipping information, and shipping time; production management focuses on filling in production work orders and factory information; processing management requires filling in processing work orders; quality inspection management covers the steps of uploading quality inspection reports, audit reports, and creating traceability codes; finally, the product traceability function allows users to download and query product traceability information, ensuring the transparency and traceability of the supply chain. S1-4: After decomposing user stories, they are divided according to the focus of each user story. User stories with similar focuses will be assigned to the same subdomain. In the user story decomposition of supply chain operations, the three user-related sub-user stories—user registration, user login, and user access control—all focus on user management and are aggregated into the user domain. The two sub-user stories—adding product types and filling in product information—both focus on product information management operations and are classified into the product domain. The sub-user stories—filling in supplier information and filling in purchase orders—focus on procurement operations and are classified into a separate procurement domain. The sub-user stories—filling in warehouse information, searching for warehouse information, filling in inbound slips, filling in outbound slips, downloading outbound slips, and querying inventory—are all operations related to warehousing operations and are classified into the warehousing domain. The sub-user stories—filling in customer information and sales orders—are both sales-related areas and are aggregated into the sales domain. The two sub-user stories, namely "Company Information," "Find Logistics Company Information," and "Enter Shipment Information," both focus on logistics information management and are categorized under the Logistics domain. "Enter Workshop Information" and "Enter Production Work Orders" are production-related operations and are categorized under the Production domain. "Enter Factory Information" and "Enter Processing Work Orders" focus on processing-related business and are categorized under the Processing domain. "Uploading and Reviewing Quality Inspection Reports" are quality inspection-related business operations and are categorized under the Quality Inspection domain. Finally, operations related to traceability, such as "Creating Traceability Codes," "Downloading Traceability Codes," and "Querying Traceability Information," are aggregated under the Traceability domain. Ultimately, ten sub-domains are defined: User Domain, Procurement Domain, Warehousing Domain, Logistics Domain, Sales Domain, Production Domain, Processing Domain, Product Domain, Quality Inspection Domain, and Traceability Domain.
3. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the customizable method for a microkernel-based blockchain supply chain system as described in any one of claims 1 to 2 above.
4. A computer-readable storage medium storing computer instructions thereon, characterized in that: When the computer instructions are executed by the processor, they implement the customizable method for a microkernel-based blockchain supply chain system as described in any one of claims 1-2.
Citation Information
Patent Citations
Multimodal transport system and method based on block chain
CN114445010A
Domain-driven design method of steel traceability system based on block chain technology
CN117272402A