Data processing method and device, equipment, readable storage medium and program product

By migrating centralized data to a decentralized blockchain system and utilizing the blockchain's smart contracts and consensus node verification mechanisms, the availability and security issues of centralized storage are resolved, achieving higher data storage availability and security.

CN116932637BActive Publication Date: 2026-04-10LIAONING MOBILE COMM +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LIAONING MOBILE COMM
Filing Date
2022-04-11
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional centralized storage methods suffer from low availability and security when storing data, and are prone to system unavailability and attacks due to single points of failure.

Method used

Data is migrated from centralized storage to a decentralized blockchain system. The scheduler in the blockchain system categorizes and stores the data into corresponding blocks. Smart contracts and consensus nodes are used to verify and store the data, and a hash value chain structure is adopted to improve data security.

Benefits of technology

It improves the fault tolerance and attack resistance of data storage, and enhances the availability and security of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116932637B_ABST
    Figure CN116932637B_ABST
Patent Text Reader

Abstract

The application provides a data processing method and device, equipment, readable storage medium and program product. The method comprises the following steps: obtaining centralized original data, wherein the original data can comprise N types of data; creating N blocks corresponding to the N types of data in a blockchain system; and storing the N types of data in the N blocks under the condition that a preset condition is met. According to the embodiment of the application, the original data can be classified first to obtain different types of data, and then each type of data is stored in the corresponding block of the blockchain system, so that the centralized original data can be migrated to the decentralized blockchain system, the fault tolerance and attack resistance of the storage system can be improved, and the availability and security of data storage are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of blockchains, and particularly relates to a data processing method and device, equipment, readable storage medium and program product. BACKGROUND

[0002] In order to better manage data, perform data statistics and distribution, the traditional storage mode mostly adopts centralized storage. However, due to the mechanism and storage mode of the centralized storage, there are risks and hidden dangers of low availability and security in data storage. Therefore, it is necessary to provide a new data processing mode to implement "decentralization" for the current centralized storage to solve the above technical problems. SUMMARY

[0003] The application embodiment provides a data processing method and device, equipment, readable storage medium and program product to solve the technical problem of low availability and security in data storage.

[0004] In a first aspect, the application embodiment provides a data processing method, which comprises the following steps.

[0005] Obtaining original data stored in a centralized manner, wherein the original data comprises N types of data, and N is a positive integer;

[0006] Creating N blocks corresponding to the N types of data in a blockchain system;

[0007] Storing the N types of data in the N blocks under the condition that a preset condition is met.

[0008] In a second aspect, the application embodiment provides a data processing device, which comprises the following modules.

[0009] An obtaining module, configured to obtain original data stored in a centralized manner, wherein the original data comprises N types of data, and N is a positive integer;

[0010] A creating module, configured to create N blocks corresponding to the N types of data in a blockchain system;

[0011] A storing module, configured to store the N types of data in the N blocks under the condition that a preset condition is met.

[0012] In a third aspect, the application embodiment provides an electronic device, which comprises the following modules.

[0013] A processor and a memory storing programs or instructions;

[0014] The processor executes the programs or instructions to implement the above method.

[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, and the readable storage medium stores a program or instructions, and the program or instructions are executed by a processor to implement the method.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, and instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to perform the method.

[0017] The data processing method and device, the electronic device, the readable storage medium and the program product provided in the embodiments of the present application can obtain centralized original data, where the original data can include N types of data; N blocks corresponding to the N types of data are created in a blockchain system; and the N types of data are stored in the N blocks in a corresponding manner when a preset condition is met. In this way, the original data can be classified to obtain different types of data, and then each type of data is stored in a corresponding block in the blockchain system. As a result, the centralized original data can be migrated to the decentralized blockchain system, the fault tolerance and attack resistance of the storage system can be improved, and the availability and security of data storage are improved. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments of the present application will be briefly introduced. For those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0019] Figure 1 FIG. 1 is a structural schematic diagram of a data processing system provided by an embodiment of the present application;

[0020] Figure 2 FIG. 2 is a flowchart of a data processing method provided by an embodiment of the present application;

[0021] Figure 3 FIG. 3 is a schematic diagram of a user information block in the data processing method provided by an embodiment of the present application;

[0022] Figure 4 FIG. 4 is a schematic diagram of an operation log block in the data processing method provided by an embodiment of the present application;

[0023] Figure 5 FIG. 5 is a structural schematic diagram of a data processing device provided by another embodiment of the present application;

[0024] Figure 6 FIG. 6 is a structural schematic diagram of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0025] The features and exemplary embodiments of the various aspects of the present application will be described in detail below with reference to the drawings. For the purpose of clarity, the description is divided into the following sections: technical scheme, advantages, and specific embodiments. The specific embodiments described herein are intended for purposes of illustration only and are not intended to limit the scope of the present application. The present application can be implemented in ways other than those specifically set forth herein without departing from the spirit and scope of the present application. The following description is presented to enable any person skilled in the art to make and use the present application.

