CN110704392A - Block chain network upgrading method and device, storage medium and electronic equipment - Google Patents

Block chain network upgrading method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110704392A
CN110704392A CN201910781248.9A CN201910781248A CN110704392A CN 110704392 A CN110704392 A CN 110704392A CN 201910781248 A CN201910781248 A CN 201910781248A CN 110704392 A CN110704392 A CN 110704392A
Authority
CN
China
Prior art keywords
data
node
operation record
blockchain network
level
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.)
Granted
Application number
CN201910781248.9A
Other languages
Chinese (zh)
Other versions
CN110704392B (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 CN201910781248.9A priority Critical patent/CN110704392B/en
Publication of CN110704392A publication Critical patent/CN110704392A/en
Priority to PCT/CN2020/093588 priority patent/WO2021031655A1/en
Application granted granted Critical
Publication of CN110704392B publication Critical patent/CN110704392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The utility model provides an upgrading method and device of a block chain network, belonging to the technical field of data processing, the method comprises: when an upgrade request for a blockchain network is received, connecting a lower-level node of a lower-level blockchain network and a higher-level node of a higher-level blockchain network corresponding to the lower-level node, respectively; obtaining, by the lower level node, a list of data IDs of data established by the lower level node; acquiring an operation record corresponding to each data ID in the data ID list from the lower node based on the data ID list; correspondingly writing each acquired operation record into the advanced block chain network for storage; acquiring the data authority owned by the lower node from the lower node; and writing each data authority into the high-level node for storage. The method ensures the integrity of the data and is not easy to lose the data.

Description

Block chain network upgrading method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to an upgrade method for a blockchain network, an upgrade apparatus for a blockchain network, a computer-readable storage medium, and an electronic device.
Background
The block chain technology is an internet database technology and is characterized in that centralization and openness are realized, and everyone can participate in database records. Due to the particularity of data storage of the blockchain nodes, simple offline old versions and online new versions are not suitable for upgrading the blockchain system, and data on the blockchain system of the old version cannot be transferred to a blockchain of a new version due to incompatibility of data interfaces, storage formats or encryption modes, so that the data of the blockchain system is lost, and the blockchain system loses the existing significance.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
Embodiments of the present disclosure provide an upgrade method for a blockchain network, an upgrade apparatus for a blockchain network, a computer-readable storage medium, and an electronic device.
According to a first aspect of the present disclosure, there is provided a method for upgrading a blockchain network, including:
when an upgrade request for a blockchain network is received, connecting a lower-level node of a lower-level blockchain network and a higher-level node of a higher-level blockchain network corresponding to the lower-level node, respectively;
obtaining, by the lower level node, a list of data IDs of data established by the lower level node;
acquiring an operation record corresponding to each data ID in the data ID list from the lower node based on the data ID list;
correspondingly writing each acquired operation record into the advanced block chain network for storage;
acquiring the data authority owned by the lower node from the lower node;
and writing each data authority into the high-level node for storage.
In an exemplary embodiment of the disclosure, the writing each data right into the high-level node for storage includes:
according to the authorization node of each data authority, sending a corresponding authorization request to a node in the advanced block chain network corresponding to the authorization node;
and when receiving an authorization permission signal sent by the node in the advanced block chain network corresponding to the authorization node, writing the data authority into the advanced node for storage.
In an exemplary embodiment of the disclosure, the writing each data right into the high-level node for storage includes:
according to the authorization node of each data authority, sending a corresponding authorization request to a node in the advanced block chain network corresponding to the authorization node;
and when receiving an authorization permission signal sent by the node in the advanced block chain network corresponding to the authorization node, writing the data authority into the advanced node for storage.
In an exemplary embodiment of the present disclosure, after connecting the lower level node of the lower level blockchain network and the higher level node of the higher level blockchain network corresponding to the lower level node, respectively, when receiving an upgrade request for the blockchain network, further includes:
when receiving an operation request of a user to the low-level node, recording the operation content of the user to the low-level node;
when a signal that the operation content is successfully operated is received, generating a latest operation record according to the operation content and storing the latest operation record in a latest operation record list;
after writing each data authority into the high-level node for storage, the method further comprises the following steps:
writing each recent operation record in the recent operation records into the advanced block chain network in sequence;
and when a write success signal sent by the advanced block chain network for each latest operation record is received, deleting the latest operation record from the latest operation record list.
In an exemplary embodiment of the disclosure, after deleting the latest operation record from the latest operation record list when receiving a write success signal sent by the advanced blockchain network for each latest operation record, the method further includes:
when the last operation record list is detected to be empty, the lower node is deactivated, the higher node is activated, and the connection with the lower node and the higher node is disconnected.
In an exemplary embodiment of the disclosure, writing the obtained each operation record into the advanced block chain network correspondingly for storage includes:
acquiring a timestamp of each operation record;
and writing the operation content of each operation record into the node of the advanced block chain network corresponding to the operation node of the operation record for storage according to the sequence of the time stamp of each operation record.
According to a second aspect of the present disclosure, there is provided an upgrade apparatus for a blockchain network, comprising:
a connection module configured to connect a lower-level node of a lower-level blockchain network and a higher-level node of a higher-level blockchain network corresponding to the lower-level node, respectively, when an upgrade request for the blockchain network is received;
a first acquisition module configured to acquire, from the lower level node, a data ID list of data established by the lower level node;
a second obtaining module configured to obtain, from the lower level node, an operation record corresponding to each data ID in the data ID list based on the data ID list;
the first writing module is configured to correspondingly write each acquired operation record into the advanced block chain network for storage;
a third obtaining module configured to obtain, from the lower level node, a data right owned by the lower level node;
and the second writing module is configured to write each data authority into the high-level node for storage.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of upgrading a blockchain network as in any one of the above.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising:
a processor; and
a memory having a computer program stored thereon;
wherein the processor is configured to implement the method of upgrading a blockchain network as defined in any of the above via execution of the computer program.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
through the embodiments of the present disclosure, when an upgrade request for a blockchain network is received, a low-level blockchain node of a low-level blockchain network and a high-level node of a high-level blockchain network corresponding to the low-level node are connected, respectively, to connect the low-level blockchain network and the high-level blockchain network, respectively, so as to prevent failure in upgrade due to data transfer failure caused by incompatibility of data interfaces. After connection, the low-level node acquires a data ID list of the data established by the low-level node, acquires an operation record corresponding to each data ID in the data ID list from the low-level node, and correspondingly writes each operation record into the high-level block chain network for storage. And acquiring the data authority owned by the lower node from the lower node, and writing each data authority into the higher node. By acquiring the operation records and the data authority from the low-level nodes and then writing the operation records and the data authority into the high-level block chain network, the integrity of the data is ensured when the block chain network is upgraded, and the data is prevented from being lost. And a rewriting mode is adopted, so that the situation that data cannot be read due to different encryption modes of a low-level block chain network and a high-level block chain network caused by pure copying is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 is a schematic diagram illustrating an application scenario of an upgrade method for a blockchain network according to an exemplary embodiment of the present disclosure.
Fig. 2 shows a flowchart of a method for upgrading a blockchain network according to an exemplary embodiment of the present disclosure.
Fig. 3 shows a flowchart of step S203 in the method for upgrading the blockchain network of fig. 2 according to an exemplary embodiment of the present disclosure.
Fig. 4 shows a schematic block diagram of an upgrade apparatus for a blockchain network according to an exemplary embodiment of the present disclosure.
FIG. 5 shows a schematic block diagram of an electronic device according to an example embodiment of the present disclosure.
Fig. 6 illustrates a schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of an upgrade method of a blockchain network according to an exemplary embodiment of the present disclosure, as shown in the embodiment in fig. 1, showing a low-level blockchain network 100, a high-level blockchain network 200, and at least one upgrade end 300, where the low-level blockchain network 100 includes a plurality of low-level nodes 101, the high-level blockchain network 200 includes a plurality of high-level nodes 201, and the upgrade end 300 is a terminal that can be operated by a user, and may be a terminal with a movable location or a non-movable location, such as a mobile phone, a computer, a server, or a gateway. The upgrade end 300 may be connected to and communicate with one low-level node 101 in the low-level blockchain network 100 and one high-level node 201 in the high-level blockchain network 200, for example, when the upgrade end 300 is connected to one low-level node 101 and one high-level node 201, the upgrade end 300 may obtain data from the connected low-level node 101, and write the data into the corresponding connected high-level node 201 for storage, thereby completing the upgrade of the nodes.
In an exemplary embodiment, an upgrading method for a blockchain network is provided, where the upgrading method for a blockchain network may be run in any computing device, for example, in a terminal or a server, or in a server cluster or a cloud server, and of course, a person skilled in the art may also run the method of the present invention on other platforms according to needs, and the disclosure is not limited specifically. Referring to fig. 2, the method for upgrading the exemplary blockchain network includes:
in step S201, when an upgrade request for a blockchain network is received, a lower-level node of a lower-level blockchain network and a higher-level node of a higher-level blockchain network corresponding to the lower-level node are connected, respectively.
The low-level blockchain network refers to a blockchain network with a lower version, and compared with a high-level blockchain network with a higher version, the blockchain nodes of the low-level blockchain network have a lower operation speed and a smaller storage capacity. In order to increase the operation speed of the blockchain node and expand the operation speed of the blockchain node, the blockchain network needs to be upgraded, so that the blockchain network can operate efficiently.
The low level nodes refer to the block chain link points of the low level block chain network, and the high level nodes refer to the block chain nodes of the high level block chain network. When the blockchain network is upgraded, a low-level node is corresponding to a high-level node to perform data migration, and when the data stored by all the low-level nodes are migrated to the corresponding high-level node to be stored, the upgrading of the blockchain network is completed.
An upgrade request for a blockchain network refers to information for requesting an upgrade to the blockchain network, which in one example may be sent by a user clicking on a particular area on the interface, such as a user clicking on an "upgrade" button on the interface to send an upgrade request for a blockchain network, and so on. In another example, the upgrade request for the blockchain network may be automatically sent upon detection of an advanced blockchain network. This embodiment is not particularly limited thereto.
When an upgrade request for the blockchain network is received, a lower level node of the lower level blockchain and an upper level node of the upper level blockchain network corresponding to the lower level node are connected, respectively, in an example, the lower level node and the upper level node can be connected by wire, such as a bus, a data transmission line or a network cable, and the like. In another example, the connection may be made with the lower level node, the higher level node, or the like, wirelessly, such as a wireless local area network, bluetooth, or the like.
In step S202, a data ID list of data created by the lower node is acquired by the lower node.
The data established by the lower node refers to the data established by the lower node and having ownership. Each data is configured with a data ID at set-up time, and one data corresponds to one data ID, for example: the dataID is 123456, owner is a, operator is a, action is insert, content is data content 1, and the operation records are as follows: when the data content 1 is created, the data ID corresponding to the data content 1 is 123456, the data content 1 is owned by the node a, the operation record is executed by the node a, and the executed action is input.
The data ID list is used to store data IDs of all data created by the lower level node, and in an example, when the lower level node detects that new data is created, the data ID corresponding to the new data is stored in the data ID list, so that data omission is avoided.
In step S203, based on the data ID list, an operation record corresponding to each data ID in the data ID list is acquired from the lower node.
In the present exemplary embodiment, the operation record refers to a record of each operation action of the user on the blockchain network, such as modifying data content, creating data, and the like. According to each data ID in the data ID list, the operation record of the data corresponding to the data ID is searched in the low-level node, so that the integrity of the operation record is ensured, and the condition that the operation record is missed is prevented.
Referring to fig. 3, fig. 3 is a schematic flowchart of a step S203 in an upgrading method of a blockchain network according to an exemplary embodiment of the present disclosure, and in the embodiment shown in fig. 3, the step S203, based on the data ID list, acquiring, by the lower level node, an operation record corresponding to each data ID in the data ID list includes:
in step S301, a block and a key corresponding to each data ID in the data ID list are obtained from the lower node.
In the exemplary embodiment, since the block chain network generates a block according to data to be stored and stores the block, and encrypts the block, leakage of data stored in the block is prevented. According to each data ID, searching the block corresponding to the data ID and the key of the data corresponding to the data ID in the lower node, and decrypting the block corresponding to the data ID according to the key of the data corresponding to the data ID.
In step S302, the block corresponding to the data ID is decrypted according to the obtained key, so as to obtain the operation record corresponding to the data ID.
And decrypting the corresponding block according to the acquired key to obtain the operation record stored in the block. The secret key is obtained to decrypt the block to obtain the operation record stored in the block, so that the data loss caused by the fact that the data stored in the block cannot be read due to incompatibility of encryption modes of a high-level block chain network and a low-level block chain network when the block is simply copied is avoided, and the readability of the data is ensured.
Referring to fig. 2, in step S204, each acquired operation record is correspondingly written into the advanced blockchain network for storage.
In this exemplary embodiment, since the obtained operation record includes operation records of other low-level nodes in the low-level blockchain network on the data corresponding to the data ID in the data ID list, each operation record needs to be written into a high-level node in the high-level blockchain network corresponding to the operation node of the operation record for storage, so as to ensure the correctness of the data stored in the blockchain network.
In an exemplary embodiment, writing the obtained each operation record into the advanced block chain network correspondingly for storage includes:
acquiring a timestamp of each operation record;
and writing the operation content of each operation record into the node of the advanced block chain network corresponding to the operation node of the operation record for storage according to the sequence of the time stamp of each operation record.
In the present exemplary embodiment, the timestamp refers to a recording time of the block chain when each operation record is recorded, and continuity of the stored data is guaranteed according to a sequence of the timestamps in the block chain network to form the block chain. And writing each operation record into a high-level node of the high-level block chain network corresponding to the operation node of the operation record for storage according to the time stamp of the operation record. For example: the operation record corresponding to the data ID123456 is:
2017-11-01-17:37:18 dataId=123456,owner=A,operator=A,action=delete;
2017-08-13-14:45:45 dataId 123456, inner a, operator B, action update, content 2;
2017-04-10-18, 30:23 dataId 123456, inner a, operator a, action insert, content 1;
writing the operation record according to the sequence of the time stamps, wherein the writing sequence is as follows:
2017-04-10-18, 30:23 dataId 123456, inner a, operator a, action insert, content 1;
2017-08-13-14:45:45 dataId 123456, inner a, operator B, action update, content 2;
2017-11-01-17:37:18 dataId=123456,owner=A,operator=A,action=delete;
and writing the operation record into the advanced node of the advanced block chain network corresponding to the operation node of the operation record for storage according to the operation node of each operation record. The operation node of the first operation record is node a, the operation record is written by the advanced node of the advanced blockchain network corresponding to node a, that is, the advanced node of the advanced blockchain network corresponding to node a creates data with data ID of 123456, and the data content of the data is input as data content 1; the operation node of the second operation record is the node B, and the operation record is written by the advanced node of the advanced blockchain network corresponding to the node B, that is, the advanced node of the advanced blockchain network corresponding to the node B updates the data with the data ID of 123456, and the updated data content is data content 2; the operation node of the third operation record is node a, and the operation record is written by the advanced node of the advanced blockchain network corresponding to node a, that is, the advanced node of the advanced blockchain network corresponding to node a deletes the data with the data ID of 123456.
By writing each operation record according to the sequence of the time stamps and writing each operation record by the advanced node of the advanced block chain network corresponding to the operation node of the operation record, the correctness of the data source is ensured.
In an exemplary embodiment, when each obtained operation record is correspondingly written into the advanced blockchain network for storage, the advanced node in the advanced blockchain network generates a key for each data and saves the key when writing the operation record. When the operation record of the data is written and stored, the operation record is encrypted by the key corresponding to the data, so that the data leakage is prevented, and the safety of the data is ensured.
In step S205, the data authority owned by the lower level node is obtained from the lower level node.
The data authority owned by the lower level node refers to the data authority of the lower level node to all data stored in the lower level blockchain network, and the data can be created by the lower level node or other lower level nodes in the lower level blockchain network. The data rights of the low level node for each data may differ, for example, low level node A has read rights for data with data ID123456, write rights for data with data ID 123457, and so on.
Step S206, each data authority is written into the high-level node for storage.
In the exemplary embodiment, each acquired data authority is written into the high-level node corresponding to the low-level node, and the migration of the operation record and the data authority is completed, so that the low-level blockchain is upgraded, and data omission or missing during upgrading is prevented. In an exemplary embodiment, the writing each data right to the high-level node for storage includes:
and according to the authorization node of each data authority, sending a corresponding authorization request to a node in the advanced block chain network corresponding to the authorization node.
The authorized node of the data right refers to an owning node of the data corresponding to the data right, for example, if the owning node of the data with the data ID of 123456 is node a, the authorized node of the data is node a.
The authorization request is a signal for requesting authorization sent to the owning node of the data when other nodes need to use or view the data, and when the owning node of the data receives the authorization request, whether authorization is allowed or not can be determined.
And when receiving an authorization permission signal sent by the node in the advanced block chain network corresponding to the authorization node, writing the data authority into the advanced node for storage.
In the exemplary embodiment, when the low-level node receives the authorization permission signal sent by the node in the high-level blockchain network corresponding to the authorization node of the data authority, the data authority is written into the high-level node for storage, and the migration of the data authority is completed. By sending an authorization request to authorize, the data permission in the high-level node can be traced, the validity of the data permission is ensured, and the integrity of the data migrated by the low-level block chain network is also ensured.
In an exemplary embodiment, after connecting the lower level node of the lower level blockchain network and the higher level node of the higher level blockchain network corresponding to the lower level node, respectively, when receiving an upgrade request for the blockchain network, further comprising:
when receiving an operation request of a user to the low-level node, recording the operation content of the user to the low-level node;
and when a signal that the operation content is successfully operated is received, generating a latest operation record according to the operation content and storing the latest operation record in a latest operation record list.
In the exemplary embodiment, the latest operation record is recorded in the latest operation list, so that the user can normally use the blockchain network in the upgrading process of the blockchain network, the normal work requirement of the user on the blockchain network is ensured, and the user experience is improved.
After writing each data authority into the high-level node for storage, the method further comprises the following steps:
writing each recent operation record in the recent operation records into the advanced block chain network in sequence;
and when a write success signal sent by the advanced block chain network for each latest operation record is received, deleting the latest operation record from the latest operation record list.
In the exemplary embodiment, after each operation record in the lower node and the migration of the data authority are completed, each latest operation record in the latest operation record list is correspondingly written into the higher-level block chain network. The writing method is consistent with the operation record and the data authority migration method, and therefore, the description is omitted. And when each latest operation record is successfully written, the node of the advanced block chain network corresponding to the latest operation record sends a writing success signal, and when the writing success signal is received, the latest operation record is deleted from the latest operation record list. And circularly writing until the migration is completed without the latest operation record in the latest operation record list.
In an exemplary embodiment, after deleting the last operation record from the last operation record list when receiving a write success signal sent by the advanced blockchain network for each last operation record, the method for upgrading the advanced blockchain network further includes:
when the last operation record list is detected to be empty, the lower node is deactivated, the higher node is activated, and the connection with the lower node and the higher node is disconnected.
In this exemplary embodiment, that the latest operation record list is empty means that there is no latest operation record in the latest operation record list, that is, it means that all data in the latest operation record list has been successfully written into the advanced block chain network. Thus, the low level node is taken out of service, the high level node is enabled, and the connections to the low level node and the high level node are disconnected, and the upgrade of the blockchain network is completed.
The embodiment of the disclosure also provides an upgrading device of the block chain network. Referring to fig. 4, the upgrading apparatus of the exemplary blockchain network may include a connection module 410, a first obtaining module 420, a second obtaining module 430, a first writing module 440, a third obtaining module 450, and a second writing module 460. Wherein:
the connection module 410 is configured to: when an upgrade request for a blockchain network is received, connecting a lower-level node of a lower-level blockchain network and a higher-level node of a higher-level blockchain network corresponding to the lower-level node, respectively;
the first acquisition module 420 is configured to: obtaining, by the lower level node, a list of data IDs of data established by the lower level node;
the second acquisition module 430 is configured to: acquiring an operation record corresponding to each data ID in the data ID list from the lower node based on the data ID list;
the first write module 440 is configured to: correspondingly writing each acquired operation record into the advanced block chain network for storage;
the third obtaining module 450 is configured to: acquiring the data authority owned by the lower node from the lower node;
the second write module 460 is configured to: and writing each data authority into the high-level node for storage.
The specific details of each module in the device for upgrading a blockchain network have been described in detail in the method for upgrading a corresponding blockchain network, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
According to an exemplary embodiment, the apparatus may be realized as an electronic device comprising a memory and a processor, the memory having stored therein a computer program, which, when executed by the processor, causes the processor to perform any one of the method embodiments as described above, or which, when executed by the processor, causes the electronic device to realize the functions as implemented by the constituent units/modules of the apparatus embodiments as described above.
The processor described in the above embodiments may refer to a single processing unit, such as a central processing unit CPU, or may be a distributed processor system comprising a plurality of distributed processing units.
The memory described in the above embodiments may include one or more memories, which may be internal memories of the computing device, such as various memories of a transient or non-transient type, or external storage devices connected to the computing device through a memory interface.
An electronic device 500 according to this embodiment of the invention is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: the at least one processing unit 510, the at least one memory unit 520, and a bus 530 that couples various system components including the memory unit 520 and the processing unit 510.
Wherein the storage unit stores program code that is executable by the processing unit 510 to cause the processing unit 510 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 510 may perform step S201 as shown in fig. 2, when receiving an upgrade request for a blockchain network, connecting a lower-level node of a lower-level blockchain network and a higher-level node of a higher-level blockchain network corresponding to the lower-level node, respectively; step S202, obtaining a data ID list of data established by the low-level node from the low-level node; step S203, based on the data ID list, obtaining the operation record corresponding to each data ID in the data ID list from the lower node; step S204, correspondingly writing each acquired operation record into the advanced block chain network for storage; step S205, obtaining the data authority owned by the low level node from the low level node; step S206, each data authority is written into the high-level node for storage.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203.
Storage unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. As shown, the network adapter 560 communicates with the other modules of the electronic device 500 over the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 6, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (9)

1. A method for upgrading a blockchain network, comprising:
when an upgrade request for a blockchain network is received, connecting a lower-level node of a lower-level blockchain network and a higher-level node of a higher-level blockchain network corresponding to the lower-level node, respectively;
obtaining, by the lower level node, a list of data IDs of data established by the lower level node;
acquiring an operation record corresponding to each data ID in the data ID list from the lower node based on the data ID list;
correspondingly writing each acquired operation record into the advanced block chain network for storage;
acquiring the data authority owned by the lower node from the lower node;
and writing each data authority into the high-level node for storage.
2. The method for upgrading a blockchain network according to claim 1, wherein the obtaining, from the lower level node, the operation record corresponding to each data ID in the data ID list based on the data ID list comprises:
acquiring a block and a key corresponding to each data ID in the data ID list from the lower node;
and decrypting the block corresponding to the data ID according to the acquired key to obtain the operation record corresponding to the data ID.
3. The method for upgrading a blockchain network according to claim 1, wherein the writing each data right into the higher-level node for storage comprises:
according to the authorization node of each data authority, sending a corresponding authorization request to a node in the advanced block chain network corresponding to the authorization node;
and when receiving an authorization permission signal sent by the node in the advanced block chain network corresponding to the authorization node, writing the data authority into the advanced node for storage.
4. The method for upgrading a blockchain network according to claim 1, further comprising, after connecting a lower-level node of a lower-level blockchain network and an upper-level node of an upper-level blockchain network corresponding to the lower-level node, respectively, when receiving an upgrade request for the blockchain network:
when receiving an operation request of a user to the low-level node, recording the operation content of the user to the low-level node;
when a signal that the operation content is successfully operated is received, generating a latest operation record according to the operation content and storing the latest operation record in a latest operation record list;
after writing each data authority into the high-level node for storage, the method further comprises the following steps:
writing each recent operation record in the recent operation records into the advanced block chain network in sequence;
and when a write success signal sent by the advanced block chain network for each latest operation record is received, deleting the latest operation record from the latest operation record list.
5. The method for upgrading a blockchain network according to claim 4, further comprising, after deleting the last operation record from the last operation record list when receiving a write success signal sent by the advanced blockchain network for each last operation record, the method further comprising:
when the last operation record list is detected to be empty, the lower node is deactivated, the higher node is activated, and the connection with the lower node and the higher node is disconnected.
6. The method for upgrading a blockchain network according to claim 2, wherein writing the obtained operation record into the advanced blockchain network for storage comprises:
acquiring a timestamp of each operation record;
and writing the operation content of each operation record into the node of the advanced block chain network corresponding to the operation node of the operation record for storage according to the sequence of the time stamp of each operation record.
7. An apparatus for upgrading a blockchain network, comprising:
a connection module configured to connect a lower-level node of a lower-level blockchain network and a higher-level node of a higher-level blockchain network corresponding to the lower-level node, respectively, when an upgrade request for the blockchain network is received;
a first acquisition module configured to acquire, from the lower level node, a data ID list of data established by the lower level node;
a second obtaining module configured to obtain, from the lower level node, an operation record corresponding to each data ID in the data ID list based on the data ID list;
the first writing module is configured to correspondingly write each acquired operation record into the advanced block chain network for storage;
a third obtaining module configured to obtain, from the lower level node, a data right owned by the lower level node;
and the second writing module is configured to write each data authority into the high-level node for storage.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of upgrading a blockchain network according to any one of claims 1 to 6.
9. An electronic device, comprising:
a processor; and
a memory having a computer program stored thereon;
wherein the processor is configured to implement the method of upgrading a blockchain network according to any one of claims 1 to 6 via execution of the computer program.
CN201910781248.9A 2019-08-21 2019-08-21 Block chain network upgrading method and device, storage medium and electronic equipment Active CN110704392B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910781248.9A CN110704392B (en) 2019-08-21 2019-08-21 Block chain network upgrading method and device, storage medium and electronic equipment
PCT/CN2020/093588 WO2021031655A1 (en) 2019-08-21 2020-05-30 Method and apparatus for upgrading blockchain network, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910781248.9A CN110704392B (en) 2019-08-21 2019-08-21 Block chain network upgrading method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110704392A true CN110704392A (en) 2020-01-17
CN110704392B CN110704392B (en) 2023-03-31

Family

ID=69193337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910781248.9A Active CN110704392B (en) 2019-08-21 2019-08-21 Block chain network upgrading method and device, storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN110704392B (en)
WO (1) WO2021031655A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111563121A (en) * 2020-04-27 2020-08-21 中国银行股份有限公司 Information management system
CN112052021A (en) * 2020-08-12 2020-12-08 中钞信用卡产业发展有限公司杭州区块链技术研究院 Method, device, equipment and storage medium for upgrading block chain of alliance
CN112241436A (en) * 2020-10-26 2021-01-19 云账户技术(天津)有限公司 Block chain network switching method and device
WO2021031655A1 (en) * 2019-08-21 2021-02-25 平安科技(深圳)有限公司 Method and apparatus for upgrading blockchain network, storage medium, and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577427A (en) * 2017-08-31 2018-01-12 上海保险交易所股份有限公司 For the data migration method of block catenary system, equipment and storage medium
CN107911421A (en) * 2017-10-30 2018-04-13 上海点融信息科技有限责任公司 For configuring the method for internetwork communication, equipment and computer-readable storage medium in block chain
CN109889589A (en) * 2019-02-18 2019-06-14 闪联信息技术工程中心有限公司 One kind realizing embedded hardware OTA upgrade-system and method based on block chain
CN109992285A (en) * 2019-04-02 2019-07-09 杭州秘猿科技有限公司 Block chain code block standalone upgrade method, apparatus and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190052453A1 (en) * 2017-08-14 2019-02-14 Honeywell International Inc. Apparatus and method for using blockchains with secure custody transfer data, sealing data, and other data associated with material transfers
CN110083372B (en) * 2019-03-07 2023-06-16 上海七印信息科技有限公司 Block chain data version upgrading method
CN110134668B (en) * 2019-04-28 2023-08-01 创新先进技术有限公司 Data migration method, device and equipment applied to blockchain
CN110704392B (en) * 2019-08-21 2023-03-31 平安科技(深圳)有限公司 Block chain network upgrading method and device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577427A (en) * 2017-08-31 2018-01-12 上海保险交易所股份有限公司 For the data migration method of block catenary system, equipment and storage medium
CN107911421A (en) * 2017-10-30 2018-04-13 上海点融信息科技有限责任公司 For configuring the method for internetwork communication, equipment and computer-readable storage medium in block chain
CN109889589A (en) * 2019-02-18 2019-06-14 闪联信息技术工程中心有限公司 One kind realizing embedded hardware OTA upgrade-system and method based on block chain
CN109992285A (en) * 2019-04-02 2019-07-09 杭州秘猿科技有限公司 Block chain code block standalone upgrade method, apparatus and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021031655A1 (en) * 2019-08-21 2021-02-25 平安科技(深圳)有限公司 Method and apparatus for upgrading blockchain network, storage medium, and electronic device
CN111563121A (en) * 2020-04-27 2020-08-21 中国银行股份有限公司 Information management system
CN112052021A (en) * 2020-08-12 2020-12-08 中钞信用卡产业发展有限公司杭州区块链技术研究院 Method, device, equipment and storage medium for upgrading block chain of alliance
CN112241436A (en) * 2020-10-26 2021-01-19 云账户技术(天津)有限公司 Block chain network switching method and device

Also Published As

Publication number Publication date
WO2021031655A1 (en) 2021-02-25
CN110704392B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN110704392B (en) Block chain network upgrading method and device, storage medium and electronic equipment
CN108923908B (en) Authorization processing method, device, equipment and storage medium
US9946649B1 (en) Data coherency system and method
US20070136606A1 (en) Storage system with built-in encryption function
EP3082353A1 (en) Method and terminal device for sending and receiving user data
CN107613005B (en) Reverse proxy method and device, electronic device and storage medium
CN103218227B (en) The method of compatible multiple file system and device on a kind of Android device built-in hard disk
CN110347341B (en) Data clearing method and control equipment
CN107797887B (en) Data backup and recovery method and device, storage medium and electronic equipment
US20170242820A1 (en) Using a proprietary framework on a standards-based embedded device
CN111818145B (en) File transmission method, device, system, equipment and storage medium
KR20120044550A (en) Cloud storage server and system by use of virtual nas and method thereof
WO2022174737A1 (en) Method for running neural network model, and electronic device and storage medium
CN109657167B (en) Data acquisition method, device, server and storage medium
CN110119386B (en) Data processing method, data processing apparatus, medium, and computing device
US20190012159A1 (en) Systems and methods for uninstalling or upgrading software if package cache is removed or corrupted
CN104517067A (en) Method, device and system for data access
US9588884B2 (en) Systems and methods for in-place reorganization of device storage
CN112925559B (en) Resource packaging method, device, medium and electronic equipment
CN109726039B (en) Method and apparatus for managing virtual machines
CN112148709A (en) Data migration method, system and storage medium
WO2020063002A1 (en) Data management method and apparatus, and server
US20220382637A1 (en) Snapshotting hardware security modules and disk metadata stores
CN115934640A (en) Data storage method, system, electronic equipment and storage medium
US10291700B2 (en) Network optimized scan with dynamic fallback recovery

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40020265

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant