Blockchain storage method, blockchain traceability method, device, equipment and medium
By pre-setting a fine-grained business data storage model and recording the information of the preceding nodes, the problem of insufficient data evidence storage for all elements and processes in complex multi-party collaborative scenarios in existing technologies has been solved, and reliable evidence storage of data-to-data relationships and data-to-business activity relationships has been achieved.
Patent Information
- Application Number
- CN202311664704.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2026-12-04
- Estimated Expiration
- 2043-12-06
AI Technical Summary
Existing blockchain-based evidence storage methods cannot meet the evidence storage needs of complex multi-party collaborative scenarios involving all elements and the entire process of business scenarios, especially in terms of reliable evidence storage of data-to-data relationships and data-to-business activity relationships.
A novel fine-grained pre-set business data storage model is adopted to record the business activity domains of the target business in a chain-linked manner. The relationship between business data is recorded through the information of the preceding nodes, and the node data information of the business activity nodes is packaged and stored on the blockchain for evidence.
It enables trusted data storage for all elements and processes in complex multi-party collaborative scenarios, including trusted data storage for data-to-data relationships and data-to-business activity relationships, thus meeting the data storage needs of complex multi-party collaborative scenarios.
Smart Images

Figure CN117874778B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of blockchain technology, and more specifically, to a blockchain evidence storage method and apparatus, a blockchain traceability method and apparatus, a blockchain evidence storage and traceability system, an electronic device, and a computer-readable storage medium. Background Technology
[0002] In recent years, with the rapid development of internet technology, the information management problems people face have become increasingly complex. Blockchain technology offers a new solution to the problem of ensuring data security and strengthening the management and application of information. However, when using blockchain technology to manage information in complex multi-party collaborative scenarios, how to achieve reliable data storage and notarization is a key issue in the entire information management process.
[0003] Currently, there are two main types of blockchain-based evidence storage methods: (1) logistics-based evidence storage methods centered on goods, such as supply chain evidence storage methods in equipment manufacturing and lifecycle evidence storage methods in the circulation of goods; (2) data ownership-based evidence storage methods, such as copyright ownership confirmation and transaction evidence storage methods for digital works.
[0004] However, the first type of method is only applicable to business management scenarios focused on a single item, while the second type is only applicable to asset circulation scenarios such as property rights transactions. These two types of evidence preservation methods primarily address the issue of reliable recording of business process data. For example, food evidence preservation methods centered on the item only record the food's production location and transportation process, but cannot solve the problem of reliable evidence preservation of data relationships and data-business activity relationships. They cannot meet the evidence preservation needs of comprehensive, end-to-end business scenarios involving multi-party collaboration. Therefore, there is an urgent need to propose a blockchain-based evidence preservation method to solve this problem. Summary of the Invention
[0005] In view of the above, this disclosure provides a blockchain evidence storage method and apparatus, a blockchain traceability method and apparatus, a blockchain evidence storage and traceability system, an electronic device, and a computer-readable storage medium, which aim to solve the above problems or at least partially solve the above problems.
[0006] In a first aspect, this disclosure provides a blockchain-based evidence storage method, the method comprising:
[0007] Obtain a preset business data storage model for the target business; the model includes at least one business activity domain linked in a chain according to the business process of the target business; the business activity domain includes the following business activity nodes: a business activity start point, at least one activity node, and a business activity end point; the business activity node includes the following node data information: node attribute information, preceding node information, and node business data information; wherein, the node attribute information includes: node identifier, node type, and business activity domain identifier; the preceding node information includes a preceding node identifier; the node business data information includes at least one node data object, and the node data object is used to record at least one business data information involving multiple elements affecting the target business;
[0008] For any business activity domain to be certified in the preset business data storage model, obtain all node data information of each business activity node in the business activity domain to be certified from the business database;
[0009] All node data information is packaged to obtain corresponding business activity node data blocks to be stored, and each business activity node data block to be stored is processed on the blockchain to realize the storage of business data on the blockchain.
[0010] Secondly, this disclosure also provides a blockchain traceability method, the traceability method comprising:
[0011] Obtain the domain identifier of the business activity to be traced;
[0012] Based on the business activity domain identifier to be traced and the preset business data storage model according to any of the first aspects, obtain and output all node data information of each business activity node in the corresponding business activity domain to be traced.
[0013] For any node in the business activity domain to be traced, the credibility of the node to be traced is verified based on at least one node data object in the node data information of the node to be traced.
[0014] Based on the preceding node information of the starting point of the traceable activity in the traceable business activity domain, at least one preceding business activity domain identifier is obtained. Each preceding business activity domain identifier is used as a new traceable business activity domain identifier. The process then returns to the step of obtaining and outputting all node data information of each business activity node in the corresponding traceable business activity domain based on the traceable business activity domain identifier and the preset business data storage model, until the preceding node information of all starting points of the traceable activities is empty.
[0015] Thirdly, this disclosure also provides a blockchain evidence storage device for implementing the method described in the first aspect, the device comprising:
[0016] A data storage model acquisition module is used to acquire a preset business data storage model for a target business. The model includes at least one business activity domain linked in a chain according to the business process of the target business. The business activity domain includes the following business activity nodes: a business activity start point, at least one activity node, and a business activity end point. The business activity node includes the following node data information: node attribute information, preceding node information, and node business data information. The node attribute information includes: node identifier, node type, and business activity domain identifier. The preceding node information includes a preceding node identifier. The node business data information includes at least one node data object, which is used to record at least one business data information related to multiple elements affecting the target business.
[0017] The node data acquisition module is used to acquire all node data information of each business activity node in any business activity domain to be certified in the preset business data storage model from the business database.
[0018] The blockchain evidence storage module is used to package the data information of all nodes to obtain the corresponding business activity node data blocks to be stored, and to process each business activity node data block to be stored on the blockchain to realize the evidence storage of business data on the blockchain.
[0019] Fourthly, this disclosure also provides a blockchain traceability device for implementing the method described in the second aspect, the device comprising:
[0020] The acquisition module is used to acquire the domain identifier of the business activity to be traced.
[0021] The node data extraction module is used to obtain and output all node data information of each business activity node in the corresponding business activity domain to be traced, based on the identifier of the business activity domain to be traced and any of the preset business data storage models in claims 1-7.
[0022] The node trust verification module is used to perform trust verification on any node to be traced in the business activity domain to be traced, based on at least one node data object in the node data information of the node to be traced.
[0023] The loop module is used to obtain at least one traceable preceding business activity domain identifier based on the preceding node information of the traceable activity starting point in the traceable business activity domain, use each traceable preceding business activity domain identifier as a new traceable business activity domain identifier, and return to the step of obtaining and outputting all node data information of each business activity node in the corresponding traceable business activity domain based on the traceable business activity domain identifier and the preset business data storage model, until the preceding node information of all traceable activity starting points is empty.
[0024] Fifthly, this disclosure also provides a blockchain evidence storage and traceability system, the system comprising: a blockchain evidence storage device as described in the third aspect, a blockchain traceability device as described in the fourth aspect, a user digital identity management module, and a data storage management module;
[0025] The user digital identity management module is used to generate at least one digital signature object and send it to the blockchain evidence storage device;
[0026] The data storage management module is used to store business data information; send the business data information to the blockchain evidence storage device; and query the original business data and send it to the blockchain traceability device based on the data storage information received from the blockchain traceability device.
[0027] In a sixth aspect, embodiments of this disclosure also provide an electronic device, including: a processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the blockchain evidence storage method or blockchain traceability method described above.
[0028] In a seventh aspect, embodiments of this disclosure also provide a computer-readable storage medium that stores one or more programs, which, when executed by an electronic device including multiple applications, cause the electronic device to perform the steps of the blockchain evidence storage method or blockchain traceability method described above.
[0029] By employing the above technical solution, the blockchain evidence storage method provided in this disclosure utilizes a novel fine-grained, pre-defined business data storage model. This model records at least one business activity domain linked in a chain according to the business process of the target business, thus including business activity data for the entire process. Node data objects record business data involving multiple elements affecting the business objective; that is, the business data recorded by the model involves all elements. Simultaneously, the preceding node information includes a preceding node identifier; therefore, the association between business data carried by business activity nodes is also recorded by the model through the preceding node information. The node attribute information in each business activity node includes a business activity domain identifier; therefore, through the business activity domain identifier, it can be determined which business activity the business data belongs to; that is, the model records the association between business data and business activities. Therefore, compared with the prior art, the embodiments of this disclosure package all node data information of each business activity node in all business activity domains of the preset business data storage model, and put the resulting business activity node data blocks to be stored on the chain respectively. This not only enables reliable storage of simple business process data, but also enables reliable storage of data and data association relationships, as well as data and business activity association relationships, thus meeting the data storage needs of all elements and the entire process of business scenarios in complex multi-party collaboration scenarios.
[0030] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0031] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:
[0032] Figure 1 A flowchart illustrating the blockchain-based evidence storage method provided in this embodiment is shown.
[0033] Figure 2 This illustration shows a schematic diagram of the structure of a preset business data storage model provided in an embodiment of this disclosure;
[0034] Figure 3 This illustration shows a schematic diagram of the data structure of the business activity node provided in this embodiment.
[0035] Figure 4 This diagram illustrates the data structure of a business activity node provided in another embodiment of this disclosure;
[0036] Figure 5A flowchart illustrating the blockchain traceability method provided in this embodiment is shown.
[0037] Figure 6 A schematic diagram of the structure of the blockchain evidence storage device provided in this embodiment is shown;
[0038] Figure 7 A schematic diagram of the structure of the blockchain traceability device provided in this embodiment is shown;
[0039] Figure 8 A schematic diagram of the structure of the blockchain-based evidence storage and traceability system provided in this embodiment is shown.
[0040] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0042] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the term "comprising" and its variations should be interpreted as open-ended terms meaning "including but not limited to."
[0044] As mentioned earlier, with the rapid development of internet technology, the information management problems people face are becoming increasingly complex. Blockchain technology offers a new solution to the problem of ensuring data security and strengthening the management and application of information. However, when using blockchain technology to manage information in complex multi-party collaborative scenarios, how to ensure the reliable storage and notarization of data is a key issue in the entire information management process. An example of a complex multi-party collaborative scenario is the quality tracking scenario in engineering construction. Quality tracking management in engineering construction is a crucial foundation for quality control and management, quality risk identification and early warning, and quality responsibility definition and accountability. The management scope covers five main elements affecting construction quality: personnel, machinery, raw materials, methods, and environment, as well as the entire process including construction preparation, construction organization, and final acceptance. These quality control activities generate a large amount of structured, semi-structured, and unstructured quality data, used to record the quality status of the entire construction process and each stage. This data exists in the form of audio and video files, text files, and database tables, and has two types of relationships: data-to-data relationships and data-to-business relationships.
[0045] Currently, there are two main types of blockchain-based evidence storage methods: (1) logistics-based evidence storage methods centered on goods, such as supply chain evidence storage methods in equipment manufacturing and lifecycle evidence storage methods in the circulation of goods; (2) data ownership-based evidence storage methods, such as copyright ownership confirmation and transaction evidence storage methods for digital works.
[0046] However, the first type of method is only applicable to business management scenarios focused on a single item, while the second type is only applicable to asset circulation scenarios such as property rights transactions. These two types of evidence preservation methods mainly address the issue of reliable recording of business process data. For example, the food evidence preservation method centered on the item only records the food's production location and transportation process, but cannot solve the problem of reliable evidence preservation of data-to-data relationships and data-to-business-activity relationships. It cannot meet the evidence preservation needs of full-element, full-process business scenarios in complex multi-party collaborative scenarios.
[0047] Based on this, the present invention proposes a blockchain-based evidence storage method, utilizing a novel fine-grained, pre-defined business data storage model. This model records at least one business activity domain linked in a chain according to the target business process, thus encompassing business activity data across the entire process. Node data objects record business data involving multiple elements affecting the business objective; that is, the business data recorded by the model involves all elements. Simultaneously, the preceding node information includes a preceding node identifier, therefore, the relationships between business data carried by business activity nodes are also recorded by the model through the preceding node information. The node attribute information in each business activity node includes a business activity domain identifier; therefore, through the business activity domain identifier, it can be determined which business activity the business data belongs to, meaning the model records the relationships between business data and business activities. Therefore, compared with the prior art, the embodiments of this disclosure package all node data information of each business activity node in all business activity domains of the preset business data storage model, and put the resulting business activity node data blocks to be stored on the chain respectively. This not only enables reliable storage of simple business process data, but also enables reliable storage of data and data association relationships, as well as data and business activity association relationships, thus meeting the data storage needs of all elements and the entire process of business scenarios in complex multi-party collaboration scenarios.
[0048] To facilitate understanding of this embodiment, a detailed description of the blockchain-based evidence storage method disclosed in this disclosure is provided first. The executing entity of the blockchain-based evidence storage method provided in this disclosure is generally a computer device with a certain computing power. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a handheld device, a computing device, etc. In some possible implementations, this blockchain-based evidence storage method can be implemented by a processor calling computer-readable instructions stored in memory.
[0049] Figure 1 This illustration shows a flowchart of the blockchain evidence storage method provided in an embodiment of this disclosure. Figure 1 It can be seen that the embodiments of this disclosure include at least steps S101-S103:
[0050] Step S101: Obtain a preset business data storage model for the target business; the model includes at least one business activity domain linked in a chain according to the business process of the target business; the business activity domain includes the following business activity nodes: a business activity start point, at least one activity node, and a business activity end point; the business activity node includes the following node data information: node attribute information, preceding node information, and node business data information; wherein, the node attribute information includes: node identifier, node type, and business activity domain identifier, the preceding node information includes a preceding node identifier, and the node business data information includes at least one node data object, the node data object being used to record at least one business data information involving multiple elements affecting the target business.
[0051] Here, a business activity node is the smallest unit of the preset business data storage model, and the start and end points of a business activity are special business activity nodes. Figure 2 A schematic diagram of the structure of a preset business data storage model provided in an embodiment of this disclosure is shown. It should be noted that this disclosure is not limited to... Figure 2 The preset business data storage model shown can be any model that can implement the evidence storage method disclosed herein. Figure 2 This is merely an illustrative example. In practice, the preset business data storage model can be determined based on the actual business processes of the business activities. The following section combines... Figure 2 The embodiments of this disclosure are described by way of example.
[0052] See Figure 2As shown, the preset business data storage model includes: business activity domain 1, business activity domain 2 and business activity domain 3, which are linked in a chain according to the business process of the target business. Business activity domain 1 includes: business activity start point 11, activity node 12, and business activity end point 13; business activity domain 2 includes: business activity start point 21, activity node 22, and business activity end point 23; business activity domain 3 includes: business activity start point 31, activity node 32, activity node 33, and business activity end point 34. Specifically, in business activity domain 1, activity node 12 is linked to business activity start point 11, and business activity end point 13 is linked to both business activity start point 11 and activity node 12; in business activity domain 2, activity node 22 is linked to business activity start point 21, and business activity end point 23 is linked to both business activity start point 21 and activity node 22; in business activity domain 3, activity node 32 is linked to business activity start point 31, activity node 33 is linked to both business activity start point 31 and activity node 32, and business activity end point 34 is linked to business activity start point 31, activity node 32, and activity node 33. The preceding business activity domains of business activity domain 3 are business activity domain 1 and business activity domain 2. The business activity start point 31 of business activity domain 3 is linked to the business activity end point 13 and the business activity end point 23, respectively.
[0053] Figure 3 A schematic diagram of the data structure of the business activity node provided in this disclosure is shown. Figure 4 A schematic diagram of the data structure of a business activity node provided in another embodiment of this disclosure is shown. Figure 3 It can be seen that a business activity node includes the following node data information: node attribute information, preceding node information, and node business data information. The node attribute information includes node identifier, node type, and business activity domain identifier. The node identifier uniquely identifies the business activity node. The node type indicates the type of the business activity node, including: activity node, business activity start point, and business activity end point. The business activity domain identifier records the identifier information of the business activity domain to which the business activity node belongs. It is referenced in the business activity nodes within the business activity domain and remains unchanged throughout the lifecycle of the business activity domain, uniquely identifying the business activity domain. The preceding node information includes the preceding node identifier, which records the node identifier of at least one preceding business activity node. In implementation, it is determined by... Figure 4It can be seen that the preceding node information can also include the number of preceding nodes, used to record the number of preceding business activity nodes. Node business data information includes at least one node data object. The node data object records at least one business data information related to multiple factors affecting the target business. For example, in a construction quality tracking scenario, there are five major factors affecting construction quality: personnel, machinery, raw materials, methods, and environment. Therefore, the business data information in the node business data object would involve personnel status, equipment parameters, environmental meteorological data, etc. During implementation, [the following is done]... Figure 4 It can be seen that node business data information can also include the number of data objects, used to record the number of node data objects. The node data objects can exist in at least one of the following forms, including but not limited to: data files, database tables, data blocks, etc.
[0054] Step S102: For any business activity domain to be certified in the preset business data storage model, obtain all node data information of each business activity node in the business activity domain to be certified from the business database.
[0055] In this step, the business database is used to store all node data information for business activity nodes. The storage format can be, but is not limited to, JSON format. During implementation, for any business activity domain to be certified in the preset business data storage model, a query can be performed in the business database based on the node identifiers of all business activity nodes in that domain to obtain all node data information for each business activity node. For example, for... Figure 2 In activity domain 1, based on the node identifiers a11 (starting point 11), a12 (activity node 12), and a13 (end point 13) of the business activity, a query can be performed in the business database to obtain all node data information b11 for the starting point 11, b12 for the activity node 12, and b13 for the end point 13. Similarly, all node data information for each business activity node in activity domains 2 and 3 can be obtained.
[0056] Step S103: Package all node data information to obtain the corresponding business activity node data block to be stored, and put each business activity node data block to be stored on the blockchain to realize the storage of business data on the blockchain.
[0057] from Figure 1As can be seen from the method shown, this embodiment utilizes a novel fine-grained, pre-defined business data storage model. This model records at least one business activity domain linked in a chain according to the business process of the target business, thus including business activity data for the entire process. The node data objects record business data involving multiple elements affecting the business objective; that is, the business data recorded by the model involves all elements. Simultaneously, the preceding node information includes a preceding node identifier. Therefore, the relationship between business data carried by business activity nodes is also recorded by the model through the preceding node information. The node attribute information in each business activity node includes a business activity domain identifier. Therefore, through the business activity domain identifier, it can be determined which business activity the business data belongs to; that is, the model records the relationship between business data and business activities. Therefore, compared with the prior art, the embodiments of this disclosure package all node data information of each business activity node in all business activity domains of the preset business data storage model, and put the resulting business activity node data blocks to be stored on the chain respectively. This not only enables reliable storage of simple business process data, but also enables reliable storage of data and data association relationships, as well as data and business activity association relationships, thus meeting the data storage needs of all elements and the entire process of business scenarios in complex multi-party collaboration scenarios.
[0058] Furthermore, to better illustrate the process of the above-described blockchain-based evidence preservation method, as a refinement and extension of the above embodiments, this invention provides several optional embodiments, but is not limited thereto, as detailed below:
[0059] In one possible implementation, prior to the step of obtaining a preset business data storage model for the target business, the method further includes:
[0060] Step A1: Select a business activity to be processed from the target business; the business activity to be processed does not have a corresponding pre-created business activity domain, and according to the business process of the target business, each preceding business activity corresponding to the business activity to be processed has a corresponding pre-created business activity domain.
[0061] Step A2: Obtain the target business activity identifier of the business activity to be processed, and generate the target business activity domain identifier according to the target business activity identifier and preset rules.
[0062] Step A3: Create multiple initial business activity nodes in the target business activity domain corresponding to the business activity to be processed, and initialize the node attribute information of each initial business activity node based on the target business activity domain identifier. The multiple initial business activity nodes include: an initial business activity start point, at least one initial activity node, and an initial business activity end point.
[0063] Step A4: For any target initial node among the plurality of initial business activity nodes, configure the preceding node information of the target initial node according to the node identifier of at least one preceding initial business activity node.
[0064] Step A5: Based on the at least one business data information corresponding to the target initial node obtained, configure at least one node data object of the node business data information of the target initial node to complete the construction of the target business activity domain, and return to the step of selecting the business activity to be processed from the target business until there is no business activity to be processed in the target business, thereby obtaining the preset business data storage model.
[0065] The following is an illustrative example of the implementation of this disclosure, using the engineering construction process quality tracking management as an example. Engineering construction process quality tracking management includes the following eight business activities: material selection, technical briefing, equipment inspection, foundation acceptance, rebar tying acceptance, concrete pouring acceptance, wall masonry acceptance, and topping-out acceptance. The three business activities of material selection, technical briefing, and equipment inspection can be carried out simultaneously, without any specific order of implementation. Therefore, the business activity flow is as follows: after the three business activities in the construction preparation stage are completed, the foundation acceptance, rebar tying acceptance, concrete pouring acceptance, wall masonry acceptance, and topping-out acceptance are carried out sequentially.
[0066] When constructing a preset business data storage model for quality tracking and management of engineering construction processes, for example, if three business activities in the construction preparation stage all have corresponding pre-created business activity domains, the foundation acceptance business activity can be selected from the target business. This business activity does not have a corresponding pre-created business activity domain, but according to the business process, each preceding business activity of the foundation acceptance business activity has a corresponding pre-created business activity domain. Therefore, the foundation acceptance business activity can be designated as a pending business activity. For ease of management, each of the aforementioned business activities can be numbered in the business system to obtain a business activity identifier for each activity. For example, the business activity identifier for the material procurement business activity is 001a, and the business activity identifier for the technical briefing business activity is 002a, etc. The target business activity identifier 003a for the pending foundation acceptance business activity can be obtained first. Then, based on 003a and a preset rule, the target business activity domain identifier 003 is generated. Here, the preset rule can be to remove the last letter of the business activity identifier to obtain the business activity domain identifier. This embodiment of the disclosure does not limit the preset rule; it can be set according to actual needs during implementation.
[0067] Engineering quality control activities generate a large amount of structured, semi-structured, and unstructured quality data to record the quality status of the entire construction process and each stage. This data exists in the form of audio and video files, text files, and database tables. Therefore, after obtaining the target business activity domain identifier, multiple initial business activity nodes corresponding to the target business activity domain to be processed can be created. Subsequently, quality data can be stored in different initial business activity nodes. In implementation, the division of initial business activity nodes can be determined according to actual needs. This disclosure does not limit this. For example, for the foundation acceptance business activity, a checkpoint for the foundation can be used as an initial business activity node. Then, the foundation acceptance business activity domain includes: business activity start point c1, activity node c2, activity node c3, activity node c4, and business activity end point c5, which correspond to compliance checkpoint, foundation flatness and firmness checkpoint, drainage system checkpoint, waterproofing system checkpoint, and acceptance report checkpoint, respectively.
[0068] Based on the target business activity domain identifier, the node attribute information of each initial business activity node can be initialized. Specifically, values can be assigned to the node attribute information of each initial business activity node. For example, using the target business activity domain identifier, such as 003, the business activity domain identifier in each initial business activity node can be assigned a value; a unique string can be randomly generated and assigned a value to the node identifier of each initial business activity node; the node type of the business activity start point c1 can be set to the business activity start point, the node type of activity nodes c2, c3, and c4 can be set to activity nodes, and the node type of the business activity end point c5 can be set to the business activity end point.
[0069] Then, configure the preceding node information for each of the multiple initialized initial business activity nodes. Specifically, for any target initial node among the multiple initial business activity nodes, the preceding node information of the target initial node can be configured based on the node identifier of at least one preceding initial business activity node. Specifically, in one possible implementation, when the type of the target initial node is a business activity start point, the preceding initial business activity nodes include the business activity ends of each preceding business activity domain corresponding to the target business activity domain; when the type of the target initial node is an activity node, the preceding initial business activity node includes: the business activity start point of the target business activity domain and at least one preceding activity node corresponding to the target initial node; when the type of the target initial node is a business activity end point, the preceding initial business activity node includes: the business activity start point of the target business activity domain and all activity nodes.
[0070] For example, for the starting point c1 of a business activity, its corresponding preceding initial business activity nodes include: the business activity endpoint d1 of the material procurement business activity domain, the business activity endpoint d2 of the technical disclosure business activity domain, and the business activity endpoint d3 of the equipment inspection business activity domain. The preceding node information for node c1 can be configured based on the node identifiers of d1, d2, and d3. For business activity node c2, its corresponding preceding initial business activity node includes: the starting point c1. The preceding node information for node c2 can be configured based on the node identifier of c1. For business activity node c3, its corresponding preceding initial business activity nodes include: the starting point c1 and activity node c2. The preceding node information for node c3 can be configured based on the node identifiers of c1 and c2. For business activity node c4, its corresponding preceding initial business activity nodes include: the starting point c1, activity node c2, and activity node c3. The preceding node information for node c1 can be configured based on the node identifiers of c1, c2, and c3. For the endpoint c5 of a business activity, its corresponding preceding initial business activity nodes include: starting point c1, activity node c2, activity node c3, and activity node c4. The preceding node information for node c5 can then be configured based on the node identifiers of c1, c2, c3, and c4. It should be noted that this example is merely illustrative and does not limit the scope of this disclosure. In implementation, the number of preceding initial business activity nodes can also be recorded in the preceding node count section of the preceding node information.
[0071] Finally, based on at least one piece of business data information corresponding to the target initial node, at least one node data object of the node business data information of the target initial node can be configured. For example, for the business activity start point c1, which corresponds to compliance inspection, the business data information corresponding to the business activity start point c1 can include: data information 1 recording the materials used in the foundation laying process, data information 2 recording whether the construction process was correctly executed during the foundation laying process, and data information 2 recording whether the foundation quality meets the standards. Then, node data object M1 can be configured using data information 1, node data object M2 using data information 2, and node data object M3 using data information 3. Similarly, the node business data information of activity nodes c2, c3, c4, and c5 can be configured, thereby completing the construction of the foundation acceptance business activity domain and returning to the step of selecting pending business activities from the target business until there are no pending business activities in the target business, thus obtaining the preset business data storage model.
[0072] Specifically, in one possible implementation, the node data object includes data feature information and data storage information; the step of configuring at least one node data object of the node business data information of the target initial node according to at least one business data information corresponding to the acquired target initial node includes:
[0073] Step A51: Configure the data feature information of at least one node data object of the target initial node according to the hash value of the at least one business data information.
[0074] Step A52: Configure the data storage information of at least one node data object of the target initial node according to the storage location of the at least one business data information.
[0075] See Figure 4 As shown, in this embodiment, the node data object also includes data feature information and data storage information. The business data information can be hashed, and the resulting hash value can be used as the data feature information of the target initial node. In practice, business data information in the form of database tables, data blocks, etc., can also be directly used as data feature information. The data storage information is a self-describing structure, which can be, but is not limited to, JSON format, and is used to describe the location where the business data information is stored, such as a URL, database table name, etc.
[0076] For example, for the starting point c1 of a business activity, data information 1, data information 2, and data information 3 can be hashed to obtain data feature hash values 1, 2, and 3. Data feature hash value 1 is used to configure the data feature information of node data object N1, data feature hash value 2 is used to configure the data feature information of node data object N2, and data feature hash value 3 is used to configure the data feature information of node data object N3. Data information 1 is stored in location 1, data information 2 in location 2, and data information 3 in location 3. Therefore, location 1 can be used to configure the data storage information of node data object N1, location 2 can be used to configure the data storage information of node data object N2, and location 3 can be used to configure the data storage information of node data object N3. It should be noted that this example is merely illustrative and does not limit the scope of this disclosure.
[0077] In one possible implementation, see Figure 4 As shown, node data objects can also include data description information. This data description information records descriptive details of the business data and is a self-describing structure, which can be, but is not limited to, JSON format. Specifically, the data description information can be self-describing text information, such as name, company, and time. During implementation, the data description information of the target initial node can be configured according to the business data information.
[0078] In the aforementioned engineering construction process quality tracking scenario, a correlation exists within the quality data: the correlation between data and the subject. Existing evidence preservation methods cannot solve the problem of reliable evidence preservation of the correlation between data and the subject. Therefore, in this disclosure, in one possible implementation, the node data information further includes digital signature information, which includes a digital signature object; after the step of configuring at least one node data object of the node business data information of the target initial node based on at least one business data information corresponding to the obtained target initial node, the method further includes:
[0079] Step A6: For the node business data information of the target initial node, obtain and configure at least one corresponding digital signature object, the digital signature object including: signature public key and signature information.
[0080] In this embodiment, see Figure 4 As shown, the node data information also includes digital signature information, which includes a digital signature object. The digital signature object includes a signing public key and signature information. The signing public key records public key information used to sign the node business data information of the target initial node. The signature information is generated using the private key corresponding to the signing public key. In one possible implementation, see... Figure 4 As shown, digital signature information may also include the number of signature objects, which is recorded in the number of signature objects.
[0081] Here, through digital signature information, it is possible to identify which entities are responsible for the node data information in each business activity node, thus enabling the model to record the relationship between business data and business entities, thereby achieving reliable evidence storage of the relationship between business data and business entities.
[0082] In one possible implementation, the node attribute information further includes a node timestamp; the initialization of the node attribute information of each initial business activity node further includes: obtaining the time when the target initial node was created, and configuring the node timestamp of the initial business activity node.
[0083] After the step of obtaining and configuring at least one corresponding digital signature object for the node business data information of the target initial node, the method further includes:
[0084] Step A7: Package the node attribute information, predecessor node information, node business data information and digital signature information of the target initial node to generate a partial node data block.
[0085] Step A8: Hash the data blocks of the aforementioned nodes and use the processing result as the new node identifier.
[0086] In this embodiment, see Figure 4 As shown, the node attribute information also includes the node timestamp. When initializing the node attribute information of each initial business activity node, the time when the target initial node was created can be obtained from the time synchronization center, and this time can be used to configure the node timestamp of the target initial node. Then, the node attribute information, preceding node information, node business data information, and digital signature information of the target initial node are packaged to generate a partial node data block. A hash algorithm is then used to hash this partial node data block to obtain the processing result, which is then used as the new node identifier for the target initial node.
[0087] In one possible implementation, after the step of packaging all node data information to obtain the corresponding business activity node data block to be certified, the method further includes: using a hash algorithm to perform hash processing on each of the business activity node data blocks to be certified, to obtain the corresponding business activity node summary data to be certified.
[0088] In step S103, the step of processing the data blocks of each business activity node to be certified on the blockchain to achieve the certification of business data on the blockchain specifically includes: processing the summary data of each business activity node to be certified and the corresponding node identifier on the blockchain to achieve the certification of business data on the blockchain.
[0089] In this embodiment, a hash algorithm is an algorithm that maps a binary string of arbitrary length to a binary string of fixed length. The result of the fixed-length binary string is usually called a hash value or a digest.
[0090] Specifically, the hash algorithm can be, but is not limited to, Message Digest Algorithm 5 (MD5), Secure Hash Algorithm 1 (SHA-1), Secure Hash Algorithm 256-bit (SHA-256), and Secure Hash Algorithm 512-bit (SHA-512). In implementation, the MD5 algorithm can be used to hash the data blocks of each business activity node to be notified, obtaining a 128-bit hash value, which is the digest data of the business activity node to be notified.
[0091] After obtaining the summary data of each business activity node to be notified, the summary data of each business activity node and its corresponding node identifier can be uploaded to the blockchain to achieve notarization of business data on the blockchain. For example, in the aforementioned step S102, after obtaining all node data information b11 of the business activity starting point 11, all node data information b12 of the activity node 12, and all node data information b13 of the business activity ending point 13, b11, b12, and b13 can be packaged to obtain the corresponding data blocks for the activity starting point, activity nodes, and activity ending points to be notified. Then, the MD5 algorithm is used to hash the data blocks for the activity starting point, activity nodes, and activity ending points to be notified, respectively, to obtain the summary data for the activity starting point, activity nodes, and activity ending points to be notified. Then, the node identifier 00011 of the business activity starting point 11 and the summary data of the activity starting point to be notified can be stored on the blockchain; the node identifier 00012 of activity node 12 and the summary data of the activity node to be notified can be stored on the blockchain; the node identifier 00013 of the business activity ending point 13 and the summary data of the activity ending point to be notified can be stored on the blockchain. Similarly, all node data information of each business activity node in business activity domain 2 and business activity domain 3 can be stored on the blockchain, which will not be elaborated here, thereby realizing blockchain notarization of business data.
[0092] In this embodiment, the hash algorithm can convert business activity node data blocks into unique hash values. Any modification or damage to the business data will cause the hash value to change, thus ensuring the security and reliability of the business data. By mapping data to fixed-length hash values, the hash algorithm can store a large amount of business data with a smaller storage space, saving storage costs. The hash algorithm can also quickly process a large number of business activity node data blocks, greatly improving operational performance.
[0093] For example, this disclosure also provides another blockchain-based evidence storage method, specifically including the following steps B1-B12:
[0094] Step B1: Select the business activity to be processed from the target business. The business activity to be processed does not have a corresponding pre-created business activity domain, but according to the business process of the target business, each preceding business activity of the business activity to be processed has a corresponding pre-created business activity domain.
[0095] Step B2: Obtain the target business activity identifier of the business activity to be processed, and generate the target business activity domain identifier based on the target business activity identifier and preset rules.
[0096] Step B3: Create multiple initial business activity nodes in the target business activity domain corresponding to the business activity to be processed, and initialize the node attribute information of each initial business activity node based on the target business activity domain identifier. The multiple initial business activity nodes include: an initial business activity start point, at least one initial activity node, and an initial business activity end point.
[0097] Step B4: For any target initial node among multiple initial business activity nodes, configure the preceding node information of the target initial node based on the node identifier of at least one preceding initial business activity node. Specifically: When the type of the target initial node is a business activity start point, the preceding initial business activity nodes include the business activity ends of each preceding business activity domain corresponding to the target business activity domain; when the type of the target initial node is an activity node, the preceding initial business activity nodes include: the business activity start point of the target business activity domain and at least one preceding activity node corresponding to the target initial node; when the type of the target initial node is a business activity end point, the preceding initial business activity nodes include: the business activity start point of the target business activity domain and all activity nodes.
[0098] Step B5: Based on the hash value of at least one business data information corresponding to the target initial node, configure the data feature information of at least one node data object of the target initial node.
[0099] Step B6: Configure the data storage information of at least one node data object of the target initial node according to the storage location of at least one business data information.
[0100] Step B7: For the node business data information of the target initial node, obtain and configure at least one corresponding digital signature object. The digital signature object includes: a signing public key and signature information.
[0101] Step B8: Package the node attribute information, predecessor node information, node business data information, and digital signature information of the target initial node to generate a partial node data block.
[0102] Step B9: Hash some node data blocks and use the processing result as a new node identifier. This completes the construction of the target business activity domain, and returns to step S501 until there are no more pending business activities in the target business, thus obtaining the preset business data storage model.
[0103] Step B10: For any business activity domain to be certified in the preset business data storage model, retrieve all node data information of each business activity node in the business activity domain to be certified from the business database.
[0104] Step B11: Use a hash algorithm to hash the data blocks of each business activity node to be certified, and obtain the corresponding summary data of the business activity node to be certified.
[0105] Step B12: Upload the summary data of each business activity node to be notified and the corresponding node identifier to the blockchain to realize the notarization of business data on the blockchain.
[0106] In specific application scenarios, as described in the background section, the blockchain traceability methods in related technologies cannot meet the traceability requirements of full-element, full-process business scenario data in complex multi-party collaborative scenarios. Therefore, based on the same inventive concept, this disclosure provides a blockchain traceability method, such as... Figure 5 As shown in the figure, the embodiments of this disclosure include at least steps S501-S504:
[0107] Step S501: Obtain the domain identifier of the business activity to be traced.
[0108] As described in step A2 above, when constructing the preset business data storage model, target business activity domain identifiers are generated based on the target business activity identifier and preset rules. Therefore, a correspondence between a set of target business activity identifiers and target business activity domain identifiers can be obtained. Thus, in this step, based on actual needs, the business activity identifier to be traced can be determined first, and then the business activity domain identifier to be traced can be determined based on the correspondence between this set of target business activity identifiers and target business activity domain identifiers.
[0109] Step S502: Based on the identifier of the business activity domain to be traced and the preset business data storage model, obtain and output all node data information of each business activity node in the corresponding business activity domain to be traced.
[0110] During implementation, business activity nodes in the preset business data storage model can be filtered out, and business activity nodes whose business activity domains are identified as the business activity domains to be traced can be selected. For example, if the activity start point c1, activity node c2, and activity end point c3 are obtained, all node data information of the activity start point c1, activity node c2, and activity end point c3 can be output and displayed on the front-end page.
[0111] Step S503: For any node to be traced in the business activity domain to be traced, perform a credibility verification on the node to be traced based on at least one node data object in the node data information of the node to be traced.
[0112] In implementation, for example, for any traceable node in the business activity domain, at least one node data object of that traceable node can be obtained, such as node data object 1 and node data object 2. Then, based on the storage location 1 indicated by the data storage information in node data object 1, the original business data 1 can be obtained. This original business data 1 is then compared with the data feature information in node data object 1. If the content matches, it indicates that the original business data 1 has not been tampered with and is trustworthy; otherwise, it indicates that the original business data 1 has been tampered with and is untrustworthy. Similarly, based on the storage location 2 indicated by the data storage information in node data object 2, the original business data 2 can be obtained. This original business data 2 is then compared with the data feature information in node data object 2. If the content matches, it indicates that the original business data 2 has not been tampered with and is trustworthy; otherwise, it indicates that the original business data 2 has been tampered with and is untrustworthy.
[0113] Step S504: Based on the preceding node information of the starting point of the traceable activity in the traceable business activity domain, obtain at least one preceding business activity domain identifier. Use each preceding business activity domain identifier as a new traceable business activity domain identifier, and return to the step of obtaining and outputting all node data information of each business activity node in the corresponding traceable business activity domain based on the traceable business activity domain identifier and the preset business data storage model, until the preceding node information of all starting points of the traceable activities is empty.
[0114] During implementation, after verifying the trustworthiness of each node in the business activity domain to be traced, in order to achieve traceability, one or more preceding business activity domain identifiers to be traced can be obtained based on the preceding node information of the activity starting point in the business activity domain to be traced. For example, see [link to relevant documentation]. Figure 2 Let business activity domain 3 be the business activity domain to be traced. After verifying the credibility of each node in business activity domain 3, two preceding business activity domain identifiers to be traced can be obtained based on the preceding node information of business activity starting point 31, namely the node identifier of business activity ending point 13 and the node identifier of business activity ending point 23. Then, the node identifier of business activity ending point 13 can be used as the new business activity domain identifier to be traced, and the process returns to step S602; the node identifier of business activity ending point 23 can be used as the new business activity domain identifier to be traced, and the process returns to step S602. After verifying the credibility of all nodes in activity domain 1 where business activity ending point 13 is located and activity domain 2 where business activity ending point 23 is located, it is determined that the preceding node information of business activity starting point 11 in activity domain 1 is empty, and the preceding node information of business activity starting point 21 in activity domain 2 is also empty. At this point, the tracing of business activity domain 3 is completed.
[0115] from Figure 5As can be seen from the method shown, this embodiment of the disclosure obtains and outputs all node data information of each business activity node in the business activity domain to be traced based on the obtained business activity domain identifier and the preset business data storage model; for any traceable node in the business activity domain to be traced, the credibility of the traceable node is verified based on at least one node data object in the node data information of the traceable node; based on the preceding node information of the starting point of the traceable activity in the business activity domain to be traced, at least one preceding business activity domain identifier is obtained, and each preceding business activity domain identifier is used as a new traceable business activity domain identifier, and the process returns to the step of obtaining and outputting all node data information of each business activity node in the business activity domain to be traced based on the traceable business activity domain identifier and the preset business data storage model, until the preceding node information of all starting points of the traceable activities is empty. As can be seen, the embodiments of this disclosure trace the business data in a fine-grained preset business data storage model. This preset business data storage model records at least one business activity domain that is linked in a chain according to the business process of the target business, so that the model contains business activity data of the entire process. The node business data information records business data involving multiple elements that affect the business objectives. That is, the business data recorded by the model involves all elements. Therefore, compared with the prior art, the embodiments of this disclosure can meet the traceability requirements of all elements, the entire process of business scenario data, and the data responsibility subject in complex multi-party collaborative scenarios.
[0116] Furthermore, to better illustrate the process of the above-described blockchain traceability method, as a refinement and extension of the above embodiments, this invention provides several optional embodiments, but is not limited thereto, as detailed below:
[0117] In one possible implementation, the step of verifying the trustworthiness of any traceable node in the traceable business activity domain, based on at least one node data object in the node data information of the traceable node, includes:
[0118] Step S503-1: For any target node data object of the node to be traced, obtain the original business data information based on the data storage information of the target node data object.
[0119] Step S503-2: Perform hash processing on the original business data information to obtain the original business data digest.
[0120] Step S503-3: Compare the contents of the original business data summary and the data feature information of the target node data object to obtain the first comparison result.
[0121] Step S503-4: If the first comparison result is that the original business data summary and the data feature information of the target node data object are consistent, then output a record that the business data has not been tampered with; if the first comparison result is that the original business data summary and the data feature information of the target node data object are inconsistent, then output a record that the business data has been tampered with.
[0122] In practical applications, the data feature information stored in the preset business data storage model is the hash value of the business data. Therefore, in this embodiment, when verifying the trustworthiness of the traceable node, the original business data information can be obtained from the storage location indicated by the data storage information of any target node data object of the traceable node. Then, a hash algorithm, such as the MD5 algorithm, is used to process the original business data information to obtain the original business data digest. The original business data digest is then compared with the content of the data feature information of the target node data object. If the content of the original business data digest and the data feature information of the target node data object are consistent, it indicates that the original business data in that storage location has not been tampered with, and a record of untampered business data is output. If the content of the original business data digest and the data feature information of the target node data object are inconsistent, it indicates that the original business data in that storage location has been tampered with, and a record of tampered business data is output.
[0123] In one possible implementation, before the step of verifying the trustworthiness of any traceable node in the traceable business activity domain based on at least one node data object in the node data information of the traceable node, the method further includes:
[0124] Step C1: Package all node data information of the node to be traced to obtain the data block of the node to be traced.
[0125] Step C2: Perform hash processing on the data block of the node to be traced to obtain the data digest of the node to be traced.
[0126] Step C3: Based on the node identifier of the node to be traced, query the blockchain to obtain the on-chain data digest of the node to be traced.
[0127] Step C4: Compare the contents of the data digest of the node to be traced and the on-chain data digest of the node to be traced to obtain a second comparison result.
[0128] Step C5: If the second comparison result shows that the content of the data digest of the node to be traced and the on-chain data digest of the node to be traced are inconsistent, then the tracing process ends; if the second comparison result shows that the content of the data digest of the node to be traced and the on-chain data digest of the node to be traced are consistent, then continue with the step of verifying the credibility of any node to be traced in the business activity domain to be traced, based on at least one node data object in the node data information of the node to be traced.
[0129] In this embodiment, before performing the credibility verification of the node to be traced based on at least one node data object in the node data information of the node to be traced, the data in the data structure of the node to be traced stored in the preset business data storage model can be verified first to prevent the data in the data structure of the node to be traced from being tampered with, which would cause errors in the credibility verification of the node to be traced.
[0130] During implementation, all node data information of the node to be traced can be packaged, and the resulting data block of the node to be traced can be hashed to obtain a data digest of the node to be traced. Based on the node identifier of the node to be traced, a query is performed on the blockchain to obtain the on-chain data digest of the node to be traced. The data digest of the node to be traced and the on-chain data digest of the node to be traced are compared. If the strings of the data digest of the node to be traced and the on-chain data digest of the node to be traced are inconsistent, it indicates that the node data information of the node to be traced has been tampered with, and the tracing process ends. If the strings of the data digest of the node to be traced and the on-chain data digest of the node to be traced are consistent, it indicates that the node data information of the node to be traced has not been tampered with, and the process can continue to perform a trustworthiness verification step on any node to be traced in the business activity domain to be traced, based on at least one node data object in the node data information of the node to be traced.
[0131] For example, this disclosure also provides another blockchain traceability method, specifically including the following steps D1-D12:
[0132] Step D1: Obtain the domain identifier of the business activity to be traced.
[0133] Step D2: Based on the identifier of the business activity domain to be traced and the preset business data storage model, obtain and output all node data information of each business activity node in the corresponding business activity domain to be traced.
[0134] Step D3: Package all node data information of the node to be traced to obtain the data block of the node to be traced.
[0135] Step D4: Hash the data block of the node to be traced to obtain the data digest of the node to be traced.
[0136] Step D5: Based on the node identifier of the node to be traced, query the blockchain to obtain the on-chain data digest of the node to be traced.
[0137] Step D6: Compare the contents of the data digest of the node to be traced and the on-chain data digest of the node to be traced to obtain the second comparison result.
[0138] Step D7: If the second comparison result shows that the data digest of the node to be traced and the on-chain data digest of the node to be traced are inconsistent, then the tracing process ends; if the second comparison result shows that the data digest of the node to be traced and the on-chain data digest of the node to be traced are consistent, then proceed to step D8.
[0139] Step D8: For any target node data object of the node to be traced, obtain the original business data information based on the data storage information of the target node data object.
[0140] Step D9: Hash the original business data information to obtain the original business data digest.
[0141] Step D10: Compare the content of the data feature information of the original business data summary and the target node data object to obtain the first comparison result.
[0142] Step D11: If the first comparison result shows that the data feature information of the original business data summary and the target node data object are consistent, then output the record that the business data has not been tampered with; if the first comparison result shows that the data feature information of the original business data summary and the target node data object are inconsistent, then output the record that the business data has been tampered with.
[0143] Step D12: Based on the preceding node information of the starting point of the traceable activity in the traceable business activity domain, obtain at least one preceding business activity domain identifier. Use each preceding business activity domain identifier as a new traceable business activity domain identifier, and return to the step of obtaining and outputting all node data information of each business activity node in the corresponding traceable business activity domain based on the traceable business activity domain identifier and the preset business data storage model, until the preceding node information of all starting points of the traceable activities is empty.
[0144] Those skilled in the art will understand that the order in which the steps are written in the above-described method of the specific embodiments does not imply a strict execution order, nor does it constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic. It should be noted that in practical applications, all the above possible implementation methods can be arbitrarily combined in a combined manner to form possible embodiments of this application, which will not be elaborated here.
[0145] Based on the same concept, this disclosure also provides a blockchain-based evidence storage device. Figure 6 A schematic diagram of the structure of the blockchain evidence storage device provided in this embodiment is shown. See also: Figure 6 As shown, the blockchain evidence storage device 600 provided in this embodiment includes:
[0146] The data storage model acquisition module 601 is used to acquire a preset business data storage model for a target business. The model includes at least one business activity domain linked in a chain according to the business process of the target business. The business activity domain includes the following business activity nodes: a business activity start point, at least one activity node, and a business activity end point. The business activity node includes the following node data information: node attribute information, preceding node information, and node business data information. The node attribute information includes: node identifier, node type, and business activity domain identifier. The preceding node information includes a preceding node identifier. The node business data information includes at least one node data object, which is used to record at least one business data information related to multiple elements affecting the target business.
[0147] The node data acquisition module 602 is used to acquire all node data information of each business activity node in any business activity domain to be certified in the preset business data storage model from the business database.
[0148] The blockchain evidence storage module 603 is used to package the data information of all nodes to obtain the corresponding business activity node data blocks to be stored, and to process each business activity node data block to be stored on the blockchain to realize the evidence storage of business data on the blockchain.
[0149] In one possible implementation, the above-described apparatus further includes a model building module for:
[0150] Select a business activity to be processed from the target business; the business activity to be processed does not have a corresponding pre-created business activity domain, and according to the business process of the target business, each preceding business activity corresponding to the business activity to be processed has a corresponding pre-created business activity domain.
[0151] Obtain the target business activity identifier of the business activity to be processed, and generate a target business activity domain identifier based on the target business activity identifier and preset rules;
[0152] Multiple initial business activity nodes are created in the target business activity domain corresponding to the business activity to be processed, and the node attribute information of each initial business activity node is initialized based on the target business activity domain identifier. The multiple initial business activity nodes include: an initial business activity start point, at least one initial activity node, and an initial business activity end point.
[0153] For any target initial node among the plurality of initial business activity nodes, configure the preceding node information of the target initial node according to the node identifier of at least one preceding initial business activity node obtained;
[0154] Based on at least one business data information corresponding to the target initial node, configure at least one node data object of the node business data information of the target initial node to complete the construction of the target business activity domain, and return to the step of selecting the business activity to be processed from the target business until there is no business activity to be processed in the target business, thereby obtaining the preset business data storage model.
[0155] In one possible implementation, in the above apparatus, when the type of the target initial node is the business activity start point, the preceding initial business activity node includes the business activity endpoint of each preceding business activity domain corresponding to the target business activity domain.
[0156] When the type of the target initial node is an activity node, the preceding initial business activity node includes: the business activity starting point of the target business activity domain and at least one preceding activity node corresponding to the target initial node;
[0157] When the type of the target initial node is the end point of a business activity, the preceding initial business activity node includes: the business activity start point and all activity nodes of the target business activity domain.
[0158] In one possible implementation, in the above-described apparatus, the node data object includes data feature information and data storage information; the model building module is used for:
[0159] Based on the hash value of the at least one business data information, configure the data feature information of at least one node data object of the target initial node;
[0160] Based on the storage location of the at least one business data information, configure the data storage information of at least one node data object of the target initial node.
[0161] In one possible implementation, in the above-described apparatus, the node data information further includes digital signature information, which includes a digital signature object; the model building module is further configured to:
[0162] For the node business data information of the target initial node, obtain and configure at least one corresponding digital signature object, the digital signature object including: a signature public key and signature information.
[0163] In one possible implementation, in the above-described apparatus, the node attribute information further includes a node timestamp; the model building module is further configured to: obtain the time when the target initial node was created, and configure the node timestamp of the initial business activity node;
[0164] After the step of obtaining and configuring at least one corresponding digital signature object for the node business data information of the target initial node, the model building module is further configured to: package the node attribute information, preceding node information, node business data information and digital signature information of the target initial node to generate a partial node data block; perform hash processing on the partial node data block and use the processing result as a new node identifier.
[0165] In one possible implementation, the above-mentioned device further includes a hash processing module, which is used to perform hash processing on each of the data blocks of the business activity nodes to be certified by using a hash algorithm to obtain the corresponding summary data of the business activity nodes to be certified.
[0166] The blockchain evidence storage module is used to: process the summary data of each business activity node to be stored and the corresponding node identifier on the blockchain, so as to realize the evidence storage of business data on the blockchain.
[0167] It should be noted that any of the aforementioned blockchain evidence storage devices can implement the aforementioned blockchain evidence storage methods one by one, which will not be elaborated here.
[0168] Based on the same concept, this disclosure also provides a blockchain traceability device. Figure 7 A schematic diagram of the structure of the blockchain traceability device provided in this embodiment is shown. See also: Figure 7 As shown, the blockchain traceability device 700 provided in this embodiment includes:
[0169] Module 701 is used to obtain the domain identifier of the business activity to be traced.
[0170] The node data extraction module 702 is used to obtain and output all node data information of each business activity node in the corresponding business activity domain to be traced, based on the identifier of the business activity domain to be traced and the preset business data storage model.
[0171] The node trust verification module 703 is used to perform trust verification on any node to be traced in the business activity domain to be traced, based on at least one node data object in the node data information of the node to be traced.
[0172] The loop module 704 is used to obtain at least one traceable preceding business activity domain identifier based on the preceding node information of the traceable activity starting point in the traceable business activity domain, use each traceable preceding business activity domain identifier as a new traceable business activity domain identifier, and return to the step of obtaining and outputting all node data information of each business activity node in the corresponding traceable business activity domain based on the traceable business activity domain identifier and the preset business data storage model, until the preceding node information of all traceable activity starting points is empty.
[0173] In one possible implementation, in the above-described apparatus, the node trust verification module 703 is used for:
[0174] For any target node data object of the node to be traced, the original business data information is obtained based on the data storage information of the target node data object;
[0175] The original business data information is hashed to obtain a digest of the original business data;
[0176] By comparing the contents of the original business data summary and the data feature information of the target node data object, a first comparison result is obtained;
[0177] If the first comparison result shows that the original business data summary and the data feature information of the target node data object are consistent, then the record of unaltered business data is output; if the first comparison result shows that the original business data summary and the data feature information of the target node data object are inconsistent, then the record of tampered business data is output.
[0178] In one possible implementation, the above-mentioned device further includes a node structure verification module, used for:
[0179] All node data information of the node to be traced is packaged to obtain the node data block to be traced.
[0180] The data block of the node to be traced is hashed to obtain a data digest of the node to be traced.
[0181] Based on the node identifier of the node to be traced, a query is performed on the blockchain to obtain the on-chain data digest of the node to be traced.
[0182] By comparing the contents of the data digest of the node to be traced and the on-chain data digest of the node to be traced, a second comparison result is obtained;
[0183] If the second comparison result shows that the content of the data digest of the node to be traced and the on-chain data digest of the node to be traced are inconsistent, the tracing process ends; if the second comparison result shows that the content of the data digest of the node to be traced and the on-chain data digest of the node to be traced are consistent, the step of verifying the credibility of any node to be traced in the business activity domain to be traced, based on at least one node data object in the node data information of the node to be traced, continues.
[0184] It should be noted that any of the aforementioned blockchain traceability devices can implement the aforementioned blockchain traceability method one by one, which will not be elaborated here.
[0185] Based on the same concept, this disclosure also provides a blockchain-based evidence storage and traceability system. Figure 8 A schematic diagram of the structure of the blockchain-based evidence storage and traceability system provided in this embodiment is shown. See also: Figure 8 As shown, the blockchain evidence storage and traceability system 800 provided in this embodiment includes: a blockchain evidence storage device 600, a blockchain traceability device 700, a user digital identity management module 801, and a data storage management module 802.
[0186] User digital identity management module 801 is used to generate at least one digital signature object and send it to the blockchain storage device;
[0187] The data storage management module 802 is used to store business data information; send the business data information to the blockchain evidence storage device; and query the original business data and send it to the blockchain traceability device based on the data storage information received from the blockchain traceability device.
[0188] In this implementation, the forms of business data information include, but are not limited to: structured / unstructured / semi-structured data files, and relational / non-relational database tables. The data storage management module's functionality is based on, but not limited to, support for: IPFS storage systems, cloud storage systems, and database systems. The implementation of the blockchain evidence storage device and blockchain traceability device is based on, but not limited to: Hyperledger Fabric consortium blockchain and FISCO BCOS consortium blockchain.
[0189] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure is shown. Figure 9As shown, at the hardware level, this electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or it may include non-volatile memory, such as at least one disk drive. Of course, this electronic device may also include other hardware required for other business operations.
[0190] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0191] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0192] The processor reads the corresponding computer program from non-volatile memory into memory and then runs it, forming a blockchain evidence storage device or blockchain traceability device at the logical level. The processor executes the program stored in memory and specifically performs the aforementioned methods.
[0193] The processor may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0194] The electronic device can execute the blockchain evidence storage method provided in several embodiments of this disclosure, and is implemented as a blockchain evidence storage device. Figure 6 The illustrated embodiment functions, or executes the blockchain traceability method provided in multiple embodiments of this disclosure, and is implemented as a blockchain traceability device. Figure 7 The functions of the embodiments shown are not described in detail here.
[0195] This disclosure also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform the blockchain evidence storage method or blockchain traceability method provided in various embodiments of this disclosure.
[0196] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0197] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0198] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0199] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0200] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0201] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0202] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0203] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0204] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0205] The above are merely embodiments of this disclosure and are not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.
