A consortium chain upgrading method and device, a server and a medium

By creating a second consortium blockchain and deploying adaptation logic during the consortium blockchain upgrade process, the problem of time-consuming data migration of heterogeneous nodes was solved, and the stable operation and compatibility of the business system were achieved.

CN114546462BActive Publication Date: 2026-01-02HANGZHOU QULIAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210191292.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2026-01-02
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

During the upgrade process of consortium blockchain, the data structures of heterogeneous nodes are not directly compatible, and the existing technical solutions result in long data migration times, affecting the normal operation of business systems.

Method used

Create an upgraded second consortium blockchain and deploy adaptation logic between the target consortium blockchain and the business system so that received transaction requests match the consortium blockchain, achieving data read-write separation and avoiding long-term data migration.

Benefits of technology

During the upgrade of the consortium blockchain, the normal operation of business systems is not affected, the compatibility is strong, the data migration time is reduced, and the impact on business systems is minimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546462B_ABST
    Figure CN114546462B_ABST
Patent Text Reader

Abstract

Embodiments of the present application are suitable for the field of blockchain technology, and provide a consortium chain upgrading method and device, a server and a medium. The method comprises: determining a first consortium chain; creating a second consortium chain using upgraded node technology, the first consortium chain and the second consortium chain constituting an upgraded target consortium chain; determining an access time of a business system accessing the target consortium chain; and based on the access time, deploying corresponding adaptation logic between the target consortium chain and the business system to complete upgrading of the first consortium chain, wherein the adaptation logic is used to match a consortium chain for a received transaction request. Through the above method, the consortium chain can be upgraded while ensuring stable operation of the business system in the case of heterogeneous nodes before and after upgrading.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of blockchains, and particularly relates to a consortium chain upgrading method and device, a server and a medium. BACKGROUND

[0002] Heterogeneous nodes refer to inconsistent blockchain node technical architectures, and incompatible data structures and use schemes. When a consortium chain is upgraded, the technologies before and after the upgrade are different, which causes the nodes before and after the upgrade to be heterogeneous nodes, which brings difficulties to data migration of the consortium chain during the upgrade.

[0003] In the process of upgrading a consortium chain, for the upgrade of heterogeneous nodes, the traditional method is generally to newly create a consortium chain, and then migrate the data in the upgraded consortium chain to the new consortium chain.

[0004] There are two methods for data migration of a consortium chain, namely, on-site migration and off-site migration. If on-site migration is used, all nodes of the consortium chain are shut down, and then data migration is performed. Because the historical data is too large, the data migration takes a long time, which affects the normal use of the business system. If off-site migration is used, one node of the consortium chain is shut down first by using the minimum consensus feature of the consortium chain, and then incremental data is migrated after the data migration is completed. However, the design of incremental data migration is relatively complex, and when the business is relatively frequent, it cannot achieve a millisecond-level response; secondly, the historical data is too large, and the data migration also takes a long time.

[0005] Therefore, when the existing technology deals with the upgrade of consortium chain nodes with large historical data, frequent transactions and heterogeneous technologies, because the data migration takes a long time or the business is complex, the business system cannot normally operate for a long time. SUMMARY

[0006] Therefore, the embodiments of the present application provide a consortium chain upgrading method, device, server and medium to ensure the normal operation of a business system during the upgrade of a consortium chain.

[0007] The first aspect of the embodiments of the present application provides a consortium chain upgrading method, comprising:

[0008] determining a first consortium chain;

[0009] creating a second consortium chain by using an upgraded node technology, the first consortium chain and the second consortium chain constituting a target consortium chain after the upgrade;

[0010] determining an access time of a business system accessing the target consortium chain;

[0011] deploying corresponding adaptation logic between the target consortium chain and the business system based on the access time to complete the upgrade of the first consortium chain, wherein the adaptation logic is used to match a consortium chain for a received transaction request.

[0012] A second aspect of the embodiment of the application provides a consortium chain upgrading apparatus, comprising:

[0013] a first consortium chain determining module configured to determine a first consortium chain;

[0014] a second consortium chain creating module configured to create a second consortium chain by using upgraded node technology, the first consortium chain and the second consortium chain constituting an upgraded target consortium chain;

[0015] an access time determining module configured to determine an access time of a business system accessing the target consortium chain;

[0016] a deploying module configured to deploy corresponding adaptation logic between the target consortium chain and the business system based on the access time, so as to complete upgrading of the first consortium chain, wherein the adaptation logic is configured to match a consortium chain for a received transaction request.

[0017] A third aspect of the embodiment of the application provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of the first aspect when executing the computer program.

[0018] A fourth aspect of the embodiment of the application provides a computer readable storage medium, which stores a computer program, and the computer program is executable by a processor to implement the method of the first aspect.

[0019] A fifth aspect of the embodiment of the application provides a computer program product, which, when executed on a server, causes the server to execute the method of the first aspect.

[0020] Compared with the prior art, the embodiment of the application has the following advantages:

[0021] In the embodiment of the present application, when the alliance chain is upgraded, for the first alliance chain, a corresponding second alliance chain can be created by using the upgraded node technology; then the first alliance chain and the second alliance chain are used as the target alliance chain after upgrading, and the corresponding adaptation logic is deployed between the target alliance chain and the business system; then the target alliance chain can be used to provide upgraded services for the accessed business system. In the embodiment of the present application, when the alliance chain is upgraded, data migration does not need to be performed at the first time, but the first alliance chain continues to provide data before upgrading, and the second alliance chain provides alliance chain services after upgrading. In this way, for the alliance chain that needs to be upgraded, after creating a corresponding second alliance chain and deploying adaptation logic, the upgraded services can be provided for the accessed business system, without long waiting for data migration of heterogeneous nodes, the normal operation of the business system is not affected during the alliance chain upgrading process, and the compatibility is strong. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0023] Figure 1 is a schematic diagram of a downtime migration method provided by an embodiment of the present application;

[0024] Figure 2 is a schematic diagram of an online migration method provided by an embodiment of the present application;

[0025] Figure 3 is a step flowchart of an alliance chain upgrading method provided by an embodiment of the present application;

[0026] Figure 4 is a step flowchart of another alliance chain upgrading method provided by an embodiment of the present application;

[0027] Figure 5 is a schematic diagram of another alliance chain upgrading method provided by an embodiment of the present application;

[0028] Figure 6 is a schematic diagram of adaptation logic provided by an embodiment of the present application;

[0029] Figure 7 is a schematic diagram of an alliance chain upgrading device provided by an embodiment of the present application;

[0030] Figure 8 is a schematic diagram of a server provided by an embodiment of the present application. Detailed Implementation

[0031] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0032] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0033] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0034] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0035] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0036] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0037] Blockchain, as a distributed ledger technology, provides data read and write capabilities. Blockchain technology features data immutability and decentralization. Consortium blockchains, as a type of blockchain, are widely used in the field of trusted data storage. After running for a sufficient period, consortium blockchains have supported multiple blockchain applications based on them. However, as business grows, higher demands are placed on the functionality and performance of consortium blockchains, thus requiring technical upgrades to the consortium nodes.

[0038] However, the nodes before and after a consortium blockchain upgrade may be heterogeneous, and the data structures and usage schemes of heterogeneous nodes are not directly compatible, thus preventing direct technical upgrades. In existing technologies, a new consortium blockchain using the upgraded node technology is typically established, and then the data from the old consortium blockchain is migrated to the new one. Currently, there are two solutions: migration with downtime and migration without downtime. Figure 1 This is a schematic diagram of a shutdown migration method provided in an embodiment of this application. Figure 1 Chain A is the old consortium blockchain, while Chain B is a new consortium blockchain created using upgraded node technology. First, the connection between the business system and Chain A must be severed, and all nodes in Chain A must cease providing services to the business system. Then, all data in Chain A must be migrated to Chain B. After the data migration is complete, Chain B will be used to provide services to the business system.