[0026] It should be noted that the relational terms herein such as first and second and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any such actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... " does not, without more restrictions, preclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0027] It can be understood that, due to its own mechanism and storage mode, centralized storage may have the following risks and hidden dangers:

[0028] 1. Low availability: once the centralized storage node fails, the entire storage system becomes unavailable, so the availability of centralized storage is not high.

[0029] 2. Low security: due to its special storage mode, centralized storage is easy to become an attack target. Once a hacker successfully intrudes, he can tamper with the data. Centralized storage lacks effective tamper-proofing and traceability mechanisms, resulting in low security.

[0030] In contrast to centralized storage, decentralized storage is a system with a large number of nodes, each node has a high degree of autonomy, and nodes can freely connect with each other to form new connection units. Any node can become a temporary center, but it does not have a mandatory central control function. Decentralized storage has the following advantages:

[0031] 1. Fault tolerance: Decentralized storage is less likely to occur unexpectedly because each node is independent of each other, and the probability of all nodes failing together is low.

[0032] 2. Resistance to attack: Decentralized storage makes the attack cost higher, because it lacks a sensitive central point, which is more vulnerable to low-cost attacks.

[0033] 3. Data tamper resistance: Decentralized storage increases the cost of data tampering, requiring at least more than half of the nodes to be tampered with, effectively reducing the risk of data tampering from a sociological and economic perspective.

[0034] The prior art mostly uses centralized database storage, and in the related technology of decentralized storage, the data is usually stored in multiple databases or tables, so that the amount of data in a single database is smaller, and the performance problem of centralized storage is alleviated by expanding the number of hosts, thereby improving the performance of database operations. However, the method of dividing the database and the table only simply allocates data to different areas, and essentially does not solve the technical problem of low availability and security of data storage.

[0035] In order to solve the problems in the prior art, the embodiments of the present application provide a data processing method and device, equipment, readable storage medium and program product. The data processing method can be executed based on a data processing system. First, the data processing system provided by the embodiments of the present application is introduced.

[0036] As shown in Figure 1 The data processing system can include a decentralized scheduler, and the original data stored in the centralized database can be synchronized and migrated to the blockchain system through the decentralized scheduler.

[0037] For example, the original data can include user information data, operation log data, entity data and other types of data, wherein the user information data can be the user information table stored in each database or business system, which can include username, password, registration time, user permission and other information, and is used for user authentication login. The operation log data can include business type, business operation, operation user and operation time, and is similar to the binlog file in Oracle and mysql databases. When the database fails or during master-slave synchronization, data recovery can be performed according to the operation log data. The entity data can be the business data stored in the centralized database, such as call data and signaling data stored in Oracle and MPP databases by the operator.

[0038] It can be understood that the user information data can be the credential data used by user A for authentication login, the operation log data can be the operation process data of user A in the execution of the related operation, and the entity data can be the state data of user A after the execution of a certain operation.

[0039] In a case where the original data can include user information data, operation log data and entity data, the centralized dispatcher can include a Certificate Authority (CA) dispatcher, an operation log dispatcher and an entity data dispatcher. The CA dispatcher can synchronously migrate the user information data to the blockchain system, the operation log dispatcher can synchronously migrate the operation log data to the blockchain system, and the entity data dispatcher can synchronously migrate the entity data to the blockchain system.

[0040] In this way, the centralized stored data can be migrated to the decentralized blockchain system through the three modules of the CA dispatcher, the operation log dispatcher and the entity data dispatcher in the data processing system, the decentralization of data storage is realized, and the availability and security of data storage are improved.

[0041] Based on the above-provided data processing system, one embodiment of the present application further provides a specific implementation of a data processing method. Figure 2 A flowchart of the data processing method provided by one embodiment of the present application is shown. As shown in Figure 2 The data processing method can include the following steps:

[0042] Step 201, obtaining original data stored in a centralized manner, the original data including N types of data, N being a positive integer;

[0043] Step 202, creating N blocks corresponding to the N types of data in a blockchain system;

[0044] Step 203, storing the N types of data in the N blocks in a case where a preset condition is met.

[0045] The specific implementation of each of the above steps will be described in detail below.

[0046] In the embodiment of the present application, the data processing method can obtain original data stored in a centralized manner, wherein the original data can include N types of data; N blocks corresponding to the N types of data can be created in a blockchain system; and the N types of data can be stored in the N blocks in a case where a preset condition is met. In this way, the original data can be classified first to obtain different types of data, and then each type of data can be synchronously stored in a corresponding block of the blockchain system. As a result, the original data stored in a centralized manner can be migrated to a decentralized blockchain system, the fault tolerance and attack resistance of the storage system can be improved, and thus the availability and security of data storage are improved.

