[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109271559B - Method and device for modifying data in blockchain and electronic equipment - Google Patents

Method and device for modifying data in blockchain and electronic equipment Download PDF

Info

Publication number
CN109271559B
CN109271559B CN201810956191.7A CN201810956191A CN109271559B CN 109271559 B CN109271559 B CN 109271559B CN 201810956191 A CN201810956191 A CN 201810956191A CN 109271559 B CN109271559 B CN 109271559B
Authority
CN
China
Prior art keywords
data
blockchain
read
user
decrypted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810956191.7A
Other languages
Chinese (zh)
Other versions
CN109271559A (en
Inventor
晏湘涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810956191.7A priority Critical patent/CN109271559B/en
Publication of CN109271559A publication Critical patent/CN109271559A/en
Application granted granted Critical
Publication of CN109271559B publication Critical patent/CN109271559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application provides a method and a device for modifying data in a blockchain and electronic equipment, which are applied to the field of blockchain order. The method comprises the following steps: and reading data to be read from the blockchain, decrypting the read data, checking the decrypted data, pushing a checking result for the decrypted data containing the corrected data when the checking for the decrypted data fails, and writing the corrected data into the blockchain. The embodiment of the application realizes the modification of the data stored in the blockchain.

Description

Method and device for modifying data in blockchain and electronic equipment
Technical Field
The application relates to the technical field of blockchains, in particular to a method and device for modifying data in a blockchain and electronic equipment.
Background
With the development of information technology, the blockchain technology also develops, and the blockchain is a novel application mode of computer technology such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and is an decentralized database in nature. The blockchain is also a string of data blocks associated using cryptography, each of which may be used to store data, e.g., corresponding related data of a Software-as-a-Service (SAAS) application may be stored into the data blocks of the blockchain.
The data written in the common blockchain is not allowed to be modified, but in actual operation, there are some situations that cause problems of the data stored in the blockchain, and the data stored in the blockchain needs to be modified, for example, due to imperfect or wrong rules of the SAAS application itself, related data generated by the SAAS application stored in the blockchain needs to be modified, so how to modify the data stored in the blockchain becomes a problem.
Disclosure of Invention
The application provides a method and a device for modifying data in a blockchain and electronic equipment, which are used for solving the problem that the data stored in the blockchain cannot be modified.
In a first aspect, a method of modifying data in a blockchain is provided, the method comprising:
reading data to be read from the block chain, and decrypting the read data;
Verifying the decrypted data;
pushing a verification result for the decrypted data when verification of the decrypted data fails, wherein the verification result for the decrypted data comprises the following steps: corrected data;
and writing the corrected data into a block chain.
In a second aspect, there is provided an apparatus for modifying data in a blockchain, the apparatus comprising:
The reading module is used for reading data to be read from the block chain;
The decryption module is used for decrypting the data read by the reading module;
the verification module is used for verifying the data decrypted by the decryption module;
The pushing module is configured to push a verification result for the decrypted data when the verification module fails to verify the decrypted data, where the verification result for the decrypted data includes: corrected data;
And the writing module is used for writing the corrected data pushed by the pushing module into a blockchain.
In a third aspect, an electronic device is provided, the electronic device comprising:
One or more processors;
A memory;
One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to: a method of modifying data in a blockchain as shown in the first aspect is performed.
In a fourth aspect, a computer readable storage medium is provided having stored thereon a computer program which when executed by a processor implements the method of modifying data in a blockchain as shown in the first aspect.
Compared with the prior art, the embodiment of the application reads the data to be read from the blockchain, decrypts the read data, then verifies the decrypted data, and pushes a verification result for the decrypted data when the verification for the decrypted data fails, wherein the verification result for the decrypted data comprises the following steps: the corrected data is then written into the blockchain. In the embodiment of the application, when the verification of the data read from the blockchain fails, the verification result containing the corrected data is pushed and the corrected data is in the blockchain, so that the data stored in the blockchain can be modified.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a flow chart of a method for modifying data in a blockchain according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an apparatus for modifying data in a blockchain according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another apparatus for modifying data in a blockchain according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of an electronic device for modifying data in a blockchain according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example 1
An embodiment of the present application provides a method for modifying data in a blockchain, as shown in fig. 1, the method includes:
Step S101, reading data to be read from a block chain.
For the embodiment of the present application, the data to be read from the blockchain may be data to be used in the SAAS application. In the embodiment of the application, the SAAS provider builds all network infrastructures, software and hardware operation platforms required by informatization for enterprises and is responsible for a series of services such as implementation in all earlier stages, maintenance in later stages and the like, and the enterprises can use the information system through the Internet without purchasing software and hardware, building a machine room and recruiting IT personnel. The enterprise leases the software service to the SAAS provider according to the actual requirement, wherein the software service leased from the SAAS is the SAAS application service.
For the embodiment of the application, after the data to be read is read from the blockchain, the read data is stored locally.
Step S102, the read data is decrypted.
For the embodiment of the application, the data stored locally is decrypted by using the secret key. In the embodiment of the application, the locally stored secret key or the secret key input by the user can be obtained locally.
For the embodiment of the application, if the read data is the data required to be used by the SAAS application, the SAAS application can guide the user to decrypt the locally read data by using the locally stored secret key in an interface mode, and the read form displays the decrypted read data.
Step S103, verifying the decrypted data.
For the embodiment of the application, if the read data is the data needed by SAAS application, the data after decryption is verified based on the SAAS application of the existing data verification rule.
Step S104, pushing a verification result aiming at the decrypted data when the verification of the decrypted data fails.
Wherein the verification result for the decrypted data includes: corrected data.
For the embodiment of the application, the verification result for the decrypted data further comprises: at least one of data of verification failure and reasons of verification failure.
For the embodiment of the application, if the data read from the blockchain is data corresponding to SAAS application, when verification of the decrypted data fails, a correction button is displayed on the interface, and the data which fails to be verified currently, the reason of the verification failure and the corrected data are displayed on the interface. In the embodiment of the application, when the user is detected to trigger the correction button, the data with the verification failure is corrected to the corrected data.
For example, the decrypted data is checked by the SAAS system, and when the check fails, the data of the check failure, the corrected data and the reason of the check failure are displayed by the SAAS application. In the embodiment of the application, the SAAS tenant can confirm whether to correct according to the reasons of the verification failure by displaying the data of the verification failure, the corrected data corresponding to the data of the verification failure and the reasons of the verification failure, so that the accuracy of correcting the data stored in the blockchain can be improved, and the user experience can be further improved.
For the embodiment of the application, when the decrypted data is successfully checked, a first prompt message of successful check is pushed. The first prompt message of successful verification is used for prompting successful verification of the decrypted data. In the embodiment of the application, the data carrying the verification success of the specific identifier is broadcast to any node in the blockchain for verification, and the blockchain is written after the verification is passed.
For the embodiment of the application, when the user is detected to carry out service operation by using the data with verification failure, the second prompt message is pushed. The second prompting message is used for prompting that the user cannot use the data which fails to correct to perform service operation currently.
Step S105, writing the corrected data into the block chain.
Compared with the prior art, the embodiment of the application reads the data to be read from the blockchain, decrypts the read data, then verifies the decrypted data, and pushes a verification result aiming at the decrypted data when the verification of the decrypted data fails, wherein the verification result aiming at the decrypted data comprises the following steps: the corrected data is then written into the blockchain. In the embodiment of the application, when the verification of the data read from the blockchain fails, the verification result containing the corrected data is pushed and the corrected data is in the blockchain, so that the data stored in the blockchain can be modified.
Example two
Another possible implementation manner of the embodiment of the present application further includes, on the basis of the first embodiment, the operations shown in the second embodiment, where,
Step S101 includes step S1011 (not labeled in the figure) and step S1012 (not labeled in the figure), wherein
Step S1011, based on the read instruction triggered by the user, determining the data to be read.
Step S1012, reading data to be read from the blockchain.
For the embodiment of the application, the data to be read is read from the block chain through a consensus algorithm provided by a consensus mechanism; and/or determining a super node for reading the data to be read, and reading the data to be read from the super node.
Wherein the consensus mechanism comprises: ethernet, enterprise management system (ENTERPRISE OPERATION SYSTEM, EOS), document coin (FileCoin).
Step S102 includes step S1021 (not labeled in the figure) and step S1022 (not labeled in the figure), wherein,
Step S1021, obtaining the secret key corresponding to the read data.
Step S1022 decrypts the read data based on the obtained key.
For the embodiment of the application, because the data stored in the blockchain is written into the blockchain after being encrypted locally by a user based on the key of the user, after the data is read from the blockchain, the read data can be used after the read data is decrypted by utilizing the key stored locally or the key input by the user.
For the embodiment of the application, the data read from the blockchain is decrypted locally by utilizing the locally stored secret key, namely the secret key for decrypting the data read from the blockchain and the decrypted data are stored on the tenant local computer, so that the data can be prevented from being acquired by an operator of SAAS application, and the safety of a user can be further improved.
Example III
The embodiment of the application provides another possible implementation manner, and further comprises the method shown in the third embodiment on the basis of the first embodiment, wherein,
Step S105 includes step S1051 (not labeled in the figure) and step S1052 (not labeled in the figure), wherein,
Step S1051, when the editing operation instruction triggered by the user is detected, signature information input by the user is acquired.
Specifically, detecting an edit operation instruction triggered by a user, and acquiring signature information input by the user, including:
Pushing a third prompt message when an editing operation instruction triggered by a user is detected, and receiving signature information input by the user; and/or the number of the groups of groups,
When an editing operation instruction triggered by a user is detected, signature information input by the user is directly received; and/or the number of the groups of groups,
When the editing operation instruction triggered by the user is detected, signature information input by the user is searched and obtained from the local storage.
The third prompting message is used for prompting the user to input signature information.
Step S1052, checking the signature information input by the user, and writing the corrected data into the blockchain when the verification is passed.
For the embodiment of the application, the verification of the signature information input by the user comprises the following steps: and verifying the signature information input by the user by using the obtained public key. In an embodiment of the present application, writing corrected data into a blockchain includes: the encrypted modified data is obtained and the obtained encrypted modified data is written into the blockchain.
For the embodiment of the application, the signature information input by the user is signed based on the private key, and when the signature information input by the user is decrypted through the corresponding public key and the decryption is successful, the verification is successfully represented. In the embodiment of the application, when the correction is successful, the SAAS system automatically corrects the data which is failed to be verified into corrected data.
For the embodiment of the application, the corrected data written into the blockchain is obtained by local encryption by SAAS users by using a private key.
For the embodiment of the application, the signature information input by the user is verified, when the verification is passed, the data is corrected, and the corrected data is written into the blockchain, namely, the user needs to sign by using a secret key before the correction, so that the SAAS application and the blockchain determine that the user has control right on the data, and the correction operation is the correction operation confirmed and initiated by the user.
Example IV
Another possible implementation manner of the embodiment of the present application further includes the operations shown in the fourth embodiment on the basis of the first embodiment or the third embodiment, where,
Step S105 is followed by step S106 (not labeled in the figure), wherein,
Step S106, broadcasting the data before correction and the data state corresponding to the data before correction to each super node in the block chain so that each super node in the block chain marks the state of the data before correction as invalid.
Wherein, the data state corresponding to the data before correction is an invalid state.
For the embodiment of the application, when SAAS service operation is performed through the data stored in the blockchain, the latest recorded effective data is determined according to the data state of the data stored in the blockchain, and SAAS service operation is performed through the determined latest recorded effective data. In the embodiment of the application, the data with invalid state identification is still stored in the data chain, but cannot be used for SAAS service operation.
For embodiments of the present application, data whose status is identified as invalid is still saved to the history block saved to the blockchain.
According to the embodiment of the application, after the read data is corrected, the state of the data stored in the blockchain before the correction is marked as invalid, so that the corrected data can be read without misread when the corresponding operation is performed by using the blockchain data, the accuracy of the corresponding operation by using the data stored in the blockchain can be improved, and the user experience can be further improved.
Example five
An embodiment of the present application provides an apparatus for modifying data in a blockchain, as shown in fig. 2, the apparatus 20 for modifying data in a blockchain may include: a reading module 201, a decrypting module 202, a verifying module 203, a pushing module 204, a writing module 205, wherein,
The reading module 201 is configured to read data to be read from the blockchain.
A decryption module 202, configured to decrypt the data read by the reading module 201.
And the verification module 203 is configured to verify the data decrypted by the decryption module 202.
And the pushing module 204 is configured to push a verification result for the decrypted data when the verification module 203 fails to verify the decrypted data.
Wherein the verification result for the decrypted data includes: corrected data.
A writing module 205, configured to write the corrected data pushed by the pushing module 204 into the blockchain.
Compared with the prior art, the embodiment of the application reads the data to be read from the blockchain, decrypts the read data, then verifies the decrypted data, and pushes a verification result aiming at the decrypted data when the verification of the decrypted data fails, wherein the verification result aiming at the decrypted data comprises the following steps: the corrected data is then written into the blockchain. In the embodiment of the application, when the verification of the data read from the blockchain fails, the verification result containing the corrected data is pushed and the corrected data is in the blockchain, so that the data stored in the blockchain can be modified.
The device for modifying data in a blockchain according to the embodiment of the present application may implement the method for modifying data in a blockchain according to the first embodiment of the present application, and the implementation principle is similar, and will not be described herein.
Example six
As shown in fig. 3, the apparatus for modifying data in a blockchain 30 according to another embodiment of the present application may include: a reading module 301, a decrypting module 302, a verifying module 303, a pushing module 304, a writing module 305, wherein,
The reading module 301 is configured to read data to be read from the blockchain.
Wherein the reading module 301 in fig. 3 is identical or similar in function to the reading module 201 in fig. 2.
A decryption module 302, configured to decrypt the data read by the reading module 301.
Wherein decryption module 302 in fig. 3 is identical or similar in function to decryption module 202 in fig. 2.
And the verification module 303 is configured to verify the data decrypted by the decryption module 302.
Wherein the verification module 303 in fig. 3 is the same as or similar to the function of the verification module 203 in fig. 2.
And the pushing module 304 is configured to push a verification result for the decrypted data when the verification module 303 fails to verify the decrypted data.
Wherein the push module 304 in fig. 3 is the same or similar in function to the push module 204 in fig. 2.
Wherein the verification result for the decrypted data includes: corrected data.
Wherein the verification result for the decrypted data further comprises: at least one of the data and the reasons for the verification failure.
For the embodiment of the application, the SAAS tenant can confirm whether to correct according to the reasons of the verification failure by displaying the data of the verification failure, the corrected data corresponding to the data of the verification failure and the reasons of the verification failure, so that the accuracy of correcting the data stored in the blockchain can be improved, and the user experience can be further improved.
A writing module 305, configured to write the corrected data pushed by the pushing module 304 into the blockchain.
Wherein the writing module 305 in fig. 3 is the same as or similar to the function of the writing module 205 in fig. 2.
Further, as shown in fig. 3, the writing module 305 includes: an acquisition unit 3051, a verification unit 3052, a writing unit 3053, wherein,
And the acquiring unit 3051 is used for acquiring signature information input by a user when the editing operation instruction triggered by the user is detected.
And a verification unit 3052, configured to verify the signature information input by the user and acquired by the acquisition unit 3051.
And a writing unit 3053 for writing the corrected data into the blockchain when the verification unit 3052 verifies the pass.
The verification unit 3052 is specifically configured to verify the signature information input by the user by using the obtained public key.
The writing unit 3053 is specifically configured to obtain encrypted modified data, and write the obtained encrypted modified data into the blockchain.
For the embodiment of the application, the signature information input by the user is verified, when the verification is passed, the data is corrected, and the corrected data is written into the blockchain, namely, the user needs to sign by using a secret key before the correction, so that the SAAS application and the blockchain determine that the user has control right on the data, and the correction operation is the correction operation confirmed and initiated by the user.
Further, as shown in FIG. 3, the means 30 for modifying data in the blockchain further includes: a broadcast module 306, wherein,
The broadcasting module 306 is configured to broadcast the data before modification and the data state corresponding to the data before modification to each super node in the blockchain, so that each super node in the blockchain identifies the state of the data before modification as invalid.
Wherein, the data state corresponding to the data before correction is an invalid state.
According to the embodiment of the application, after the read data is corrected, the state of the data stored in the blockchain before the correction is marked as invalid, so that the corrected data can be read without misread when the corresponding operation is performed by using the blockchain data, the accuracy of the corresponding operation by using the data stored in the blockchain can be improved, and the user experience can be further improved.
Further, as shown in fig. 3, the reading module 301 includes: a determining unit 3011, a reading unit 3012, wherein,
A determining unit 3011, configured to determine data to be read based on a read instruction triggered by a user.
And a reading unit 3012 for reading the data to be read determined by the determining unit 3011 from the blockchain.
Specifically, the decryption module 302 is specifically configured to obtain a key corresponding to the read data.
The decryption module 302 is specifically further configured to decrypt the read data based on the obtained key.
For the embodiment of the application, the data read from the blockchain is decrypted locally by utilizing the locally stored secret key, namely the secret key for decrypting the data read from the blockchain and the decrypted data are stored on the tenant local computer, so that the data can be prevented from being acquired by an operator of SAAS application, and the safety of a user can be further improved.
Specifically, the reading module 301 is specifically configured to read data to be read from the blockchain through a consensus algorithm provided by a consensus mechanism.
Specifically, the reading module 301 is specifically configured to determine a supernode that reads data to be read, and read the data to be read from the supernode.
Compared with the prior art, the embodiment of the application reads the data to be read from the blockchain, decrypts the read data, then verifies the decrypted data, and pushes a verification result aiming at the decrypted data when the verification of the decrypted data fails, wherein the verification result aiming at the decrypted data comprises the following steps: the corrected data is then written into the blockchain. In the embodiment of the application, when the verification of the data read from the blockchain fails, the verification result containing the corrected data is pushed and the corrected data is in the blockchain, so that the data stored in the blockchain can be modified.
The apparatus for modifying data in a blockchain according to this embodiment may execute the method for modifying data in a blockchain according to any of the first to fourth embodiments of the present application, and the implementation principle is similar, and will not be described here again.
Example seven
An embodiment of the present application provides an electronic device, as shown in fig. 4, an electronic device 4000 shown in fig. 4 includes: a processor 4001 and a memory 4003. Wherein the processor 4001 is coupled to the memory 4003, such as via a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004. It should be noted that, in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The processor 4001 is applied to the embodiment of the present application, and is configured to implement the functions of the reading module, the decryption module, the verification module, the pushing module, the writing module shown in fig. 2 or fig. 3, and the broadcasting module shown in fig. 3, where the transceiver 4004 includes a receiver and a transmitter.
The processor 4001 may be a CPU, general purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor 4001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 4002 may include a path to transfer information between the aforementioned components. Bus 4002 may be a PCI bus or an EISA bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
The memory 4003 may be, but is not limited to, ROM or other type of static storage device that can store static information and instructions, RAM or other type of dynamic storage device that can store information and instructions, EEPROM, CD-ROM or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 4003 is used for storing application program codes for executing the inventive arrangements, and is controlled to be executed by the processor 4001. The processor 4001 is configured to execute application code stored in the memory 4003 to perform the actions of the apparatus for modifying data in a blockchain provided by the embodiments shown in fig. 2 or 3.
Compared with the prior art, the embodiment of the application reads the data to be read from the block chain, decrypts the read data, then verifies the decrypted data, and pushes a verification result aiming at the decrypted data when the verification of the decrypted data fails, wherein the verification result aiming at the decrypted data comprises the following steps: the corrected data is then written into the blockchain. In the embodiment of the application, when the verification of the data read from the blockchain fails, the verification result containing the corrected data is pushed and the corrected data is in the blockchain, so that the data stored in the blockchain can be modified.
The embodiment of the application provides electronic equipment which is suitable for any embodiment of the method. And will not be described in detail herein.
The present application provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, implements the method shown in any of the first to fourth embodiments.
Compared with the prior art, the embodiment of the application reads the data to be read from the block chain, decrypts the read data, then verifies the decrypted data, and pushes the verification result aiming at the decrypted data when the verification of the decrypted data fails, wherein the verification result aiming at the decrypted data comprises the following steps: the corrected data is then written into the blockchain. In the embodiment of the application, when the verification of the data read from the blockchain fails, the verification result containing the corrected data is pushed and the corrected data is in the blockchain, so that the data stored in the blockchain can be modified.
Embodiments of the present application provide a computer readable storage medium suitable for use in any of the above-described method embodiments. And will not be described in detail herein.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (8)

1. A method of modifying data in a blockchain, comprising:
reading data to be read from the block chain, and decrypting the read data;
Verifying the decrypted data;
pushing a verification result for the decrypted data when verification of the decrypted data fails, wherein the verification result for the decrypted data comprises the following steps: corrected data;
Writing the corrected data into a blockchain;
The decrypting the read data includes:
Obtaining a secret key corresponding to the read data from the local or obtaining a secret key input by a user;
Decrypting the read data based on the obtained key;
The decrypting the read data based on the obtained key includes:
If the read data is the data required to be used by the SAAS application, the SAAS application guides a user to decrypt the read data by using a local secret key in an interface mode, and the decrypted read data is displayed in a reading mode;
The verification result for the decrypted data further includes at least one of:
checking the data which fail; the reason for the failure of verification;
The writing of the modified data into the blockchain includes:
When an editing operation instruction triggered by a user is detected, signature information input by the user is obtained;
checking signature information input by a user, and writing the corrected data into a block chain when the verification is passed;
The verifying the signature information input by the user comprises the following steps:
verifying the signature information input by the user by using the obtained public key;
The writing of the modified data into the blockchain includes:
The encrypted modified data is obtained and the obtained encrypted modified data is written into the blockchain.
2. The method of any of claims 1, wherein writing the modified data into the blockchain is followed by:
Broadcasting the data before correction and the data state corresponding to the data before correction to each super node in the block chain so that each super node in the block chain marks the state of the data before correction as invalid, and the data state corresponding to the data before correction as invalid.
3. The method of claim 1, wherein reading data to be read from the blockchain includes:
Determining data to be read based on a reading instruction triggered by a user;
And reading the data to be read from the block chain.
4. The method of claim 1, wherein reading data to be read from the blockchain includes:
And reading the data to be read from the blockchain through a consensus algorithm provided by a consensus mechanism.
5. The method of claim 1, wherein reading data to be read from the blockchain includes:
And determining a super node for reading the data to be read, and reading the data to be read from the super node.
6. An apparatus for modifying data in a blockchain, comprising:
The reading module is used for reading data to be read from the block chain;
The decryption module is used for decrypting the data read by the reading module;
the verification module is used for verifying the data decrypted by the decryption module;
The pushing module is configured to push a verification result for the decrypted data when the verification module fails to verify the decrypted data, where the verification result for the decrypted data includes: corrected data;
the writing module is used for writing the corrected data pushed by the pushing module into a blockchain;
The decrypting the data read by the reading module includes:
Obtaining a secret key corresponding to the read data from the local or obtaining a secret key input by a user;
Decrypting the read data based on the obtained key;
The decrypting the read data based on the obtained key includes:
If the read data is the data required to be used by the SAAS application, the SAAS application guides a user to decrypt the read data by using a local secret key in an interface mode, and the decrypted read data is displayed in a reading mode;
The verification result for the decrypted data further includes at least one of:
checking the data which fail; the reason for the failure of verification;
The writing the corrected data pushed by the pushing module into a blockchain includes:
When an editing operation instruction triggered by a user is detected, signature information input by the user is obtained;
Checking signature information input by a user, and writing the corrected data pushed by the pushing module into a blockchain when the verification is passed;
The verifying the signature information input by the user comprises the following steps:
verifying the signature information input by the user by using the obtained public key;
The writing the corrected data pushed by the pushing module into a blockchain includes:
and acquiring encrypted corrected data pushed by the pushing module, and writing the acquired encrypted corrected data into a blockchain.
7. An electronic device, comprising:
One or more processors;
A memory;
One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to: a method of modifying data in a blockchain as in any of claims 1-5 is performed.
8. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the method of modifying data in a blockchain of any of claims 1-5.
CN201810956191.7A 2018-08-21 2018-08-21 Method and device for modifying data in blockchain and electronic equipment Active CN109271559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810956191.7A CN109271559B (en) 2018-08-21 2018-08-21 Method and device for modifying data in blockchain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810956191.7A CN109271559B (en) 2018-08-21 2018-08-21 Method and device for modifying data in blockchain and electronic equipment

Publications (2)

Publication Number Publication Date
CN109271559A CN109271559A (en) 2019-01-25
CN109271559B true CN109271559B (en) 2024-07-09

Family

ID=65154162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810956191.7A Active CN109271559B (en) 2018-08-21 2018-08-21 Method and device for modifying data in blockchain and electronic equipment

Country Status (1)

Country Link
CN (1) CN109271559B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112100637A (en) * 2020-09-29 2020-12-18 深圳壹账通智能科技有限公司 Encryption method, device, equipment and medium based on correction quantity
CN113783839B (en) * 2021-08-06 2023-04-07 华润数字科技有限公司 Block chain data updating method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391291A (en) * 2017-03-24 2017-11-24 北京瑞卓喜投科技发展有限公司 Modification block chain is the block chain corrigenda method and system for having block volume data
CN107463597A (en) * 2017-03-24 2017-12-12 北京瑞卓喜投科技发展有限公司 For the passive verification method and system of the block chain for changing block volume data
CN108389129A (en) * 2018-02-27 2018-08-10 阿里巴巴集团控股有限公司 Transaction based on block chain executes method and device, electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10417217B2 (en) * 2016-08-05 2019-09-17 Chicago Mercantile Exchange Inc. Systems and methods for blockchain rule synchronization
CN107967557B (en) * 2017-11-17 2021-06-22 西安电子科技大学 Modifiable credit evaluation system and method based on block chain and electronic payment system
CN108133008B (en) * 2017-12-22 2020-11-03 平安养老保险股份有限公司 Method, device, equipment and storage medium for processing service data in database

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391291A (en) * 2017-03-24 2017-11-24 北京瑞卓喜投科技发展有限公司 Modification block chain is the block chain corrigenda method and system for having block volume data
CN107463597A (en) * 2017-03-24 2017-12-12 北京瑞卓喜投科技发展有限公司 For the passive verification method and system of the block chain for changing block volume data
CN108389129A (en) * 2018-02-27 2018-08-10 阿里巴巴集团控股有限公司 Transaction based on block chain executes method and device, electronic equipment

Also Published As

Publication number Publication date
CN109271559A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
AU2019221323B2 (en) Cryptocurrency wallet and cryptocurrency account management
CN110570196B (en) Transaction data processing method, device, terminal equipment and storage medium
CN100380274C (en) Method and system for backup and restore of a context encryption key
FI125736B (en) Software controlled radio, and procedure to renew a software, and software controlled radio system
CN106357393B (en) A kind of safe data transmission method and device
US12008144B2 (en) Method and apparatus for tamper-proof storage of information in respect of object-related measures
CN102171652A (en) Method for provisioning trusted software to an electronic device
US9497189B2 (en) Method and system for verification of presence
EP2503482A1 (en) Electronic device with flash memory component
CN109754226B (en) Data management method, device and storage medium
CN111415161A (en) Block chain-based data verification method and device and computer-readable storage medium
CN110929291A (en) Method and device for accessing text file and computer readable storage medium
CN112070501B (en) Block chain transaction initiating and verifying method and system
WO2017113789A1 (en) Electronic device remote repair method, device, repaired device, and system
CN109271559B (en) Method and device for modifying data in blockchain and electronic equipment
CN111309506A (en) Method, equipment, server and readable storage medium for positioning compiling errors
KR20190126242A (en) Data transfer system and transfer method
CN111798254A (en) Tracing code generation method, device, equipment and readable storage medium
CN110740038A (en) Block chain and communication method, gateway, communication system and storage medium thereof
CN109286502B (en) Method for recovering manager lock of encryption machine and encryption machine
US11516024B2 (en) Semiconductor device, update data-providing method, update data-receiving method, and program
CN115964728A (en) File encryption method and device based on consensus algorithm
CN109981671B (en) Data processing method based on encryption machine and encryption machine
CN111628863A (en) Data signature method and device, electronic equipment and storage medium
CN110602146A (en) Data encryption and decryption method, readable storage medium and electronic equipment

Legal Events

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