[0039] Chain A may contain a large amount of business data; for example, it may have hundreds of millions of data points accumulated and real-time business data generated. When adopting... Figure 1 The method shown is time-consuming for data migration; during this extended period, the consortium blockchain will be unable to provide services to business systems, significantly impacting them. Furthermore, due to the incompatibility of node technologies before and after the upgrade, all business systems connected to the consortium blockchain will need to be re-adapted after the upgrade, resulting in a wide-ranging impact.

[0040] Figure 2 This is a schematic diagram of a non-stop migration method provided in an embodiment of this application. Figure 2 Chain A is the old consortium blockchain, while Chain B is a new consortium blockchain created using upgraded node technology. During the migration without downtime, leveraging the minimum consensus characteristic of consortium blockchains, one node in Chain A is first shut down, and its data is migrated to Chain B. After the data migration is complete, incremental data is migrated. Once all data migration is complete, Chain A is decommissioned, and Chain B is activated to provide consortium blockchain services.

[0041] In Adoption Figure 2The method shown needs to perform incremental data migration design when performing data migration. The incremental data migration design is relatively complex, and when the business is relatively frequent, it cannot achieve millisecond-level response. In addition, when the data volume is large, the data migration consumes a long time, the technologies are incompatible, and each business system needs to be re-adapted, which has a large impact.

[0042] The above two methods have long data migration time during the upgrading of the alliance chain, so that the alliance chain cannot provide services for the business system for a long time.

[0043] Therefore, the application provides a high-reliability alliance chain node upgrading method, so that the alliance chain can provide services for the business system during upgrading.

[0044] The technical solutions of the application will be described below through specific embodiments.

[0045] Referring to Figure 3 , a step flowchart of an alliance chain upgrading method provided by an embodiment of the application is shown, which can specifically include the following steps:

[0046] S301, the server determines a first alliance chain.

[0047] The first alliance chain is an alliance chain that needs to be upgraded. The first alliance chain can provide services for a plurality of accessed business systems.

[0048] When the alliance chain needs to be upgraded, the server can determine the alliance chain. In this embodiment, after the alliance chain is upgraded, the alliance chain can provide accumulated business data on one hand and can provide upgraded technical services on the other hand. The business data accumulated before the upgrading is stored in the first alliance chain.

[0049] S302, the server creates a second alliance chain by using an upgraded node technology, and the first alliance chain and the second alliance chain constitute an upgraded target alliance chain.

[0050] Specifically, a second alliance chain is newly created by using an upgraded node technology. The second alliance chain can provide upgraded alliance chain services, and at this time, the second alliance chain has no data.

[0051] In this embodiment, the first alliance chain and the second alliance chain can be collectively used as an upgraded target alliance chain. In the target alliance chain, the first alliance chain can provide historical data, and the second alliance chain can provide upgraded technical services; and incremental data can be stored in the second alliance chain.

[0052] S303, the server determines an access time of the business system accessing the target alliance chain.

[0053] The business system that needs to use the upgraded consortium chain service can access the target consortium chain. The access time refers to the time when the business system accesses the target consortium chain, which can be equivalent to the time when the business system uses the upgraded consortium chain service. There are multiple business systems on the first consortium chain, and the business systems can access the target consortium chain as needed. For the business system that does not need to use the upgraded consortium chain service, it does not need to be re-accessed and can maintain the original connection with the first consortium chain.

[0054] S304, based on the access time, the server deploys corresponding adaptation logic between the target consortium chain and the business system to complete the upgrade of the first consortium chain, wherein the adaptation logic is used to match the consortium chain for the received transaction request.

[0055] Specifically, the adaptation layer refers to middleware encapsulating consortium basic capabilities, and the underlying layer is based on the existing consortium chain service. The business system can generally refer to a business program in a specific business scenario, which is used to realize real user demand and can be a Web, app or client program.