[0047] The specific implementation of each of the above steps will be described in detail below.

[0048] In step 201, the centralized storage original data can be acquired, wherein the original data can include N types of data, and the N types of data can include at least one of user information data, operation log data and entity data. For example, the user information data in the centralized storage can be read by the CA scheduler, the operation log data in the centralized storage can be read by the operation log scheduler, and the entity data in the centralized storage can also be read by the entity data scheduler.

[0049] In step 202, N blocks corresponding to the N types of data can be created in the blockchain system. For example, the CA scheduler can create a user information block corresponding to the user information data in the blockchain system, the operation log scheduler can create an operation log block corresponding to the operation log data in the blockchain system, and the entity data scheduler can create a data state block corresponding to the entity data in the blockchain system.

[0050] In step 203, the N types of data can be stored in the N blocks when the preset condition is met. For example, the CA scheduler can store the user information data in the user information block after the user information data is verified, the operation log scheduler can store the operation log data in the operation log block after the operation log data is verified, and the entity data scheduler can store the entity data in the data state block after the entity data is verified. It can be understood that when the N types of data are stored in the N blocks, the data can be directly stored in the blocks, or the data can be stored in the blocks after being encrypted, or the hash value of the data can be calculated, and the data can be stored in the blocks after being chained. The specific storage method is not limited here.

[0051] In some embodiments, the N types of data can include target data, and the target data can be user information data and / or operation log data. The above step 203 can be specifically performed as follows:

[0052] An intelligent contract matched with the target block is deployed in the blockchain system, wherein the target block is a block corresponding to the target data in the N blocks;

[0053] By calling the intelligent contract, a transaction proposal is generated according to the target data and sent to M nodes, and the transaction proposal is used to indicate that the target data is stored in the target block, and M is a positive integer;

[0054] A first verification result sent by a consensus node in response to the transaction proposal is received, and the consensus node is at least one node in the M nodes;

[0055] In the case where the first verification result indicates that the verification is passed, the target data is stored in the target block.

[0056] In the embodiments of the present application, the N types of data can include target data, and the target data can be at least one of user information data and operation log data.

[0057] The following takes the target data as an example of user information data.

[0058] The CA scheduler can read the user information data in the centralized storage, and the user information data in the centralized storage can be as shown in Table 1:

[0059] Table 1

[0060] Serial number System name User name Password Registration time Belonging group User authority 1 XX system user1 Passwd1 2021.2.3 12:00:00 manager Read and write 2 XX system user2 Passwd1 2021.2.3 13:00:00 manager Read and write ... ... ... ... ... ... ...

[0061] The CA scheduler can cache the user information data in the CA scheduler server, then create a user information block in the blockchain system, and deploy a smart contract matched with the user information block in the blockchain system, wherein the smart contract can be considered as a function function, and the block can be operated by calling the smart contract.

[0062] The CA scheduler can generate a transaction proposal according to the user information data by calling the smart contract, and the transaction proposal can be considered as a request for calling the function function of the smart contract, which is used to indicate that the user information data needs to be stored in the user information block. It can be understood that one transaction proposal can be associated with the relevant information of one user.

[0063] The CA scheduler can send the generated transaction proposal to M nodes. It can be understood that there can be multiple Peer nodes in a blockchain system network, and one Peer node can play multiple roles such as endorser, submitter, and storage. The smart contract also needs to be deployed on the Peer node, and the block is read and written by the smart contract. The CA scheduler can send the transaction proposal to M nodes, for example, it can be sent to all nodes playing the role of endorser, and the specific receiver node can be set according to the actual situation. It can be understood that one or more consensus nodes can be included in the M nodes.

[0064] All consensus nodes can verify the transaction proposal, and if the verification is passed, the CA scheduler can store the relevant information of the user associated with the transaction proposal in the user information block.

[0065] In some examples, after the user information data is stored in the user information block, a Certificate Authority (CA) center in the blockchain system can register the authorization of the user and assign a private key and a public key to each user. It can be understood that the RSA asymmetric encryption algorithm can be used to generate the private key and the public key, the private key is privately owned by each user and can be used to encrypt data, and the public key can be used to verify data, thereby ensuring the data security of the blockchain system.

[0066] The following will be described taking the target data as operation log data as an example.

[0067] The operation log scheduler can read the operation log data in the centralized storage, where the operation log data in the centralized storage can be as shown in Table 2:

[0068] Table 2

[0069]

[0070] The operation log scheduler can cache the operation log data in the operation log scheduler server, and then create an operation log block in the blockchain system, and deploy a smart contract matching the operation log block in the blockchain system.

