CN110704392B - 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
CN110704392B
CN110704392B CN201910781248.9A CN201910781248A CN110704392B CN 110704392 B CN110704392 B CN 110704392B CN 201910781248 A CN201910781248 A CN 201910781248A CN 110704392 B CN110704392 B CN 110704392B
Authority
CN
China
Prior art keywords
node
data
level
operation record
blockchain network
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
CN201910781248.9A
Other languages
Chinese (zh)
Other versions
CN110704392A (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

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 an upper-level node of an upper-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; based on the data ID list, acquiring operation records corresponding to each data ID in the data ID list from the lower node; 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 cause data loss.

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 block chain nodes, simple offline old version and online new version are not suitable for upgrading the block chain system, and data on the block chain system of the old version cannot be transferred to the block chain of the new version due to incompatibility of data interfaces, storage formats or encryption modes, so that the data of the block chain system is lost, and the block chain 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 for data created 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;
when receiving the 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 an upgrade request for the blockchain network is received, 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;
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 latest operation record in the latest 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 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 includes:
when the last operation record list is detected to be empty, the low-level node is deactivated, the high-level node is activated, and the connection with the low-level node and the high-level node is disconnected.
In an exemplary embodiment of the disclosure, writing the obtained 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 write each acquired operation record into the advanced block chain network correspondingly 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, thereby preventing that data cannot be transferred due to incompatibility of data interfaces, resulting in upgrade failure. 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. The data authority owned by the low-level node is obtained from the low-level node, and each data authority is written into the high-level 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 components 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. For example, when the upgrade end 300 is connected to one low-level node 101 and one high-level node 201 respectively, 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:
step S201, when receiving an upgrade request for a blockchain network, connects 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.
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 a blockchain network, which in an example may be sent by a user clicking a particular area on the interface, such as a user clicking 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 to this.
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, and the like wirelessly, such as a wireless local area network, bluetooth, and 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 piece of data is configured with a data ID at the time of creation, and one piece of data corresponds to one data ID, for example: dataID =123456, inner = a, operator = a, action = insert, content = data content 1, and the above-mentioned operation record represents: 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 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 stamps of the operation records.
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;
2017-04-10-18;
writing the operation record according to the sequence of the time stamps, wherein the writing sequence is as follows:
2017-04-10-18;
2017-08-13-14;
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 node B, and the operation record is written by the advanced node of the advanced blockchain network corresponding to node B, that is, the advanced node of the advanced blockchain network corresponding to node B updates the data with 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 created by other lower level nodes in the lower level blockchain network. The data rights of each data may be different for the lower node, e.g., lower node A has read rights for data with data ID123456, write rights for data with data ID 123457, etc.
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, said writing each data right to the superordinate node for storage comprises:
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 authority refers to a node owned by data corresponding to the data authority, for example, if the node owned by 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 can be determined.
When receiving the 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 exemplary blockchain network further includes:
when the last operation record list is detected to be empty, the low-level node is deactivated, the high-level node is activated, and the connection with the low-level node and the high-level 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 carry out 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 realized 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 transitory or non-transitory nature, or external storage 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 execute 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 an upper-level node of an upper-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, writing each acquired operation record into the advanced block chain network correspondingly 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 include, but are 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 a local bus representing one or more 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 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, the various 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 method" of this description, when said program product is run on said 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. The 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 appreciated that the processes illustrated in the above figures are not intended to indicate or limit the temporal order of the processes. In addition, it is also readily understood that these processes may be performed, for example, synchronously or asynchronously 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 in 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 an upper-level node of an upper-level blockchain network corresponding to the lower-level node, respectively; the low level nodes refer to block link points of the low level block chain network, and the high level nodes refer to block link points of the high level block chain network; when the block chain network is upgraded, one low-level node is corresponding to one high-level node to perform data migration;
obtaining, by the lower level node, a list of data IDs for data created 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;
writing each data authority into the high-level node for storage; and when the data stored by all the low-level nodes are migrated to the corresponding high-level nodes for storage, finishing the upgrading of the block chain network.
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:
obtaining 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, the method 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;
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; the low level nodes refer to block link points of the low level block chain network, and the high level nodes refer to block link points of the high level block chain network; when the block chain network is upgraded, one low-level node is corresponding to one high-level node to perform data migration;
a first acquisition module configured to acquire, from the lower-level node, a data ID list of data created 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;
the second writing module is configured to write each data authority into the high-level node for storage; and when the data stored by all the low-level nodes are migrated to the corresponding high-level nodes for storage, the upgrading of the block chain network is completed.
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 CN110704392A (en) 2020-01-17
CN110704392B true 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)

Families Citing this family (4)

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

Also Published As

Publication number Publication date
CN110704392A (en) 2020-01-17
WO2021031655A1 (en) 2021-02-25

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
EP3082353A1 (en) Method and terminal device for sending and receiving user data
US20070136606A1 (en) Storage system with built-in encryption function
CN107613005B (en) Reverse proxy method and device, electronic device and storage medium
CN106843978B (en) SDK access method and system
CN107797887B (en) Data backup and recovery method and device, storage medium and electronic equipment
CN112925559B (en) Resource packaging method, device, medium and electronic equipment
CN116955225A (en) Data caching method, device, electronic equipment and readable medium
CN104036194A (en) Vulnerability detection method and device for revealing private data in application program
CN111228819B (en) Method, device and equipment for protecting Shader
CN109657167B (en) Data acquisition method, device, server and storage medium
WO2022174737A1 (en) Method for running neural network model, and electronic device and storage medium
CN104517067A (en) Method, device and system for data access
WO2020063002A1 (en) Data management method and apparatus, and server
CN113377770A (en) Data processing method and device
CN109995774B (en) Key authentication method, system, device and storage medium based on partial decryption
CN110011807B (en) Key information maintenance method and system
CN111177260A (en) Database remote copying method and device and electronic equipment
CN115934640A (en) Data storage method, system, electronic equipment and storage medium
CN106936844B (en) Data interaction method and system for remote access service
US10291700B2 (en) Network optimized scan with dynamic fallback recovery
CN114968644A (en) System software dump method and device, electronic equipment and readable storage medium
US20230222238A1 (en) Management apparatus, control method, computer readable medium, and access control system
CN114741706A (en) Virtual disk file encryption method, device and 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
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