[0056] The adaptation logic in this embodiment can be: using the second consortium chain to provide write-in service for the received transaction request; if the transaction time of the transaction request of the business system is less than or equal to the access time, using the first consortium chain to provide read service for the transaction request; if the transaction time of the transaction request of the business system is greater than the access time, using the second consortium chain to provide read service for the transaction request.

[0057] After deploying the adaptation logic, the second consortium chain can be enabled. The first consortium chain and the second consortium chain are maintained at the same time, and the upgrade of the first consortium chain is completed.

[0058] In this embodiment, the upgrade of the consortium chain is realized by the way of data read-write separation. In the upgraded target consortium chain, the original first consortium chain provides the previous business data; the new second consortium chain is used to store the data after the upgrade and write-in data. The method in this embodiment does not need to be upgraded, so it will not affect the business system based on the consortium chain; and it does not need to be migrated, so the problem of long migration time is solved; the business system has a small influence range and strong compatibility, and can access the upgraded target consortium chain as needed according to the actual situation of the business system.

[0059] Referring to Figure 4 , another step flow diagram of a consortium chain upgrade method provided by an embodiment of the present application is shown, which can specifically include the following steps:

[0060] S401, the server determines the first consortium chain.

[0061] S402, the server creates a second alliance chain by using the upgraded node technology, and the first alliance chain and the second alliance chain constitute the upgraded target alliance chain.

[0062] S403, the server determines an access time of the business system to the target alliance chain.

[0063] S404, based on the access time, the server deploys corresponding adaptation logic between the target alliance chain and the business system to complete the upgrade of the first alliance chain, wherein the adaptation logic is used to match the alliance chain for the received transaction request.

[0064] S401-S404 in the embodiment are similar to S301-S304 in the previous embodiment, and can be mutually referred to, and details are not repeated here.

[0065] S405, when receiving a transaction request, the server determines a transaction time, a request type and a corresponding business system identifier of the transaction request.

[0066] The request type can include a read type and a write type, and the transaction time can be the occurrence time of the transaction. For example, a transaction request wants to query the account transaction data at 12:12:23 on January 1, 2021. The transaction type is the read type, and the transaction time is 12:12:23 on January 1, 2021.

[0067] The corresponding business system identifier is used to indicate which business system the transaction request comes from. S406, according to the business system identifier, the server obtains the access time of the business system initiating the transaction request from the database.

[0068] Specifically, when the business system accesses the target alliance chain, the identifier and the access time of the business system are associated and stored in a preset database. Therefore, the access time of the business system can be found from the database according to the business system identifier. That is, the upgrade time of the business system can be determined.

[0069] S407, if the transaction type is the write type or the transaction time is greater than the access time, the server processes the transaction request by using the second alliance chain.

[0070] Specifically, if the access type is the write type, the second alliance chain is directly used to process the transaction request, and the business data generated by the transaction request is directly stored in the second alliance chain.

[0071] If the transaction time is greater than the access time, it indicates that the data of the transaction request is stored in the second alliance chain, and at this time, the data can be obtained or written from the second alliance chain.

[0072] S408, if the transaction type is a read type and the transaction time is less than or equal to the access time, the server processes the transaction request using the first alliance chain.

[0073] Specifically, if the business data with a transaction time less than the access time is to be found, it can be obtained from the first alliance chain.

[0074] For example, assume that the access time corresponding to a certain business system is January 2, 2021, 0:00:00. If a transaction request of the business system is received, which is to query the account information of January 1, 2021, 0:00:00, the first alliance chain is used for processing; if a transaction request of the business system is received, which is to modify the account information of January 1, 2021, 0:00:00, the second alliance chain is used for processing; if a transaction request of the business system is received, which is to query the account information of January 3, 2021, 0:00:00, the second alliance chain is used for processing; if a transaction request of the business system is received, which is to modify the account information of January 3, 2021, 0:00:00, the second alliance chain is used for processing.

[0075] In this embodiment, the business system accesses on demand, so for the business system that does not access the target alliance chain, the first alliance chain can be directly used to provide services.