[0071] The operation log scheduler can generate a transaction proposal according to the operation log data by calling the smart contract, which can be used to indicate that the operation log data needs to be stored in the operation log block. It can be understood that one transaction proposal can be associated with the operation information of one operation.

[0072] The operation log scheduler can send the generated transaction proposal to the M nodes, and all consensus nodes can verify the transaction proposal. If the verification is passed, the operation log scheduler can store the operation information of the operation associated with the transaction proposal in the operation log data in the operation log block.

[0073] In some embodiments, the target data can include a plurality of sub-data of the same type, and the i-th transaction proposal is associated with the i-th sub-data of the plurality of sub-data. The above step of storing the target data in the target block when the first verification result indicates that the verification is passed can be specifically performed as follows:

[0074] In the case where the first verification result indicates that the verification is passed, the on-chain operation is performed to obtain a hash value of the transaction proposal, wherein the hash value of the i-th transaction proposal is determined based on the hash value of the i-1-th transaction proposal and the i-th sub-data, and i is an integer greater than 1.

[0075] The hash value of the transaction proposal is stored in the target block.

[0076] In the embodiments of the present application, when the target data is stored in the target block, the storage can be in the form of uplink. For example, when all the consensus nodes can pass the verification of the transaction proposal, a hash operation can be performed to calculate the hash value of the transaction proposal. The target data can include multiple sub-data of the same type, the i th transaction proposal is associated with the i th sub-data of the multiple sub-data, the hash value of the i th transaction proposal can be determined based on the hash value of the (i-1) th transaction proposal and the i th sub-data, and then the hash value of the (i+1) th transaction proposal can be obtained by performing a hash operation on the hash value of the i th transaction proposal and the (i+1) th sub-data, and so on.

[0077] The hash value of each transaction proposal can be stored in the target block. In the embodiments of the present application, the hash value of each transaction proposal is highly dependent on the previous transaction proposal, so that the multiple sub-data of the same type constitute a complete blockchain. If the data is tampered with, all the data on the blockchain needs to be tampered with, which can effectively improve the ability to prevent data tampering and further improve the security of data storage.

[0078] In some embodiments, the target data can include user information data, and the target block can include a user information block. In the case where the first verification result indicates that the verification is passed, the uplink operation can be performed, and the following steps can be specifically performed:

[0079] In the case where the verification result of the i th transaction proposal indicates that the verification is passed, the hash value of the (i-1) th transaction proposal is obtained;

[0080] The hash value of the i th transaction proposal is obtained by a hash operation based on the hash value of the (i-1) th transaction proposal and the username, user password, user authority, business system, and transaction time associated with the i th transaction proposal;

[0081] The hash value of the transaction proposal is stored in the target block, and the following steps can be specifically performed:

[0082] The hash value of the i th transaction proposal is stored in the user information block, so that the authentication center of the blockchain system responds to the hash value of the i th transaction proposal to register and authorize the i th user corresponding to the i th transaction proposal, and allocates a public and private key to the i th user.

[0083] In the embodiments of the present application, the target data can include user information data, and the target block can be a user information block corresponding to the user information data. The uplink operation instruction of the user information data can be as shown in Table 3:

[0084] Table 3

[0085]

[0086]

[0087] In a case where the verification result of the i th transaction proposal indicates that the verification is passed, the hash value of the (i-1) th transaction proposal can be obtained, for example, if the i th transaction proposal corresponds to the Tx2 transaction command, the Tx1 hash value (i.e., the hash value of the (i-1) th transaction proposal) can be obtained after the verification is passed, and then the Tx2 hash value is obtained by performing a hash operation on the Tx1 hash value and the username, user password, user authority, business system, and transaction time associated with the i th transaction proposal. The transaction time here can refer to the registration time of the user.

[0088] After obtaining the hash value of the i th transaction proposal, the hash value of the i th transaction proposal can be stored in the user information block. In this way, the CA center of the blockchain system can perform registration authorization for the i th user corresponding to the i th transaction proposal in response to the hash value of the i th transaction proposal, and allocate a public-private key to the i th user to ensure the security of the blockchain system.

[0089] The structure of the user information block can be as shown in Figure 3 Each user information in the user information block is stored in a chain structure, and the next hash value is obtained by performing a hash operation on the previous hash value. All user information data constitute a complete blockchain, and if it is desired to tamper with the user information data, all data on the user information blockchain needs to be tampered with, which can effectively improve the ability to prevent data tampering.

[0090] In some embodiments, the target data can include operation log data, and the target block can include an operation log block. In a case where the first verification result indicates that the verification is passed, the on-chain operation can be performed by specifically performing the following steps:

[0091] In a case where the verification result of the i th transaction proposal indicates that the verification is passed, the hash value of the (i-1) th transaction proposal is obtained;

[0092] The hash value of the i th transaction proposal is obtained by performing a hash operation on the hash value of the (i-1) th transaction proposal and the operation user, operation log, business system, and transaction time associated with the i th transaction proposal;

[0093] The hash value of the transaction proposal is stored in the target block, including:

[0094] The hash value of the i th transaction proposal is stored in the operation log block.

[0095] In the embodiments of the present application, the target data can include operation log data, and the target block can be an operation log block corresponding to the operation log data. The on-chain operation instruction of the operation log data can be as shown in Table 4:

[0096] Table 4

[0097]

[0098] In a case where the verification result of the i th transaction proposal indicates that the verification is passed, the hash value of the (i-1) th transaction proposal can be obtained, for example, if the i th transaction proposal corresponds to the Tx2 transaction command, the Tx1 hash value (i.e., the hash value of the (i-1) th transaction proposal) can be obtained after the verification is passed, and then the Tx2 hash value is obtained by performing a hash operation on the Tx1 hash value and the operation user, the operation log, the business system, and the transaction time associated with the i th transaction proposal. The transaction time here can refer to the operation time of the operation log.

[0099] After obtaining the hash value of the i th transaction proposal, the hash value of the i th transaction proposal can be stored in the operation log block. The structure of the operation log block can be as shown in Figure 4 Each operation log in the operation log block is stored in a chain structure, and the hash value of the next operation log is obtained by performing a hash operation on the hash value of the previous operation log. All operation log data constitutes a complete block chain. If it is desired to tamper with the operation log data, all data on the operation log block chain needs to be tampered with, which can effectively improve the ability to prevent data tampering.

[0100] In some embodiments, multiple sub-data of the same type are sorted according to a preset sorting rule.

[0101] In the embodiments of the present application, after the CA scheduler reads the user information data in the centralized storage, the user information data can be sorted according to a preset sorting rule, for example, the registration time related field can be arranged in ascending order or descending order. Similarly, the operation log data can also be sorted according to a preset sorting rule. In this way, in the subsequent chain operation process, the order of the data can be further ensured.

[0102] In some embodiments, the N types of data can include entity data, and the step 203 can be specifically performed as follows:

[0103] An operation user field in the entity data is obtained;

[0104] The entity data is encrypted by a private key matched with the operation user field to obtain first data;

[0105] The first data is sent to M nodes, where M is a positive integer;

[0106] A second verification result sent by a consensus node in response to the first data is received, the consensus node being at least one of the M nodes, and the second verification result being obtained by decrypting the first data by a public key matched with the operation user field by the consensus node;

[0107] In a case where the second verification result indicates that the verification is passed, the entity data is stored into the data state block.

[0108] In the embodiments of the present application, the entity data scheduler can read the entity data in the centralized storage, where the entity data in the centralized storage can be as shown in Table 5:

[0109] Table 5

[0110]

[0111] The entity data scheduler can cache the entity data into the entity data scheduler server, and then can obtain the operation user field of each piece of data, encrypt the entity data by using the private key matched with the operation user field to obtain first data. The private key matched with the operation user field can be a private key allocated by the CA center of the blockchain system when the related information of the operation user is stored into the user information block.

[0112] The first data can be sent to the M nodes, and the consensus nodes in the M nodes can decrypt and verify the first data by using the public key matched with the operation user field. If the verification is passed, the entity data can be stored into the data state block. It can be understood that the entity data can be directly stored into the data state block, or the entity data can be encrypted and then stored into the data state block. The specific storage mode can be set according to actual needs, which is not limited here. In this way, if the entity data needs to be used subsequently, the data in the data state block can be directly queried, and the data query efficiency of the blockchain system is effectively improved.

[0113] Based on the data processing method provided in the above embodiments, the present application further provides an embodiment of a data processing device.

[0114] Figure 5 The structure schematic diagram of the data processing device provided in another embodiment of the present application is shown, and only parts related to the embodiments of the present application are shown for the convenience of description.

[0115] Referring to Figure 5 , the data processing device 500 can include:

[0116] The acquisition module 501 is configured to acquire original data of the centralized storage, and the original data includes N types of data, where N is a positive integer.

[0117] The creation module 502 is configured to create N blocks corresponding to the N types of data in the blockchain system.

[0118] The storage module 503 is configured to store the N types of data into the N blocks in a case where a preset condition is met.

[0119] In some embodiments, the storage module 503 can include:

[0120] a deployment unit configured to deploy the smart contract matched with the target block in the blockchain system, wherein the target block is a block corresponding to the target data in the N blocks, the N types of data include the target data, and the target data is user information data and / or operation log data;

[0121] a calling unit configured to generate a transaction proposal according to the target data and send the transaction proposal to M nodes by calling the smart contract, the transaction proposal being used to indicate that the target data is stored in the target block, and M being a positive integer;

[0122] a receiving unit configured to receive a first verification result sent by a consensus node in response to the transaction proposal, the consensus node being at least one of the M nodes;

[0123] a storage unit configured to store the target data in the target block if the first verification result indicates that the verification is passed.

[0124] In some embodiments, the storage unit can include:

[0125] an on-chain sub-unit configured to perform an on-chain operation to obtain a hash value of the transaction proposal if the first verification result indicates that the verification is passed, wherein the target data includes a plurality of sub-data of the same type, an i-th transaction proposal is associated with an i-th sub-data of the plurality of sub-data, and the hash value of the i-th transaction proposal is determined based on a hash value of an (i-1)-th transaction proposal and the i-th sub-data, i being an integer greater than 1;

[0126] a storage sub-unit configured to store the hash value of the transaction proposal in the target block.

[0127] In some embodiments, the plurality of sub-data of the same type are sorted according to a preset sorting rule.

[0128] In some embodiments, the target data can include user information data, the target block can include a user information block, and the on-chain sub-unit is further configured to:

[0129] obtain the hash value of the (i-1)-th transaction proposal if a verification result of the i-th transaction proposal indicates that the verification is passed;

[0130] obtain the hash value of the i-th transaction proposal by hash operation according to the hash value of the (i-1)-th transaction proposal and a user name, a user password, a user authority, a business system, and a transaction time associated with the i-th transaction proposal;

[0131] the storage sub-unit is further configured to:

[0132] The hash value of the i th transaction proposal is stored in the user information block, so that the authentication center of the blockchain system registers and authorizes the i th user corresponding to the i th transaction proposal in response to the hash value of the i th transaction proposal, and allocates a public and private key to the i th user.

[0133] In some embodiments, the target data can include operation log data, the target block can include an operation log block, and the on-chain subunit is further configured to:

[0134] In a case where the verification result of the i th transaction proposal indicates that the verification is passed, the hash value of the i-1 th transaction proposal is obtained.

[0135] According to the hash value of the i-1 th transaction proposal and the operation user, the operation log, the business system, and the transaction time associated with the i th transaction proposal, the hash value of the i th transaction proposal is obtained through hash operation.

[0136] The storage subunit is further configured to:

[0137] The hash value of the i th transaction proposal is stored in the operation log block.

[0138] In some embodiments, the storage module 503 can include:

[0139] The operation user field in the entity data is obtained, and the N types of data include entity data.

[0140] The entity data is encrypted by the private key matched by the operation user field to obtain first data.

[0141] The first data is sent to M nodes, and M is a positive integer.

[0142] A second verification result sent by a consensus node in response to the first data is received, the consensus node is at least one node of the M nodes, and the second verification result is obtained based on the consensus node decrypting the first data by the public key matched by the operation user field.

[0143] In a case where the second verification result indicates that the verification is passed, the entity data is stored in the data state block.

[0144] It should be noted that the information interaction, execution process, and the like between the above-described devices / units are based on the same concept as the method embodiments of the present application, and are devices corresponding to the above-described data processing method. All implementation manners in the above-described method embodiments are applicable to the embodiments of the device, and the specific functions and technical effects brought by them are specifically referable to the method embodiments part, and will not be repeated here.

[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for convenient distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0146] Figure 6 A hardware structure schematic diagram of an electronic device provided by yet another embodiment of the present application is shown.

[0147] The device can include a processor 601 and a memory 602 in which programs or instructions are stored.

[0148] The processor 601 implements the steps in any of the above method embodiments when executing the programs.

[0149] For example, the programs can be divided into one or more modules / units, one or more modules / units are stored in the memory 602 and executed by the processor 601 to complete the present application. One or more modules / units can be a series of program instruction segments that can complete a specific function, which is used to describe the execution process of the program in the device.

[0150] Specifically, the above processor 601 can include a central processing unit (CPU), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or can be configured as one or more integrated circuits that implement one or more embodiments of the present application.

[0151] The memory 602 can include mass storage for data or instructions. As an example and not by way of limitation, the memory 602 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc (e.g., a compact disc (CD) or a digital versatile disc (DVD)), a solid-state drive (SSD), a USB drive, or a combination of two or more of these. Where appropriate, the memory 602 can include removable or non-removable (or fixed) media. Where appropriate, the memory 602 can be internal or external to the integrated gateway disaster recovery appliance. In particular embodiments, the memory 602 is non-volatile, solid-state memory.

[0152] The memory can include read-only memory (ROM), random-access memory (RAM), magnetic disk storage mediums, optical storage mediums, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (by one or more processors), is operable to access the data and / or instructions as described with reference to the methods according to the aspects of the present disclosure.

[0153] The processor 601 implements any of the above-described methods by reading and executing program code stored in the memory 602.

