Blockchain-based achievement protection method, device, equipment and medium throughout the life cycle
By storing and linking achievement stage information in the blockchain according to timestamp order and hash value, and combining this with smart contracts to record and update data, the problem of low efficiency in storing and querying achievements in the blockchain is solved, and efficient data protection and traceability throughout the entire life cycle of achievements are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DINGYI CHUANGZHAN CONSULTING (BEIJING) CO LTD
- Filing Date
- 2023-07-05
- Publication Date
- 2026-07-24
Smart Images

Figure CN116756245B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and in particular to methods, devices, and media for protecting blockchain results throughout their entire lifecycle. Background Technology
[0002] Blockchain technology is a technology that stores, verifies, transmits, and exchanges network data without relying on third parties, using its own distributed nodes. Nodes in a blockchain refer to computers running on the blockchain network. They connect to the blockchain network by running software clients and participate in its management. A blockchain is essentially a data structure that combines blocks in chronological order, with each block linked to the previous one via a hash, enabling information traceability. Except for the encryption of private information of the transacting parties, blockchain data is open to everyone; anyone can add their own information at any time using the same technical standards. Therefore, querying all information stored in a particular outcome based on the massive amount of data in a blockchain is not only time-consuming but also fails to provide a clear visual representation of the relationships between different stages of the same outcome and between different stages of the same outcome. Summary of the Invention
[0003] This invention provides a method, device, and storage medium for protecting results throughout the entire lifecycle of blockchain, enabling rapid querying of identical results in the blockchain and information indexing between different results, thus protecting the data of the results throughout their entire lifecycle.
[0004] According to a first aspect of the present invention, a method for protecting the results of blockchain throughout its entire lifecycle is provided, the method comprising:
[0005] Obtain the stage information of each result uploaded to the blockchain, wherein the stage information includes information content and timestamp;
[0006] The corresponding information content is stored in a chain in the blockchain according to the order of the timestamps, and there is a mapping relationship between the stage information of a single result according to the order of the corresponding timestamps.
[0007] Based on the mapping relationship, the system invokes and displays some or all of the stage information of the single result in the blockchain.
[0008] Optionally, storing the corresponding information content in a chain-like manner in the blockchain according to the chronological order of timestamps includes:
[0009] The stage information is symmetrically encrypted to generate a symmetric key;
[0010] The symmetric key is then encrypted a second time using the user's public key;
[0011] The information content of the stage information corresponding to the results is stored in a chain in the blockchain according to the chronological order of the timestamps, and a single block of the blockchain includes stage information corresponding to multiple results.
[0012] Furthermore, the mapping relationship includes:
[0013] The initial stage information of the single result is encrypted using a hash algorithm to generate the initial hash value of the result;
[0014] Calculate the hash value of the next time-stage information of the result based on the initial hash value;
[0015] In the blockchain, the hash value links the stage information of adjacent moments in the single result, wherein the hash value corresponding to each stage information uniquely identifies the information content corresponding to the stage information in the result.
[0016] Optionally, the method further includes:
[0017] The block where the stage information will be stored is determined based on the timestamp, and the block height of the block is recorded. The position of the stage information in the blockchain is then queried based on the block height.
[0018] Optionally, the step of calling and displaying some or all of the stage information of the individual result in the blockchain according to the mapping relationship includes:
[0019] A status database is established based on the information from each stage of the individual deliverable;
[0020] The block is updated according to the phase information uploaded in the blockchain, and the update result is synchronized to the state database;
[0021] Based on the state database and the mapping relationship, the system retrieves and displays some or all of the stage information of the individual result in the blockchain.
[0022] Optionally, the chained storage of the corresponding information content in the blockchain includes:
[0023] The information content is generated based on the sequence number of the stage information, the contract type corresponding to the sequence number, and the validity of the stage information, and a corresponding smart contract is generated based on the contract type.
[0024] The validity of the stage information is recorded by marking the update data of the stage information at different timestamps of the achievement. The update data includes adding new stage information, inserting new stage information, deleting or modifying the stage information, and referencing stage information of other achievements.
[0025] Furthermore, the method also includes:
[0026] The next stage information corresponding to the result is determined based on the union of the previous stage information and the updated data, and the validity of the invalid stage information in the union is set to zero; when the smart contract is triggered, the information content is stored in the blockchain, and the validity of the stage information is non-zero.
[0027] According to a second aspect of the present invention, a blockchain-based full lifecycle results protection device is provided, the device comprising:
[0028] The acquisition module is used to acquire the stage information of each result being uploaded to the blockchain. The stage information includes information content and timestamp.
[0029] The storage module is used to store the corresponding information content in the blockchain in chronological order according to the timestamps. There is a mapping relationship between the stage information of a single result according to the chronological order of the corresponding timestamps.
[0030] The calling module is used to call and display some or all of the stage information of the single result in the blockchain according to the mapping relationship.
[0031] Optionally, the storage module includes:
[0032] The first unit is used to symmetrically encrypt the stage information and generate a symmetric key;
[0033] The second unit is used to perform secondary encryption of the symmetric key based on the user's public key;
[0034] The third unit is used to chain the information content of the stage information corresponding to the results in the blockchain according to the order of the timestamps, and a single block of the blockchain includes stage information corresponding to multiple results.
[0035] Furthermore, the storage module also includes:
[0036] The first computing unit is used to encrypt the initial stage information of the single result according to the hash algorithm and generate the initial hash value of the result.
[0037] The second calculation unit is used to calculate the hash value of the next time stage information of the result based on the initial hash value;
[0038] A linking unit is used to link adjacent time-series information in a single outcome in the blockchain using the hash value, wherein the hash value corresponding to each stage information uniquely identifies the information content corresponding to the stage information in the outcome.
[0039] Optionally, the device further includes: a determining unit, specifically configured to determine the block where the stage information will be stored based on the timestamp, record the block height of the block, and query the position of the stage information in the blockchain based on the block height.
[0040] Optionally, the calling module includes:
[0041] A establishment unit is used to establish a status database based on the stage information of the individual result;
[0042] An update unit is used to update the block according to the phase information uploaded in the blockchain, and to synchronize the update result to the state database;
[0043] The invocation unit is used to invoke and display part or all of the stage information of the single result in the blockchain according to the state database and the mapping relationship.
[0044] Optionally, the storage module is specifically used for:
[0045] The information content is generated based on the sequence number of the stage information, the contract type corresponding to the sequence number, and the validity of the stage information, and a corresponding smart contract is generated based on the contract type.
[0046] The validity of the stage information is recorded by marking the update data of the stage information at different timestamps of the achievement. The update data includes adding new stage information, inserting new stage information, deleting or modifying the stage information, and referencing stage information of other achievements.
[0047] According to a third aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to implement the blockchain-based full lifecycle results protection method as described in any embodiment of the present invention.
[0048] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer instructions are configured to cause the computer to perform a blockchain-based full lifecycle results protection method as described in any embodiment of the present invention.
[0049] This invention discloses a method, device, and medium for protecting achievements throughout their entire lifecycle based on blockchain. The method includes: acquiring stage information of each achievement uploaded to the blockchain, the stage information including information content and timestamps; storing the corresponding information content in a chain according to the chronological order of the timestamps in the blockchain, with a mapping relationship existing between the stage information of individual achievements based on the chronological order of their corresponding timestamps; and retrieving and displaying some or all of the stage information of a single achievement in the blockchain according to the mapping relationship. By employing the technical solution of this invention, the stage information corresponding to each individual achievement is stored in a chain according to the mapping relationship in the blockchain, achieving protection of the achievement's data throughout its entire lifecycle and enabling rapid querying of the achievement's stage information, thus improving query efficiency. Furthermore, by improving the blockchain data structure, every data update of the achievement can be recorded, facilitating traceability.
[0050] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a schematic diagram illustrating an application scenario of the blockchain-based full lifecycle results protection method provided in an embodiment of the present invention.
[0053] Figure 2 This is a flowchart illustrating a blockchain-based method for protecting the entire lifecycle of blockchain achievements, as provided in an embodiment of the present invention.
[0054] Figure 3 This is a schematic diagram of a structure for storing different results in a blockchain according to an embodiment of the present invention;
[0055] Figure 4 This is a schematic diagram of the structure of a blockchain-based full lifecycle results protection device provided according to an embodiment of the present invention;
[0056] Figure 5 This is a block diagram of an electronic device used to implement the method for protecting the results of the entire blockchain lifecycle according to embodiments of the present invention. Detailed Implementation
[0057] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0058] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0059] According to an embodiment of this application, a schematic diagram 100 of an application scenario for a blockchain-based method for protecting results throughout their entire lifecycle is provided. For example... Figure 1As shown, this application scenario includes user 110, first node 120, second node 130, third node 140, blockchain 150, and blockchain network 160. User 110 can upload stage information of the results through the first node 120, second node 130, and third node 140 to record the information of each stage of the results on the blockchain. The first node 120, second node 130, and third node 140 provide storage space and computing power support for the blockchain system. Blockchain 150 includes a first block, a second block, ..., an Nth block, each block storing corresponding information. Blockchain 150 is generated according to the chronological order of block generation. This blockchain 150 is stored in the first node 120, second node 130, and third node 140 through blockchain network 160. It is worth noting that the interactive communication between blockchain network 160 and the first node 120, second node 130, and third node 140 is called a transaction, and each node needs to jointly verify and record the information of the transaction. For example, the first node 120 needs to record the stage information on the blockchain 150. This process is a transaction of the first node 120 on the blockchain network 160. The blockchain network 160 sends the transaction corresponding to the first node to the second node 130 and the third node 140 for backup. It can be seen that the first node 120, the second node 130 and the third node 140 can all record or query the data of the entire life cycle of the result.
[0060] The deliverables include, but are not limited to, the creative ideas and digital assets generated by users during the creation process. The full lifecycle data of the deliverables includes, but is not limited to, the creation of the deliverables, data updates, changes in the ownership of the deliverables, records of data usage, and evaluation and auditing of the deliverables.
[0061] Those skilled in the art will understand that the above Figure 1 The example shown is merely one application scenario based on the present invention and is not intended to limit the scope of the invention.
[0062] Example 1
[0063] According to embodiments of this application, a method for protecting results throughout the entire blockchain lifecycle is provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that presented here. Figure 2 As shown, the blockchain-based method for protecting the results throughout the entire lifecycle includes the following steps: S210, S220, and S230.
[0064] S210. Obtain the stage information of each result being uploaded to the blockchain, wherein the stage information includes information content and timestamp.
[0065] The outcome corresponds to one or more stages, which record the process of the transaction. A transaction chain consisting of multiple linked transactions corresponds to the outcome. For example... Figure 3 As shown, transaction chain A represents the full lifecycle data of result A, and transaction chain B represents the full lifecycle data of result B. Both transaction chains A and B are stored on the blockchain. Each transaction block on each transaction chain represents one of the stage information of the result. Each transaction block includes a transaction header and a transaction body, used to represent the timestamp and the information content of the stage information. The blockchain includes a block header and a block body. The block header includes a timestamp and a block height. The block body records the transaction blocks generated in each transaction chain at a certain time, or the block body records the stage information of the result generated at the corresponding time. Figure 3 The dashed lines indicate the positional index relationship of some transaction blocks in transaction chain A or transaction chain B within the block; the solid lines indicate the sequential connection relationship of each block in the blockchain, and the connection relationship of each transaction block in the transaction chain. For example, Figure 3 The transaction chain B[k+1] block is stored in the block corresponding to the “block i+3 hash”, where B[k+1] represents the (k+1)th transaction block of transaction chain B.
[0066] S220. According to the order of timestamps, the corresponding information content is stored in the blockchain in a chain, and there is a mapping relationship between the stage information of a single result according to the order of the corresponding timestamps.
[0067] Optionally, storing the corresponding information content in the blockchain in chronological order according to the timestamps includes: symmetrically encrypting the stage information to generate a symmetric key; encrypting the symmetric key a second time using the user's public key; and storing the information content of the stage information corresponding to the results in the blockchain in chronological order according to the timestamps, wherein a single block of the blockchain includes stage information corresponding to multiple results.
[0068] In a blockchain, all users can transact through the nodes at any time. Each node's ID is a key pair, including a public key and a private key, used to verify transactions and perform signature operations. Specifically, all transactions and block data in the blockchain are sent to all nodes. Each node verifies the legality of the block data and adds the legal data to its local blockchain database. For example, this embodiment of the invention provides a method for inter-node verification of transactions: at the current moment, a signature operation is performed based on the sender's private key corresponding to the fourth node to obtain the sender's signature, and the sender's signature is verified based on the sender's public key hash; a transaction hash is generated by packaging the transaction block including the stage information; the receiver corresponding to the fifth node performs a signature operation based on the sender's private key to obtain the receiver's signature; the receiver's signature is verified based on the receiver's public key hash. It should be noted that a concatenated signature hash is generated based on the private keys of each node and the hash of the receiver's public key. This concatenated signature hash is used to verify the accuracy of the consensus among the nodes in the blockchain and to ensure the security of data transmission. Figure 3 In a single block of a blockchain, the transaction blocks stored in the block body may belong to different transaction chains because, under a fixed timestamp, multiple achievements may generate stage information. Different blocks are hash-connected based on their generation time to form a blockchain. This blockchain contains transaction chains corresponding to each achievement. Within a single transaction chain, the block position of a transaction block is recorded by its block height in the information content. The transaction chain is obtained by hash-connecting the hash values of each transaction block. By storing multiple different transaction chains in the blockchain, the stage information of a single achievement is stored in a chain-like manner on the blockchain.
[0069] Furthermore, the mapping relationship includes: encrypting the initial stage information of the single result according to a hash algorithm to generate an initial hash value of the result; calculating the hash value of the next stage information of the result based on the initial hash value; and linking the stage information of adjacent moments in the single result in the blockchain through the hash value, wherein the hash value corresponding to each stage information uniquely identifies the information content corresponding to the stage information in the result.
[0070] Optionally, the step of storing the corresponding information content in the blockchain includes: generating the information content based on the sequence number of the stage information, the contract type corresponding to the sequence number, and the validity of the stage information, and generating a corresponding smart contract based on the contract type; recording the update data of the stage information under different timestamps of the achievement by marking the validity of the stage information, wherein the update data includes adding new stage information, inserting new stage information, deleting or modifying the stage information, and referencing stage information of other achievements.
[0071] The smart contract is a computer program deployed on the blockchain that can automatically execute and be stored when predetermined conditions are met. The smart contract needs to be converted into directly executable chaincode based on the blockchain structure. This chaincode can convert the terms of the contract type into a sequence of instructions that can be directly written into the blockchain code line and set the trigger conditions for code execution. When the predetermined trigger conditions are met, the code runs automatically. Therefore, a corresponding smart contract is generated based on the contract type to be invoked according to the stage information and stored in a transaction block used to identify the stage information. When the smart contract in the transaction block is triggered, a transaction corresponding to the stage information can be recorded on the blockchain, and the transaction becomes effective, meaning the stage information is valid. The contract types include, but are not limited to, minting contracts, value-added contracts, rights confirmation contracts, signature contracts, and conversion contracts. The casting contract is used to create the result, corresponding to one transaction; the value-added contract is used to store the stage information after the creation of the result on the blockchain, corresponding to one transaction; the rights confirmation contract is used to store the generation and initial rights confirmation information of the result on the blockchain, corresponding to one transaction; the signature contract is used to store the certificate information of the result on the blockchain, corresponding to one transaction; the conversion contract is used to record the conversion information of the ownership and usage rights of the result, corresponding to one transaction. Figure 3 As shown, in transaction chain A, the transaction block corresponding to "transaction block j hash" records the stage information of project creation for result A. This transaction block calls the minting contract to generate a smart contract that can be automatically executed and stored by the blockchain, representing "project creation of result A." Similarly, the transaction block corresponding to "transaction block j+1 hash" records updated data information after the creation of result A. This transaction block calls the value-added contract to generate a smart contract that can be automatically executed and stored by the blockchain, representing "updated project data of result A." Furthermore, in transaction chain B, the transaction block corresponding to "transaction block k+2 hash" records that the stage information of result B references the stage information of result A, calls the value-added contract, and generates a smart contract that can be automatically executed and stored by the blockchain, representing "the reference relationship between result B and result A."
[0072] It should be noted that, Figure 3 The transaction blocks in transaction chain A or transaction chain B shown in the diagram call different contract types to generate corresponding smart contracts and store them in the transaction body. When the smart contract is triggered, the contract fulfills the transaction, and the stage information corresponding to the transaction is recorded on the blockchain.
[0073] Furthermore, the next stage information corresponding to the result is determined based on the union of the previous stage information and the updated data, and the validity of the invalid stage information in the union is set to zero; when the smart contract is triggered, the information content is stored in the blockchain, and the validity of the stage information is non-zero.
[0074] As an optional implementation, the transaction data is updated by adding the sequence number and validity of the stage information to the transaction body. On one hand, adding new stage information is implemented as follows: New stage information is added after the last transaction block in the current time step of the transaction chain; for example, assuming the sequence number of the stage information is set according to the rules of an arithmetic sequence, if the transaction chain at the current time includes stage information with sequence numbers 100, 200, and 300, then the new stage information sequence number is 400. On the other hand, inserting new stage information is implemented as follows: The sequence number of the new stage information is calculated, and the sequence number of the new stage information is among the sequence numbers of all stage information included in the current transaction chain; for example, if the transaction chain at the current time includes stage information with sequence numbers 100 and 200, the sequence number of the new stage information is calculated using a binary insertion algorithm, then the sequence number of the new stage information is 150.
[0075] As an alternative implementation, deleting or modifying the stage information does not involve clearing the stage information from the blockchain or replacing it with modified stage information. Instead, it operates on the stage information by changing the validity of the corresponding stage information. Specifically, if deleting a single stage information, a transaction block is added to set the validity of the single stage information to zero, indicating that the single stage information is invalid. If modifying a single stage information, firstly, a transaction block is added to set the validity of the single stage information to zero; secondly, a new stage information is inserted at the position of the stage information to be modified. Furthermore, there may be relationships between the transaction chains stored in the blockchain. These relationships are reflected in the transaction block using the hash value corresponding to the stage information sequence number, which is used to identify validity. Figure 3 As shown, transaction block k+2 of transaction chain B corresponding to result B references transaction block j+2 of transaction chain A corresponding to result A. This process demonstrates the reference relationship between transaction chain B and transaction chain A. The hash value of the referenced transaction block j+2 is recorded in the transaction body of transaction chain B, which is used to identify the stage information referencing other results, in a way that reflects the validity of the stage information sequence number. In short, the validity of the stage information includes setting it to zero, setting it to non-zero, and hash value. Setting it to non-zero indicates that the validity is marked as 1.
[0076] S230. Based on the mapping relationship, call and display part or all of the stage information of the single result in the blockchain.
[0077] Specifically, a state database is established based on the stage information of the individual achievement; the block is updated based on the stage information uploaded to the blockchain, and the update result is synchronized to the state database; some or all of the stage information of the individual achievement in the blockchain is called and displayed based on the state database and the mapping relationship.
[0078] The state database is created based on the corresponding transaction chain of the outcome. It is used to reorganize the transaction chain information based on a relational database, employing synchronization and deployment with the same information within the blockchain to achieve rapid querying of partial or complete stage information for a single outcome within the blockchain. The display of partial or complete stage information depends on the user's query request and the outcome's generation status. For example, if the outcome's generation status is still in the data update stage and has not yet reached the stages of outcome generation and initial rights confirmation, then based on the user's query request, only partial stage information corresponding to the current generation status of the outcome can be displayed, and not all stage information of the outcome after the current moment.
[0079] Optionally, the block where the stage information will be stored is determined based on the timestamp, and the block height of the block is recorded. The position of the stage information in the blockchain is then queried based on the block height.
[0080] This invention discloses a method for protecting research results throughout their entire lifecycle based on blockchain. The method includes: acquiring stage information of each research result uploaded to the blockchain, the stage information including information content and timestamps; storing the corresponding information content in a chain-like manner in the blockchain according to the chronological order of the timestamps, with a mapping relationship existing between the stage information of individual research results based on the chronological order of their corresponding timestamps; and retrieving and displaying some or all of the stage information of a single research result in the blockchain according to the mapping relationship. By employing the technical solution of this invention, the stage information corresponding to each individual research result is stored in a chain-like manner in the blockchain according to the mapping relationship, thus achieving protection of the research result's data throughout its entire lifecycle and enabling rapid querying of the stage information, improving query efficiency. Furthermore, by improving the blockchain data structure, every data update of the research result can be recorded, facilitating traceability.
[0081] Example 2
[0082] According to an embodiment of the present invention, a schematic diagram of a blockchain-based full lifecycle results protection device is provided. This device can execute the blockchain-based full lifecycle results protection method provided in Embodiment 1 above. Figure 4As shown, the device includes: an acquisition module 410, a storage module 420, and a recall module 430. Wherein:
[0083] The acquisition module 410 is used to acquire the stage information of each result being uploaded to the blockchain. The stage information includes information content and timestamp.
[0084] The storage module 420 is used to store the corresponding information content in the blockchain in the order of timestamps, and there is a mapping relationship between the stage information of a single result according to the order of the corresponding timestamps.
[0085] The calling module 430 is used to call and display part or all of the stage information of the single result in the blockchain according to the mapping relationship.
[0086] Optionally, the storage module 420 includes:
[0087] The first unit is used to symmetrically encrypt the stage information and generate a symmetric key;
[0088] The second unit is used to perform secondary encryption of the symmetric key based on the user's public key;
[0089] The third unit is used to chain the information content of the stage information corresponding to the results in the blockchain according to the order of the timestamps, and a single block of the blockchain includes stage information corresponding to multiple results.
[0090] Furthermore, the storage module 420 also includes:
[0091] The first computing unit is used to encrypt the initial stage information of the single result according to the hash algorithm and generate the initial hash value of the result.
[0092] The second calculation unit is used to calculate the hash value of the next time stage information of the result based on the initial hash value;
[0093] A linking unit is used to link adjacent time-series information in a single outcome in the blockchain using the hash value, wherein the hash value corresponding to each stage information uniquely identifies the information content corresponding to the stage information in the outcome.
[0094] Optionally, the device further includes: a determining unit, specifically configured to determine the block where the stage information will be stored based on the timestamp, record the block height of the block, and query the position of the stage information in the blockchain based on the block height.
[0095] Optionally, the calling module 430 includes:
[0096] A establishment unit is used to establish a status database based on the stage information of the individual result;
[0097] An update unit is used to update the block according to the phase information uploaded in the blockchain, and to synchronize the update result to the state database;
[0098] The invocation unit is used to invoke and display part or all of the stage information of the single result in the blockchain according to the state database and the mapping relationship.
[0099] Optionally, the storage module 420 is specifically used to: generate the information content based on the sequence number of the stage information, the contract type corresponding to the sequence number, and the validity of the stage information, and generate a corresponding smart contract based on the contract type; record the update data of the stage information under different timestamps of the achievement by marking the validity of the stage information, wherein the update data includes adding new stage information, inserting new stage information, deleting or modifying the stage information, and referencing stage information of other achievements.
[0100] Furthermore, the next stage information corresponding to the result is determined based on the union of the previous stage information and the updated data, and the validity of the invalid stage information in the union is set to zero; when the smart contract is triggered, the information content is stored in the blockchain, and the validity of the stage information is non-zero.
[0101] This invention discloses a blockchain-based device for protecting achievements throughout their entire lifecycle. The device includes: an acquisition module for acquiring stage information of each achievement uploaded to the blockchain, the stage information including information content and timestamps; a storage module for storing the corresponding information content in a chain-like manner in the blockchain according to the chronological order of the timestamps, with a mapping relationship existing between the stage information of individual achievements based on the chronological order of their corresponding timestamps; and a retrieval module for retrieving and displaying some or all of the stage information of a single achievement in the blockchain according to the mapping relationship. By employing the technical solution of this invention, the stage information corresponding to each individual achievement is stored in a chain-like manner in the blockchain according to the mapping relationship, achieving protection of the achievement's data throughout its entire lifecycle. Furthermore, it enables rapid querying of the achievement's stage information, improving query efficiency. Through improvements to the blockchain data structure, every data update of the achievement can be recorded, facilitating traceability.
[0102] Example 3
[0103] The following is for reference. Figure 5This document illustrates a structural diagram of an electronic device 500 suitable for implementing embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0104] like Figure 5 As shown, electronic device 500 may include processing device 510, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 520 or a program loaded from storage device 580 into random access memory (RAM) 530. Processing device 510 may be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processing device 510 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processing device 510 performs the various methods and processes described above.
[0105] The RAM 530 also stores various programs and data required for the operation of the electronic device 500. The processing device 510, ROM 520, and RAM 530 are interconnected via bus 540. The input / output (I / O) interface 550 is also connected to bus 540.
[0106] Typically, the following devices can be connected to I / O interface 550: input devices 560 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 570 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 580 including, for example, magnetic tapes, hard disks, etc.; and communication devices 590. Communication device 590 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0107] Specifically, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 590, or installed from a storage device 580, or installed from a ROM 520. When the computer program is executed by the processing device 510, it performs the functions defined in the methods of the embodiments of the present invention. Alternatively, in other embodiments, the processing device 510 can be configured by any other suitable means (e.g., by means of firmware) to perform the method: acquiring stage information of each result uploaded to the blockchain, the stage information including information content and timestamps; storing the corresponding information content in the blockchain in a chain according to the chronological order of the timestamps, wherein there is a mapping relationship between the stage information of individual results according to the chronological order of the corresponding timestamps; and calling and displaying part or all of the stage information of the individual result in the blockchain according to the mapping relationship.
[0108] Example 4
[0109] The computer-readable medium described above in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0110] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0111] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0112] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the electronic device to: acquire stage information of each achievement uploaded to the blockchain, the stage information including information content and timestamps; store the corresponding information content in the blockchain in a chain according to the chronological order of the timestamps, and there is a mapping relationship between the stage information of individual achievements according to the chronological order of the corresponding timestamps; and call and display part or all of the stage information of the individual achievement in the blockchain according to the mapping relationship.
[0113] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0115] The modules described in the embodiments of the present invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.
[0116] The functions described above herein can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof, etc.
[0117] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0118] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0119] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0120] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0121] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem that addresses the management difficulties and weak business scalability inherent in traditional physical hosting and VPS services. Servers can also be servers for distributed systems or servers integrated with blockchain technology.
[0122] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0123] Cloud computing refers to a technology system that enables access to a shared pool of physical or virtual resources via a network. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for applications such as artificial intelligence and blockchain, as well as for model training.
[0124] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided by this invention can be achieved, and this is not limited herein.
[0125] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for protecting the results of blockchain throughout its entire lifecycle, characterized in that: The method includes: Obtain the stage information of each result uploaded to the blockchain, wherein the stage information includes information content and timestamp; The corresponding information content is stored in a chain in the blockchain according to the order of the timestamps, and there is a mapping relationship between the stage information of a single result according to the order of the corresponding timestamps. Based on the mapping relationship, the system retrieves and displays some or all of the stage information of the individual result in the blockchain; The mapping relationship includes: The initial stage information of the single result is encrypted using a hash algorithm to generate the initial hash value of the result; Calculate the hash value of the next time-stage information of the result based on the initial hash value; In the blockchain, the hash value links the stage information of adjacent moments in a single result, wherein the hash value corresponding to each stage information uniquely identifies the information content corresponding to the stage information in the result; The step of calling and displaying some or all of the stage information of the single result in the blockchain according to the mapping relationship includes: A status database is established based on the information from each stage of the individual deliverable; The block is updated based on the phase information uploaded to the blockchain, and the update result is synchronized to the state database; Based on the state database and the mapping relationship, the system retrieves and displays some or all of the stage information of the individual result in the blockchain; The information content stored in the blockchain in a chain includes: The information content is generated based on the sequence number of the stage information, the contract type corresponding to the sequence number, and the validity of the stage information, and a corresponding smart contract is generated based on the contract type. The validity of the stage information is recorded by marking the update data of the stage information at different timestamps of the achievement. The update data includes adding new stage information, inserting new stage information, deleting or modifying the stage information, and referencing stage information of other achievements. The method further includes: The next stage information corresponding to the result is determined based on the union of the previous stage information and the updated data, and the validity of the invalid stage information in the union is set to zero; when the smart contract is triggered, the information content is stored in the blockchain, and the validity of the stage information is non-zero.
2. The method according to claim 1, characterized in that, The step of storing the corresponding information content in a chain-like manner in the blockchain according to the chronological order of timestamps includes: The stage information is symmetrically encrypted to generate a symmetric key; The symmetric key is then encrypted a second time using the user's public key; The information content of the stage information corresponding to the results is stored in a chain in the blockchain according to the chronological order of the timestamps, and a single block of the blockchain includes stage information corresponding to multiple results.
3. The method according to claim 1, characterized in that, The method further includes: The block where the stage information will be stored is determined based on the timestamp, and the block height of the block is recorded. The position of the stage information in the blockchain is then queried based on the block height.
4. A blockchain-based full lifecycle results protection device, characterized in that: The device includes: The acquisition module is used to acquire the stage information of each result being uploaded to the blockchain. The stage information includes information content and timestamp. The storage module is used to store the corresponding information content in the blockchain in chronological order according to the timestamps. There is a mapping relationship between the stage information of a single result according to the chronological order of the corresponding timestamps. The calling module is used to call and display some or all of the stage information of the single result in the blockchain according to the mapping relationship; The storage module further includes: The first computing unit is used to encrypt the initial stage information of the single result according to the hash algorithm and generate the initial hash value of the result. The second calculation unit is used to calculate the hash value of the next time stage information of the result based on the initial hash value; A linking unit is used to link adjacent time-series stage information in a single outcome through the hash value in the blockchain, wherein the hash value corresponding to each stage information uniquely identifies the information content corresponding to the stage information in the outcome; The calling module includes: A establishment unit is used to establish a status database based on the stage information of the individual result; An update unit is used to update the block according to the phase information uploaded in the blockchain, and to synchronize the update result to the state database; The invocation unit is used to invoke and display part or all of the stage information of the single result in the blockchain according to the state database and the mapping relationship; The storage module is specifically used for: The information content is generated based on the sequence number of the stage information, the contract type corresponding to the sequence number, and the validity of the stage information, and a corresponding smart contract is generated based on the contract type. The validity of the stage information is recorded by marking the update data of the stage information at different timestamps of the achievement. The update data includes adding new stage information, inserting new stage information, deleting or modifying the stage information, and referencing stage information of other achievements. Also includes: The next stage information corresponding to the result is determined based on the union of the previous stage information and the updated data, and the validity of the invalid stage information in the union is set to zero; when the smart contract is triggered, the information content is stored in the blockchain, and the validity of the stage information is non-zero.
5. The apparatus according to claim 4, characterized in that, The storage module includes: The first unit is used to symmetrically encrypt the stage information and generate a symmetric key; The second unit is used to perform secondary encryption of the symmetric key based on the user's public key; The third unit is used to chain the information content of the stage information corresponding to the results in the blockchain according to the order of the timestamps, and a single block of the blockchain includes stage information corresponding to multiple results.
6. An electronic device, comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to implement the method as described in any one of claims 1-3.
7. A computer-readable storage medium, wherein, The computer-readable storage medium includes computer instructions for causing the computer to perform the method according to any one of claims 1-3.