[0076] In the embodiment of the present application, the upgrade of the business system can be the adaptation logic of the business system accessing the target alliance chain, so that the upgraded alliance chain service can be used. The business system can freely choose to access or not to access and can autonomously choose when to access. If the business system is not upgraded, the first alliance chain can stably provide services for the business system; if the business system is upgraded, the second alliance chain can provide upgraded services for the business system. That is, regardless of whether the business system is upgraded or not, regardless of when the business system chooses to upgrade, and regardless of whether the blockchain nodes before and after the upgrade are heterogeneous nodes, the scheme in the embodiment can provide a stable running environment for the business system and provide corresponding alliance chain services.

[0077] Of course, in a possible implementation, the first alliance chain and the second alliance chain run for a period of time, and then the business data of the first alliance chain can be completely consensus to the second alliance chain through a less efficient way. When all the business systems are upgraded and all the data have been migrated to the second alliance chain, the second alliance chain can be used alone as the target alliance chain after the upgrade to provide alliance chain services for each business system.

[0078] In the embodiment, the first alliance chain and the new second alliance chain are simultaneously used to provide services for the business system, the business system can be upgraded on demand, the influence range of the business system is small, and the compatibility is strong. On the one hand, the business data before the upgrade can be provided, and on the other hand, the alliance chain service after the upgrade can be provided, the operability is strong, and the implementation is simple.

[0079] It should be noted that the size of the serial number of each step in the above embodiment does not mean the order of execution, the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the application.

[0080] Referring to Figure 5 , a schematic diagram of another alliance chain upgrade method provided by the embodiment of the application is shown, Figure 5 A chain in the above embodiment is an old alliance chain, and B chain is a new alliance chain created by using the upgraded node technology. When the technology is upgraded, the alliance chain B can be built based on the upgraded node technology; at this time, there is no business data on the alliance chain B. Then, the adaptation layer service is designed and deployed to meet the normal use of the business system before and after the upgrade. Referring to Figure 6 , a schematic diagram of an adaptation layer logic provided by the embodiment of the application is shown; as Figure 6 shown, when the blockchain application, that is, the business system accesses the adaptation layer, the access time T0 can be recorded in the database. When the business system sends a transaction to the adaptation layer, the type of the transaction can be judged. If the transaction is of the WRITE type, the transaction is transferred to the B chain for execution; if the transaction is of the READ type, the transaction time of the transaction is judged, if the transaction time is greater than T0, the transaction is transferred to the B chain for execution; if the transaction time is less than or equal to T0, the transaction is transferred to the A chain for execution.

[0081] Then, the B chain can be started to provide the upgraded blockchain service; the business system accesses the adaptation layer one by one on demand; the business system can determine whether to upgrade according to the actual needs of the business, for example, if the business system needs to use the function or performance of the upgraded B chain, the adaptation layer is accessed; if the business system does not need to use the function or performance of the upgraded B chain, the adaptation layer does not need to be accessed. In the embodiment, the business system is not forced to access the new alliance chain, and the influence range of the business system is small.

[0082] Then, the A chain and the B chain can be maintained simultaneously. The alliance chain upgrade is completed.

[0083] In the embodiment, by changing the adaptation layer, the incremental data can be directly written into the B chain, avoiding the migration of the incremental data in the upgrade process, and the implementation is simple.

[0084] When the upgraded node technology is heterogeneous with the node technology before the upgrade, the method in the embodiment can avoid a large amount of data migration before the upgrade, and provide high-reliable services for the business system in the case of frequent real-time transactions.

[0085] With reference to Figure 7 , a schematic diagram of a consortium chain upgrading apparatus is shown, which can specifically include a first consortium chain determining module 71, a second consortium chain creating module 72, an access time determining module 73, and a deploying module 74, wherein:

[0086] The first consortium chain determining module 71 is configured to determine a first consortium chain.

[0087] The second consortium chain creating module 72 is configured to create a second consortium chain by using an upgraded node technology, and the first consortium chain and the second consortium chain constitute a target consortium chain after the upgrade.

[0088] The access time determining module 73 is configured to determine an access time of a business system accessing the target consortium chain.

[0089] The deploying module 74 is configured to deploy corresponding adaptation logic between the target consortium chain and the business system based on the access time, so as to complete the upgrade of the first consortium chain, wherein the adaptation logic is configured to match a consortium chain for a received transaction request.

[0090] In a possible implementation method, the deploying module 74 includes:

[0091] A write service determining sub-module is configured to provide a write service for a received transaction request by using the second consortium chain.

[0092] A first read service determining sub-module is configured to provide a read service for the transaction request by using the first consortium chain if a transaction time of the transaction request of the business system is less than or equal to the access time.

[0093] A second read service determining sub-module is configured to provide a read service for the transaction request by using the second consortium chain if the transaction time of the transaction request of the business system is greater than the access time.

[0094] In a possible implementation method, the apparatus further includes:

[0095] An upgrade service providing module is configured to provide a consortium chain service after the upgrade for the business system by using the target consortium chain after the adaptation logic is deployed.

[0096] In a possible implementation method, the apparatus further includes:

[0097] A storage module is configured to store the access time and the corresponding business system identifier in a preset database.

[0098] In a possible implementation, the upgrading service providing module comprises:

[0099] A transaction information determining sub-module is configured to determine a transaction time, a request type and a corresponding business system identifier of the transaction request when the transaction request is received.

[0100] An access time determining sub-module is configured to obtain an access time of the business system initiating the transaction request from the database according to the business system identifier.

[0101] A first judging sub-module is configured to process the transaction request by using the second alliance chain if the request type is a write type or the transaction time is greater than the access time.

[0102] A second judging sub-module is configured to process the transaction request by using the first alliance chain if the transaction type is a read type and the transaction time is less than or equal to the access time.

[0103] In a possible implementation, the upgrading service providing module further comprises:

[0104] A third judging sub-module is configured to process the transaction request by using the first alliance chain if the access time of the business system initiating the transaction request is not included in the database.

[0105] In a possible implementation, the apparatus further comprises:

[0106] A data migration module is configured to migrate data in the first alliance chain to the second alliance chain.

[0107] A target alliance chain determining module is configured to take the second alliance chain as the target alliance chain when all data in the first alliance chain are migrated to the second alliance chain. For the apparatus embodiment, it is basically similar to the method embodiment, and thus is described more simply, and the related parts refer to the description in the method embodiment.

[0108] Figure 8 A server structure diagram provided by the embodiment of the present application is shown in FIG. 8. As shown in the figure, the server 8 of the embodiment comprises at least one processor 80 (only one processor is shown in the figure), a memory 81 and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, wherein the processor 80 implements the steps in any of the above method embodiments when executing the computer program 82. Figure 8 Figure 8 The processor 80 executes the computer program 82 to implement the steps in any of the above method embodiments.​

[0109] The server 8 can include, but is not limited to, a processor 80, a memory 81. Those skilled in the art can understand that the server 8 can include more or less components than shown, or combinations of such components, such as input / output devices, network access devices, etc. Figure 8 The server 8 is merely an example and is not intended to limit the server 8, which can include more or less components than shown, or combinations of such components, or different components, such as input / output devices, network access devices, etc.

[0110] The processor 80 can be a Central Processing Unit (CPU), and can also be other general-purpose processors, Digital Signal Processors (DSP), Application Specific Integrated Circuits (ASIC), Field-Programmable Gate Arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0111] The memory 81 can be an internal storage unit of the server 8 in some embodiments, such as a hard disk or a memory of the server 8. The memory 81 can also be an external storage device of the server 8 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 81 can include both an internal storage unit and an external storage device of the server 8. The memory 81 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as program codes of the computer program, etc. The memory 81 can also be used to temporarily store data that has been output or will be output.

[0112] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned various method embodiments.