[0154] In one example, the electronic device also includes a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 and accomplish communication therebetween.

[0155] The communication interface 603 is mainly used to realize the communication between the modules, devices, units, and / or equipment in the embodiments of the present application.

[0156] Bus 610 includes hardware, software, or both, to couple components of the online data traffic metering device to each other and to couple components to other parallel components for communication and transferring of data. While bus 610 is shown for the sake of clarity as a single bus, it can include one or more buses operating together. Bus 610 can be implemented using any suitable type of bus structure including, for example, a system bus, a memory bus with an external memory controller, a peripheral component interconnect (PCI) bus, an accelerated graphics port (AGP) bus, industry standard architecture (ISA) bus, a super I / O bus, a video electronics standards board (VLB) bus, a low pin count (LPC) bus, a high-performance processor bus, a HyperTransport bus, a proprietary current or future bus type, or a combination of busses, and the like. Bus 610 can also be implemented as a mixture of any of the above, as well as implementations not shown herein. Although this application describes and illustrates a particular bus, this application contemplates any suitable bus or interconnect.

[0157] In addition, the method in the above embodiments can be implemented by a readable storage medium. The readable storage medium stores programs or instructions; the programs or instructions are executed by a processor to implement any of the above methods. The readable storage medium can be read by a machine such as a computer.

[0158] The embodiments of the present application further provide a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used to run programs or instructions to implement the processes of the above method embodiments and achieve the same technical effects. To avoid repetition, details are not described here.

[0159] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0160] The embodiments of the present application provide a computer program product stored in a readable storage medium, which is executed by at least one processor to implement the processes of the above method embodiments and achieve the same technical effects. To avoid repetition, details are not described here.

[0161] It should be understood that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted. In the above embodiments, several specific steps are described and shown as examples. However, the processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order of steps, after understanding the spirit of the present application.

[0162] The functional modules shown in the structural block diagram described above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine-readable medium" can include any medium that can store or transfer information. Examples of the machine-readable medium include an electronic circuit, a semiconductor memory device, a ROM, a flash memory, an erasable ROM (EROM), a floppy diskette, a CD-ROM, an optical disk, a hard disk, a fiber optic medium, a radio frequency (RF) link, and the like. The code segments can be downloaded via a computer network, such as the Internet, an intranet, and the like.

[0163] It is also noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.

[0164] The aspects of the disclosure described above with reference to the flow diagrams and / or block diagrams of the methods, apparatuses (systems) and program products according to the embodiments of the present disclosure. It should be understood that each block in the flow diagrams and / or block diagrams and the combination of blocks in the flow diagrams and / or block diagrams can be implemented by computer program or instructions. These programs or instructions can be provided to a general-purpose computer, a special-purpose computer, or other programmable data processing apparatuses to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatuses enable the implementation of the functions / actions specified in one or more blocks of the flow diagrams and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each block in the block diagram and / or flow diagram and the combination of blocks in the block diagram and / or flow diagram can also be implemented by special hardware that performs the specified functions or actions, or can be implemented by a combination of special hardware and computer instructions.

[0165] The above merely describes a specific implementation of the present application. Those skilled in the art can clearly understand the specific working processes of the system, modules and units described above for the convenience and brevity of description, and can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein again. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application.

Claims

1. A data processing method, characterized by, The method comprises: acquiring centralized storage of original data, the original data comprising N types of data, N being a positive integer; the N types of data comprising user information data, operation log data and entity data; creating N blocks corresponding to the N types of data in a blockchain system, the N blocks comprising a user information block, an operation log block and a data state block; storing the N types of data in the N blocks under a preset condition; the N types of data comprising target data, the target data being the user information data and / or the operation log data; the storing of the N types of data in the N blocks under the preset condition comprising: deploying a smart contract matched with a target block in the blockchain system, the target block being a block corresponding to the target data in the N blocks; generating a transaction proposal according to the target data by calling the smart contract and sending the transaction proposal to M nodes, the transaction proposal being used to indicate that the target data is stored in the target block, M being a positive integer; receiving a first verification result sent by a consensus node in response to the transaction proposal, the consensus node being at least one node in the M nodes; storing the target data in the target block when the first verification result indicates that the verification is passed; the target data comprising a plurality of sub-data of the same type, wherein an i-th transaction proposal is associated with an i-th sub-data in the plurality of sub-data; the storing of the target data in the target block when the first verification result indicates that the verification is passed comprising: performing a chain operation to obtain a hash value of the transaction proposal when the first verification result indicates that the verification is passed, wherein the hash value of the i-th transaction proposal is determined based on a hash value of an (i-1)-th transaction proposal and the i-th sub-data, i being an integer greater than 1; storing the hash value of the transaction proposal in the target block; the N types of data comprising entity data; the storing of the N types of data in the N blocks under the preset condition comprising: obtaining an operation user field in the entity data; encrypting the entity data by a private key matched with the operation user field to obtain first data; sending the first data to M nodes, M being a positive integer; receiving a second verification result sent by a consensus node in response to the first data, the consensus node being at least one node in the M nodes, the second verification result being obtained by decrypting the first data by a public key matched with the operation user field by the consensus node; storing the entity data in a data state block when the second verification result indicates that the verification is passed.

