Data storage method and device, computer equipment, storage medium and computer program product
By establishing multiple overview information sets and blockchains in a distributed database, information sharing among nodes is realized, and the problem of low storage efficiency of distributed databases is solved and efficient data storage is achieved.
Patent Information
- Application Number
- CN202411035505.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-20
AI Technical Summary
Existing data storage methods based on distributed databases are prone to problems of multiple storage and missing storage, resulting in low data storage efficiency.
By establishing multiple overview information sets in the target database and building a target blockchain based on these information sets, information sharing between multiple nodes is realized, and block processing and storage are performed when high concurrent data is received, and storage is determined. Information to avoid excessive storage and missed storage.
It effectively avoids the problems of excessive storage and missed storage, shortens storage time, and improves the efficiency of data storage.
Smart Images

Figure CN119166041A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a data method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] Banking systems usually generate a lot of high-concurrency data, which needs to be stored, such as transaction-type data and log-type data.
[0003] In the prior art, the storage of high-concurrency data is usually achieved based on a distributed database.
[0004] However, existing data storage methods based on distributed databases are prone to problems of over-storage and omission, and the storage time is also long, which leads to low data storage efficiency. Summary of the invention
[0005] Based on this, it is necessary to provide a data storage method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve data storage efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides a data storage method, comprising:
[0007] A plurality of overview information sets are established according to a target database, the target database includes a plurality of nodes, the plurality of overview information sets respectively correspond to the plurality of nodes, the overview information sets are used to store overview information of data stored in the nodes, and the target database is a distributed database; a target blockchain of the target database is constructed according to the plurality of overview information sets, and the target blockchain is used to realize information sharing among a plurality of nodes in the target database; when target data is received, the target data is stored based on the target blockchain and the target database, and the target data is high-concurrency data.
[0008] In one of the embodiments, the target data is stored based on the target blockchain and the target database, including: dividing the target data into blocks to obtain multiple target sub-data; and storing the multiple target sub-data based on the target blockchain and the target database.
[0009] In one of the embodiments, the storing of the multiple target sub-data based on the target blockchain and the target database includes: determining summary information of the multiple target sub-data; based on the summary information of the multiple target data, the target blockchain and the target database store the multiple target sub-data.
[0010] In one of the embodiments, based on the overview information of the multiple target sub-data, the target blockchain and the target database store the multiple target sub-data, including: for each target sub-data, determining the storage information of the target sub-data according to the overview information of the target sub-data and the target blockchain; and when the storage information indicates the execution of the storage process, storing the target sub-data in the target database.
[0011] In one of the embodiments, the storage information of the target sub-data is determined based on the overview information of the target sub-data and the target blockchain, including: determining whether the overview information is included in the multiple overview information sets based on the target blockchain; if the overview information is included in the multiple overview information sets, determining that the storage information is the first storage information, and the first storage information is used to indicate that the storage process is not executed; if the overview information is not included in the multiple overview information sets, determining that the storage information is the second storage information, and the second storage information is used to indicate that the storage process is executed.
[0012] In one embodiment, storing the target sub-data into a target database includes: determining a target node corresponding to the target sub-data in the target database; storing the target sub-data in the target node, and storing summary information of the target sub-data in a summary information set corresponding to the target node.
[0013] In a second aspect, the present application also provides a data storage device, comprising:
[0014] A first execution module, configured to establish a plurality of summary information sets according to a target database, wherein the target database includes a plurality of nodes, the plurality of summary information sets respectively correspond to the plurality of nodes, and the summary information sets are used to store summary information of data stored in the nodes, and the target database is a distributed database;
[0015] A second execution module is used to construct a target blockchain of the target database according to the multiple overview information sets, and the target blockchain is used to realize information sharing among multiple nodes in the target database;
[0016] The third execution module is used to store the target data based on the target blockchain and the target database when the target data is received, and the target data is high-concurrency data.
[0017] In one embodiment, the third execution module is specifically used to perform block processing on the target data to obtain multiple target sub-data; and store the multiple target sub-data based on the target blockchain and the target database.
[0018] In one embodiment, the third execution module is specifically used to determine, for each target sub-data, the storage information of the target sub-data according to the overview information of the target sub-data and the target blockchain; when the storage information indicates the execution of the storage process, the target sub-data is stored in the target database.
[0019] In one embodiment, the third execution module is specifically used to determine whether the multiple overview information sets include the overview information based on the target blockchain; if the multiple overview information sets include the overview information, then determine that the storage information is the first storage information, and the first storage information is used to indicate that the storage process is not executed; if the multiple overview information sets do not include the overview information, then determine that the storage information is the second storage information, and the second storage information is used to indicate that the storage process is executed.
[0020] In one embodiment, the third execution module is specifically used to determine the target node corresponding to the target sub-data in the target database; store the target sub-data in the target node, and store the summary information of the target sub-data in the summary information set corresponding to the target node.
[0021] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, any of the steps described in the first aspect is implemented.
[0022] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computer program implements any of the steps described in the first aspect.
[0023] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements any of the steps described in the first aspect.
[0024] The above-mentioned data storage method, device, computer equipment, storage medium and computer program product establish multiple overview information sets according to the target database, the target database includes multiple nodes, the multiple overview information sets correspond to the multiple nodes respectively, the overview information set is used to store the overview information of the data stored in the node, and the target database is a distributed database; the target blockchain of the target database is constructed according to the multiple overview information sets, and the target blockchain is used to realize information sharing between multiple nodes in the target database; when the target data is received, the target data is stored based on the target blockchain and the target database, and the target data is high-concurrency data. The data storage method provided by the present application establishes multiple overview information sets corresponding to multiple nodes in the target database, and constructs the target blockchain of the target database based on the multiple overview information sets to realize information sharing between the nodes in the target database. When storing data, the problem of multiple storage and missing storage can be avoided, and the storage time is effectively shortened. The data storage method provided by the present application can effectively improve the efficiency of data storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 A schematic diagram of a flow chart of a data storage method in one embodiment;
[0027] Figure 2 It is a flowchart of a method for storing the target data based on the target blockchain and the target database in one embodiment;
[0028] Figure 3 It is a flowchart of a method for storing the multiple target sub-data based on the target blockchain and the target database in one embodiment;
[0029] Figure 4 It is a flowchart of a method for storing the multiple target sub-data based on the summary information of the multiple target sub-data, the target blockchain and the target database in an embodiment;
[0030] Figure 5 It is a flowchart of a method for determining storage information of the target sub-data according to the summary information of the target sub-data and the target blockchain in one embodiment;
[0031] Figure 6A schematic diagram of a flow chart of a method for storing the target sub-data in a target database in one embodiment;
[0032] Figure 7 A schematic diagram of a flow chart of a data storage method in another embodiment;
[0033] Figure 8 is a structural block diagram of a data storage device in one embodiment;
[0034] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0036] Banking systems usually generate a lot of high-concurrency data, which needs to be stored, such as transaction-type data and log-type data.
[0037] In the prior art, the storage of high-concurrency data is usually achieved based on a distributed database.
[0038] However, existing data storage methods based on distributed databases are prone to problems of over-storage and omission, and the storage time is also long, which leads to low data storage efficiency.
[0039] In view of this, the present application provides a data storage method, which can effectively improve the efficiency of data storage.
[0040] The data storage method provided in the embodiment of the present application may be executed by a computer device, which may be a server.
[0041] In an exemplary embodiment, Figure 1 As shown, a data storage method is provided, which includes the following steps 101 to 103. Among them:
[0042] Step 101: Establish multiple overview information sets according to the target database.
[0043] The target database includes a plurality of nodes, the plurality of summary information sets correspond to the plurality of nodes respectively, the summary information sets are used to store summary information of data stored in the nodes, and the target database may be a distributed database.
[0044] Optionally, the distributed database refers to a database composed of a collection of several stations, which can also be called nodes. They are connected together in a communication network. Each node is an independent database system. They all have their own databases, central processing units, terminals and their own local database management systems. Therefore, the distributed database system can be regarded as a union of a series of centralized database systems. They belong to the same system logically, but are distributed in physical structure.
[0045] In an optional embodiment of the present application, multiple overview information sets can be established based on the set number information, the corresponding relationship information and the target database.
[0046] The set number information is used to represent the number of the summary information sets, and the corresponding relationship information is used to represent the corresponding relationship between each summary information set and each node.
[0047] In one possible implementation, the set number information can be determined according to the number of nodes included in the distributed database. Assuming that the distributed database includes 10 nodes, the set number information is also 10, that is, the overview information sets are set with 10; each node in the distributed database is set with identification information. Assuming that there are 3 nodes in the distributed database, namely the first node, the second node and the third node, the identification information of the first node is A, the identification information of the second node is B, and the identification information of the third node is C, then there are correspondingly 3 overview information sets, and the 3 overview information sets are set to be overview information set A, overview information set B and overview information set C, respectively. These 3 overview information sets correspond to the 3 nodes, respectively. Specifically, a table can be set to store the correspondence between the multiple nodes and the multiple overview information sets. Based on the table, the correspondence between the multiple nodes and the multiple overview information sets can be determined. A database can also be set to store the correspondence between the multiple nodes and the multiple overview information sets. Based on the database, the correspondence between the multiple nodes and the multiple overview information sets can be determined.
[0048] Step 102: construct a target blockchain of the target database according to the multiple overview information sets.
[0049] Among them, the target blockchain is used to realize information sharing among multiple nodes in the target database.
[0050] Optionally, the blockchain refers to a data structure, a chain composed of blocks, each of which stores certain information. In essence, the blockchain can be understood as a shared database. The data or information stored in the blockchain has the characteristics of "unforgeable", "traceable throughout the process", "traceable", "open and transparent" and "collectively maintained".
[0051] In one possible implementation, a target blockchain of the target database may be constructed based on algorithm processing and the multiple overview information sets.
[0052] Step 103: When the target data is received, the target data is stored based on the target blockchain and the target database.
[0053] Among them, the target data is high-concurrency data.
[0054] Optionally, high concurrency refers to a situation in which "a large number of operation requests are encountered in a short period of time" during system operation. The high concurrency data is the data generated under the high concurrency situation, that is, a large amount of data generated in a short period of time.
[0055] In one possible implementation, when high-concurrency data is received, the high-concurrency data is stored in the target database based on the target blockchain.
[0056] In another possible implementation, when high-concurrency data is received, the high-concurrency data can be processed first, and then the processed high-concurrency data can be stored in the target database based on the target blockchain.
[0057] The above data storage method establishes multiple overview information sets according to the target database, the target database includes multiple nodes, the multiple overview information sets correspond to the multiple nodes respectively, the overview information set is used to store the overview information of the data stored in the node, and the target database is a distributed database; the target blockchain of the target database is constructed according to the multiple overview information sets, and the target blockchain is used to realize information sharing between multiple nodes in the target database; when the target data is received, the target data is stored based on the target blockchain and the target database, and the target data is high-concurrency data. The data storage method provided by the present application establishes multiple overview information sets corresponding to multiple nodes in the target database, and constructs the target blockchain of the target database based on the multiple overview information sets to realize information sharing between the nodes in the target database. When storing data, the problems of multiple storage and missing storage can be avoided, and the storage time can be effectively shortened. The data storage method provided by the present application can effectively improve the efficiency of data storage.
[0058] In an exemplary embodiment, Figure 2 As shown, storing the target data based on the target blockchain and the target database includes the following steps:
[0059] Step 201: block-process the target data to obtain a plurality of target sub-data.
[0060] In a possible implementation, the target data may be divided into blocks based on the number of nodes in the target database. Assuming that there are three nodes in the target database, the target data is divided into blocks to obtain three target sub-data.
[0061] In another possible implementation, a technician may pre-set the size of each target sub-data, and perform block processing on the target data based on the pre-set size of each target sub-data. Assuming that the size of each target sub-data is N and the size of the target data is 3N, the target data is processed in blocks to obtain 3 target sub-data.
[0062] Step 202: Store the multiple target sub-data based on the target blockchain and the target database.
[0063] In a possible implementation, if the target data is divided into blocks based on the number of nodes in the target database, each target sub-data is stored in each node in the target database.
[0064] In another possible implementation, if the target data is segmented based on the size of each target sub-data pre-set by a technician, each target sub-data is randomly stored in a node in the target database, or each target sub-data is stored in a node in the target database according to a preset rule.
[0065] The method described above of dividing the target data into blocks to obtain multiple target sub-data, and then storing the multiple target sub-data based on the target blockchain and the target database can effectively shorten the data storage time and thus effectively improve the efficiency of data storage.
[0066] In an exemplary embodiment, Figure 3 As shown, storing the multiple target sub-data based on the target blockchain and the target database includes the following steps:
[0067] Step 301, determining summary information of the plurality of target sub-data;
[0068] Step 302: Based on the overview information of the multiple target data, the target blockchain and the target database store the multiple target sub-data.
[0069] In one possible implementation, data analysis can be performed on the multiple target sub-data, and the data analysis results can be determined as summary information of the multiple target sub-data. Based on the summary information of the multiple target data, the target blockchain and the target database store the multiple target sub-data.
[0070] In another possible implementation method, feature extraction may be performed on the multiple target sub-data, and the feature extraction results may be determined as summary information of the multiple target sub-data. Based on the summary information of the multiple target data, the target blockchain and the target database may store the multiple target sub-data.
[0071] In another possible implementation method, the multiple target sub-data may also be subjected to data preprocessing, and the data preprocessing results may be determined as summary information of the multiple target sub-data. Based on the summary information of the multiple target data, the target blockchain and the target database may store the multiple target sub-data.
[0072] In an exemplary embodiment, Figure 4 As shown, based on the summary information of the multiple target sub-data, the target blockchain and the target database store the multiple target sub-data, including the following steps:
[0073] Step 401: For each target sub-data, determine the storage information of the target sub-data according to the overview information of the target sub-data and the target blockchain.
[0074] In one possible implementation method, it is possible to first determine whether there is first overview information similar to the overview information of the target sub-data in multiple overview information sets in the blockchain, and then determine the similarity between the first overview information and the overview information of the target sub-data. If the similarity is greater than a preset similarity threshold, it can be determined that the storage information does not execute the storage process. If the similarity is less than the preset similarity threshold, it can be determined that the storage information executes the storage process.
[0075] Step 402: When the storage information indicates to execute the storage process, the target sub-data is stored in the target database.
[0076] In a possible implementation manner, if it is determined according to the storage information that a process of storing the target sub-data needs to be executed, the target sub-data is stored in the target database.
[0077] In another possible implementation manner, if it is determined according to the storage information that there is no need to execute the process of storing the target sub-data, the target sub-data is not stored in the target database.
[0078] In an exemplary embodiment, Figure 5 As shown, the storage information of the target sub-data is determined according to the summary information of the target sub-data and the target blockchain, including the following steps:
[0079] Step 501: Determine whether the multiple summary information sets include the summary information based on the target blockchain.
[0080] Step 502: If the plurality of summary information sets include the summary information, determine that the storage information is the first storage information.
[0081] The first storage information is used to indicate not to execute the storage process.
[0082] Step 503: If the plurality of summary information sets do not include the summary information, determine that the storage information is the second storage information.
[0083] The second storage information is used to instruct execution of the storage process.
[0084] In one possible implementation, the storage information can be determined by determining whether the multiple overview information sets include the overview information. Specifically, if the multiple overview information sets include the overview information, the storage information is determined to be the first storage information, that is, the storage process is not executed; if the multiple overview information sets do not include the overview information, the storage information is determined to be the second storage information, that is, the storage process is executed.
[0085] In an exemplary embodiment, Figure 6 As shown, storing the target sub-data into the target database includes the following steps:
[0086] Step 601, determining the target node corresponding to the target sub-data in the target database;
[0087] In one possible implementation, when the storage information is the second storage information, the storage process can be determined to be executed, and the target node can be determined from multiple nodes in the target database. Specifically, the similarity between the overview information of the target sub-data and multiple overview information sets can be determined first, and the node corresponding to the overview information set with the highest similarity can be determined as the target node. The target node can also be determined from multiple nodes based on the data type of the target sub-data, and the target node can also be determined from multiple nodes based on other preset rules.
[0088] Step 602: Store the target sub-data in the target node, and store summary information of the target sub-data in a summary information set corresponding to the target node.
[0089] In one possible implementation, after determining the target node, a storage process is executed to store the target sub-data in the target node, and to store summary information of the target sub-data in a summary information set corresponding to the target node to achieve information sharing among multiple nodes.
[0090] In an exemplary embodiment, Figure 7 As shown, another data storage method is provided, the method comprising the following steps:
[0091] Step 701: Establish multiple overview information sets according to the target database.
[0092] The target database includes a plurality of nodes, the plurality of summary information sets correspond to the plurality of nodes respectively, the summary information sets are used to store summary information of data stored in the nodes, and the target database is a distributed database.
[0093] Step 702: construct a target blockchain of the target database according to the multiple overview information sets.
[0094] Among them, the target blockchain is used to realize information sharing among multiple nodes in the target database.
[0095] Step 703: When receiving the target data, the target data is divided into blocks to obtain a plurality of target sub-data; and summary information of the plurality of target sub-data is determined.
[0096] Step 704: For each target sub-data, determine whether the multiple overview information sets include the overview information based on the target blockchain; if the multiple overview information sets include the overview information, determine that the storage information is the first storage information, and the first storage information is used to indicate that the storage process is not executed; if the multiple overview information sets do not include the overview information, determine that the storage information is the second storage information, and the second storage information is used to indicate that the storage process is executed.
[0097] Step 705: When the storage information indicates to execute the storage process, determine the target node corresponding to the target sub-data in the target database; store the target sub-data in the target node, and store the summary information of the target sub-data in the summary information set corresponding to the target node.
[0098] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0099] Based on the same inventive concept, the embodiment of the present application also provides a data storage device for implementing the data storage method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more data storage device embodiments provided below can refer to the limitations on the data storage method above, and will not be repeated here.
[0100] In an exemplary embodiment, Figure 8 As shown, a data storage device 800 is provided, comprising: a first execution module 801, a second execution module 802 and a third execution module 803, wherein:
[0101] A first execution module 801 is used to establish a plurality of summary information sets according to a target database, wherein the target database includes a plurality of nodes, the plurality of summary information sets respectively correspond to the plurality of nodes, and the summary information sets are used to store summary information of data stored in the nodes, and the target database is a distributed database;
[0102] A second execution module 802 is used to construct a target blockchain of the target database according to the multiple overview information sets, and the target blockchain is used to realize information sharing among multiple nodes in the target database;
[0103] The third execution module 803 is used to store the target data based on the target blockchain and the target database when the target data is received, and the target data is high-concurrency data.
[0104] In one embodiment, the third execution module 803 is specifically used to block the target data to obtain multiple target sub-data; and store the multiple target sub-data based on the target blockchain and the target database.
[0105] In one embodiment, the third execution module 803 is specifically used to determine, for each target sub-data, the storage information of the target sub-data according to the overview information of the target sub-data and the target blockchain; when the storage information indicates the execution of the storage process, the target sub-data is stored in the target database.
[0106] In one embodiment, the third execution module 803 is specifically used to determine whether the multiple overview information sets include the overview information based on the target blockchain; if the multiple overview information sets include the overview information, then the storage information is determined to be the first storage information, and the first storage information is used to indicate that the storage process is not executed; if the multiple overview information sets do not include the overview information, then the storage information is determined to be the second storage information, and the second storage information is used to indicate the execution of the storage process.
[0107] In one embodiment, the third execution module 803 is specifically used to determine the target node corresponding to the target sub-data in the target database; store the target sub-data in the target node, and store the summary information of the target sub-data in the summary information set corresponding to the target node.
[0108] Each module in the above data storage device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0109] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store high-concurrency data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data storage method is implemented.
[0110] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0111] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0112] A plurality of overview information sets are established according to a target database, the target database includes a plurality of nodes, the plurality of overview information sets respectively correspond to the plurality of nodes, the overview information sets are used to store overview information of data stored in the nodes, and the target database is a distributed database; a target blockchain of the target database is constructed according to the plurality of overview information sets, and the target blockchain is used to realize information sharing among a plurality of nodes in the target database; when target data is received, the target data is stored based on the target blockchain and the target database, and the target data is high-concurrency data.
[0113] In one embodiment, the target data is stored based on the target blockchain and the target database, and the processor further implements the following steps when executing the computer program: the target data is processed into blocks to obtain multiple target sub-data; and the multiple target sub-data are stored based on the target blockchain and the target database.
[0114] In one embodiment, the target blockchain and the target database store the multiple target sub-data, and the processor also implements the following steps when executing the computer program: determining summary information of the multiple target sub-data; based on the summary information of the multiple target data, the target blockchain and the target database store the multiple target sub-data.
[0115] In one embodiment, based on the summary information of the multiple target sub-data, the target blockchain and the target database store the multiple target sub-data, and the processor also implements the following steps when executing the computer program: for each target sub-data, determine the storage information of the target sub-data according to the summary information of the target sub-data and the target blockchain; when the storage information indicates the execution of the storage process, store the target sub-data in the target database.
[0116] In one embodiment, the storage information of the target sub-data is determined based on the overview information of the target sub-data and the target blockchain, and the processor further implements the following steps when executing the computer program: determining whether the multiple overview information sets include the overview information based on the target blockchain; if the multiple overview information sets include the overview information, determining that the storage information is the first storage information, and the first storage information is used to indicate that the storage process is not executed; if the multiple overview information sets do not include the overview information, determining that the storage information is the second storage information, and the second storage information is used to indicate that the storage process is executed.
[0117] In one embodiment, the target sub-data is stored in a target database, and the processor further implements the following steps when executing the computer program: determining a target node corresponding to the target sub-data in the target database; storing the target sub-data in the target node, and storing summary information of the target sub-data in a summary information set corresponding to the target node.
[0118] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0119] A plurality of overview information sets are established according to a target database, the target database includes a plurality of nodes, the plurality of overview information sets respectively correspond to the plurality of nodes, the overview information sets are used to store overview information of data stored in the nodes, and the target database is a distributed database; a target blockchain of the target database is constructed according to the plurality of overview information sets, and the target blockchain is used to realize information sharing among a plurality of nodes in the target database; when target data is received, the target data is stored based on the target blockchain and the target database, and the target data is high-concurrency data.
[0120] In one embodiment, the target data is stored based on the target blockchain and the target database, and the computer program, when executed by the processor, further implements the following steps: dividing the target data into blocks to obtain multiple target sub-data; and storing the multiple target sub-data based on the target blockchain and the target database.
[0121] In one embodiment, the target blockchain and the target database store the multiple target sub-data, and the computer program, when executed by the processor, also implements the following steps: determining summary information of the multiple target sub-data; based on the summary information of the multiple target data, the target blockchain and the target database store the multiple target sub-data.
[0122] In one embodiment, based on the overview information of the multiple target sub-data, the target blockchain and the target database store the multiple target sub-data, and the computer program also implements the following steps when executed by the processor: for each target sub-data, the storage information of the target sub-data is determined according to the overview information of the target sub-data and the target blockchain; when the storage information indicates the execution of the storage process, the target sub-data is stored in the target database.
[0123] In one embodiment, the storage information of the target sub-data is determined based on the overview information of the target sub-data and the target blockchain, and the computer program further implements the following steps when executed by the processor: determining whether the multiple overview information sets include the overview information based on the target blockchain; if the multiple overview information sets include the overview information, determining that the storage information is the first storage information, and the first storage information is used to indicate that the storage process is not executed; if the multiple overview information sets do not include the overview information, determining that the storage information is the second storage information, and the second storage information is used to indicate that the storage process is executed.
[0124] In one embodiment, the target sub-data is stored in a target database, and the computer program, when executed by a processor, also implements the following steps: determining a target node corresponding to the target sub-data in the target database; storing the target sub-data in the target node, and storing summary information of the target sub-data in a summary information set corresponding to the target node.
[0125] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0126] A plurality of overview information sets are established according to a target database, the target database includes a plurality of nodes, the plurality of overview information sets respectively correspond to the plurality of nodes, the overview information sets are used to store overview information of data stored in the nodes, and the target database is a distributed database; a target blockchain of the target database is constructed according to the plurality of overview information sets, and the target blockchain is used to realize information sharing among a plurality of nodes in the target database; when target data is received, the target data is stored based on the target blockchain and the target database, and the target data is high-concurrency data.
[0127] In one embodiment, the target data is stored based on the target blockchain and the target database, and the computer program, when executed by the processor, further implements the following steps: dividing the target data into blocks to obtain multiple target sub-data; and storing the multiple target sub-data based on the target blockchain and the target database.
[0128] In one embodiment, the target blockchain and the target database store the multiple target sub-data, and the computer program, when executed by the processor, also implements the following steps: determining summary information of the multiple target sub-data; based on the summary information of the multiple target data, the target blockchain and the target database store the multiple target sub-data.
[0129] In one embodiment, based on the overview information of the multiple target sub-data, the target blockchain and the target database store the multiple target sub-data, and the computer program also implements the following steps when executed by the processor: for each target sub-data, the storage information of the target sub-data is determined according to the overview information of the target sub-data and the target blockchain; when the storage information indicates the execution of the storage process, the target sub-data is stored in the target database.
[0130] In one embodiment, the storage information of the target sub-data is determined based on the overview information of the target sub-data and the target blockchain, and the computer program further implements the following steps when executed by the processor: determining whether the multiple overview information sets include the overview information based on the target blockchain; if the multiple overview information sets include the overview information, determining that the storage information is the first storage information, and the first storage information is used to indicate that the storage process is not executed; if the multiple overview information sets do not include the overview information, determining that the storage information is the second storage information, and the second storage information is used to indicate that the storage process is executed.
[0131] In one embodiment, the target sub-data is stored in a target database, and the computer program, when executed by a processor, also implements the following steps: determining a target node corresponding to the target sub-data in the target database; storing the target sub-data in the target node, and storing summary information of the target sub-data in a summary information set corresponding to the target node.
[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0133] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0134] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0135] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data storage method, characterized in that: The method comprises: Establishing a plurality of summary information sets according to a target database, wherein the target database includes a plurality of nodes, the plurality of summary information sets respectively correspond to the plurality of nodes, and the summary information sets are used to store summary information of data stored in the nodes, and the target database is a distributed database; Building a target blockchain of the target database according to the multiple overview information sets, wherein the target blockchain is used to realize information sharing among multiple nodes in the target database; When the target data is received, the target data is stored based on the target blockchain and the target database, and the target data is high-concurrency data.
2. The method according to claim 1, characterized in that The storing the target data based on the target blockchain and the target database includes: Processing the target data in blocks to obtain a plurality of target sub-data; The multiple target sub-data are stored based on the target blockchain and the target database.
3. The method according to claim 2, characterized in that The storing the plurality of target sub-data based on the target blockchain and the target database includes: Determining summary information of the plurality of target sub-data; Based on the summary information of the multiple target data, the target blockchain and the target database store the multiple target sub-data.
4. The method according to claim 3, characterized in that Based on the summary information of the multiple target sub-data, the target blockchain and the target database store the multiple target sub-data, including: For each target sub-data, determine the storage information of the target sub-data according to the summary information of the target sub-data and the target blockchain; In a case where the storage information indicates to execute a storage process, the target sub-data is stored in a target database.
5. The method according to claim 4, characterized in that The determining the storage information of the target sub-data according to the summary information of the target sub-data and the target blockchain includes: Determining, based on the target blockchain, whether the plurality of summary information sets include the summary information; If the plurality of summary information sets include the summary information, determining that the storage information is first storage information, the first storage information is used to indicate that the storage process is not to be executed; If the plurality of summary information sets do not include the summary information, it is determined that the storage information is second storage information, and the second storage information is used to instruct execution of the storage process.
6. The method according to claim 4, characterized in that The storing the target sub-data into the target database comprises: Determine a target node corresponding to the target sub-data in the target database; The target sub-data is stored in the target node, and summary information of the target sub-data is stored in a summary information set corresponding to the target node.
7. A data storage device, characterized in that: The device comprises: A first execution module, configured to establish a plurality of summary information sets according to a target database, wherein the target database includes a plurality of nodes, the plurality of summary information sets respectively correspond to the plurality of nodes, the summary information sets are used to store summary information of data stored in the nodes, and the target database is a distributed database; A second execution module is used to construct a target blockchain of the target database according to the multiple overview information sets, and the target blockchain is used to realize information sharing among multiple nodes in the target database; The third execution module is used to store the target data based on the target blockchain and the target database when the target data is received, and the target data is high-concurrency data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