[0113] The embodiments of the present application provide a computer program product, which, when executed on a server, causes the server to implement the steps in the above-mentioned various method embodiments.

[0114] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the present application can implement all or part of the processes in the above-mentioned embodiment methods through a computer program to instruct relevant hardware to complete, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the photographing device / server, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium can not be an electrical carrier signal and a telecommunication signal.

[0115] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0116] Those of ordinary skill in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0117] In the embodiments provided by the present application, it should be understood that the disclosed devices / servers and methods can be implemented in other ways. For example, the device / server embodiments described above are only schematic. The division of the modules or units is only a logical function division, and there can be another division in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection between each other can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0118] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may also be distributed to multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.

[0119] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for upgrading a consortium chain, characterized in that, The method comprises the following steps: determining a first alliance chain; creating a second alliance chain by using upgraded node technology, the first alliance chain and the second alliance chain constituting an upgraded target alliance chain; determining an access time of a business system accessing the target alliance chain; based on the access time, deploying corresponding adaptation logic between the target alliance chain and the business system to complete the upgrade of the first alliance chain, wherein the adaptation logic is used to match the alliance chain for a received transaction request; the step of deploying the corresponding adaptation logic between the target alliance chain and the business system based on the access time comprises: using the second alliance chain to provide write service for the received transaction request; if the transaction time of the transaction request of the business system is less than or equal to the access time, using the first alliance chain to provide read service for the transaction request; if the transaction time of the transaction request of the business system is greater than the access time, using the second alliance chain to provide read service for the transaction request.

2. The method of claim 1, wherein, After deploying the corresponding adaptation logic between the target alliance chain and the business system based on the access time, the method further comprises: using the target alliance chain after deploying the adaptation logic to provide upgraded alliance chain service for the business system.

3. The method of claim 2, wherein, After determining the access time of the business system accessing the target alliance chain, the method further comprises: storing the access time and the corresponding business system identifier into a preset database.

4. The method of claim 3, wherein, the step of using the target alliance chain after deploying the adaptation logic to provide upgraded alliance chain service for the business system comprises: when receiving the transaction request, determining the transaction time, the request type and the corresponding business system identifier of the transaction request; according to the business system identifier, obtaining the access time of the business system initiating the transaction request from the database; if the request type is a write type or the transaction time is greater than the access time, using the second alliance chain to process the transaction request; if the request type is a read type and the transaction time is less than or equal to the access time, using the first alliance chain to process the transaction request.

5. The method of claim 4, wherein, The method further comprises: if the access time of the business system initiating the transaction request is not included in the database, using the first alliance chain to process the transaction request.

6. The method according to any one of claims 1 to 5, wherein, The method further comprises: migrating data in the first alliance chain to the second alliance chain; when all the data in the first alliance chain are migrated into the second alliance chain, taking the second alliance chain as the target alliance chain. 7.A consortium chain upgrading apparatus characterized by comprising: The method comprises the following steps: a first alliance chain determination module for determining a first alliance chain; a second alliance chain creation module for creating a second alliance chain by using upgraded node technology, the first alliance chain and the second alliance chain constituting an upgraded target alliance chain; an access time determination module for determining an access time of a business system accessing the target alliance chain; a deployment module, configured to deploy corresponding adaptation logic between the target consortium chain and the business system based on the access time, so as to complete the upgrade of the first consortium chain, wherein the adaptation logic is configured to match the consortium chain for the received transaction request; the deployment module is configured to perform: adopting the second consortium chain to provide write service for the received transaction request; if the transaction time of the transaction request of the business system is less than or equal to the access time, adopting the first consortium chain to provide read service for the transaction request; if the transaction time of the transaction request of the business system is greater than the access time, adopting the second consortium chain to provide read service for the transaction request.

8. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method in any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the method in any one of claims 1-6.

Citation Information

Patent Citations

  • Gray release upgrading method and device, computer system and readable storage medium

    CN111736872A

  • Block chain network switching method and device

    CN112241436A