2. The method of claim 1, wherein, the plurality of sub-data of the same type are sorted according to a preset sorting rule.

3. The method of claim 1, wherein, the target data comprising user information data, and the target block comprising a user information block. The uplink operation is performed in the case where the first verification result indicates that the verification is passed, and the uplink operation comprises: In the case where the verification result of the i th transaction proposal indicates that the verification is passed, the hash value of the (i-1) th transaction proposal is obtained; According to the hash value of the (i-1) th transaction proposal and the username, user password, user authority, business system and transaction time associated with the i th transaction proposal, the hash value of the i th transaction proposal is obtained through hash operation; The hash value of the transaction proposal is stored in the target block, and the method comprises: The hash value of the i th transaction proposal is stored in the user information block, so that the authentication center of the blockchain system registers and authorizes the i th user corresponding to the i th transaction proposal in response to the hash value of the i th transaction proposal, and allocates a public-private key to the i th user.

4. The method of claim 1, wherein, The target data comprises operation log data, and the target block comprises an operation log block; The uplink operation is performed in the case where the first verification result indicates that the verification is passed, and the uplink operation comprises: In the case where the verification result of the i th transaction proposal indicates that the verification is passed, the hash value of the (i-1) th transaction proposal is obtained; According to the hash value of the (i-1) th transaction proposal and the operation user, operation log, business system and transaction time associated with the i th transaction proposal, the hash value of the i th transaction proposal is obtained through hash operation; The hash value of the transaction proposal is stored in the target block, and the method comprises: The hash value of the i th transaction proposal is stored in the operation log block.

5. A data processing apparatus, characterized by, The device comprises: An acquisition module is configured to acquire centralized storage original data, wherein the original data comprises N types of data, and N is a positive integer; the N types of data comprise user information data, operation log data and entity data; A creation module is configured to create N blocks corresponding to the N types of data in a blockchain system; the N blocks correspond to a user information block, an operation log block and a data state block; A storage module is configured to store the N types of data in the N blocks in the case where a preset condition is met; The N types of data comprise target data, and the target data is the user information data and / or the operation log data; the storage module comprises: A deployment sub-module is configured to deploy a smart contract matched with a target block in the blockchain system, wherein the target block is a block corresponding to the target data in the N blocks; A proposal sending sub-module is configured to generate a transaction proposal according to the target data by calling the smart contract and send the transaction proposal to M nodes, wherein the transaction proposal is used to indicate that the target data is stored in the target block, and M is a positive integer; A first receiving sub-module is configured to receive a first verification result sent by a consensus node in response to the transaction proposal, wherein the consensus node is at least one node in the M nodes; A first storage sub-module is configured to store the target data in the target block in the case where the first verification result indicates that the verification is passed. The target data includes a plurality of sub-data of the same type, wherein the ith transaction proposal is associated with the ith sub-data of the plurality of sub-data; the first storage submodule includes: an upper chain unit, configured to, if the first verification result indicates that the verification is passed, perform an upper chain operation to obtain a hash value of the transaction proposal, wherein the hash value of the ith transaction proposal is determined based on a hash value of an (i-1)th transaction proposal and the ith sub-data, i being an integer greater than 1; a storage unit, configured to store the hash value of the transaction proposal into the target block; The N types of data include entity data; the storage module includes: a field acquisition submodule, configured to acquire an operation user field in the entity data; a data encryption submodule, configured to encrypt the entity data by using a private key matched with the operation user field to obtain first data; a data sending submodule, configured to send the first data to M nodes, M being a positive integer; a second receiving submodule, configured to receive a second verification result sent by a consensus node in response to the first data, the consensus node being at least one of the M nodes, the second verification result being obtained by decrypting the first data by using a public key matched with the operation user field of the consensus node; a second storage submodule, configured to, if the second verification result indicates that the verification is passed, store the entity data into a data state block.

6. An electronic device, comprising: The device includes a processor and a memory storing programs or instructions; The processor executes the programs or instructions to implement the method of any one of claims 1-4.

7. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, which are executed by the processor to implement the method of any one of claims 1-4.

8. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device to make the electronic device perform the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Data storage method and device based on block chain, equipment and storage medium

    CN109922131A

  • Block chain-based digital asset transaction method and system, equipment and storage medium

    CN112862469A