CN114357085B - Financial data storage method and device based on block chain and storage medium - Google Patents

Financial data storage method and device based on block chain and storage medium Download PDF

Info

Publication number
CN114357085B
CN114357085B CN202210252406.3A CN202210252406A CN114357085B CN 114357085 B CN114357085 B CN 114357085B CN 202210252406 A CN202210252406 A CN 202210252406A CN 114357085 B CN114357085 B CN 114357085B
Authority
CN
China
Prior art keywords
role
node
storage
financial data
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210252406.3A
Other languages
Chinese (zh)
Other versions
CN114357085A (en
Inventor
金绍君
刘燕
王雅枫
朱明良
毛嘉宜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Zhejiang Electric Power Co Ltd
Shaoxing Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
State Grid Zhejiang Electric Power Co Ltd
Shaoxing Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Zhejiang Electric Power Co Ltd, Shaoxing Power Supply Co of State Grid Zhejiang Electric Power Co Ltd filed Critical State Grid Zhejiang Electric Power Co Ltd
Priority to CN202210252406.3A priority Critical patent/CN114357085B/en
Publication of CN114357085A publication Critical patent/CN114357085A/en
Application granted granted Critical
Publication of CN114357085B publication Critical patent/CN114357085B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a financial data storage method, a device and a storage medium based on a block chain, comprising the following steps: receiving first financial data uploaded by a first node in a block chain, and determining multidimensional storage data information corresponding to the first node according to a first role corresponding to the first node; respectively storing the first financial data in storage spaces corresponding to the multidimensional storage data information; acquiring an attribute mark and a time mark of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute mark, and sequencing and updating second financial data stored in the storage unit in advance and the first financial data stored at present according to the time mark to obtain third financial data; and if all storage spaces corresponding to the multidimensional storage data information are judged to be updated respectively to obtain third financial data, all nodes corresponding to the second roles and the first roles are reminded of completing storage.

Description

Financial data storage method and device based on block chain and storage medium
Technical Field
The invention relates to the technical field of data storage, in particular to a financial data storage method and device based on a block chain and a storage medium.
Background
The block chain is a chain data structure formed by combining data blocks in a sequential connection mode according to a time sequence, and is a distributed account book which is guaranteed in a cryptographic mode and cannot be tampered and forged. Therefore, one of the important attributes of the block chain is to ensure the authenticity and non-tamper property of the data.
The financial data can show the operating state, financial transaction and the like of a company, the authenticity of finance can be guaranteed through the block chain, but a plurality of nodes exist in the block chain, and the possibility that the financial data of the other side can be viewed by partial nodes existing in the plurality of nodes is provided. For example, one blockchain includes a group company and multiple levels of subsidiaries, a higher level company can view part of financial data in a lower level company, but the lower level company cannot view financial data of the higher level company, and a certain higher level company cannot view financial data of lower level companies corresponding to other higher level companies, so that each node in the blockchain needs to be provided with a corresponding role, so that the role corresponding to each node can view corresponding data.
After setting up the role, when every role need be transferred, look over corresponding financial data, can judge whether this role has corresponding authority, this kind of mode can cause the problem that the handling capacity is big to appear, and financial data generally all exists with the form of word statement, and the word statement has characteristics that quantity is little, so can handle in the storage process to financial data, make things convenient for corresponding role to transfer financial data. Currently, there is no method that can combine roles with storage modes to enable a user to quickly determine corresponding financial data in a blockchain architecture.
Disclosure of Invention
The embodiment of the invention provides a financial data storage method, a financial data storage device and a financial data storage medium based on a block chain, which can perform corresponding storage according to the role of each node in the block chain and the financial data which can be checked by the node under the framework of the block chain, are convenient for each node to call the financial data with the checking authority according to the role of the node, do not need to traverse all the financial data, and have higher speed.
In a first aspect of the embodiments of the present invention, a financial data storage method based on a block chain is provided, where the method includes:
receiving first financial data uploaded by a first node in a block chain, and determining multidimensional storage data information corresponding to the first node according to a first role corresponding to the first node;
determining at least one second role based on the first role, and respectively storing the first financial data at storage spaces corresponding to the multidimensional storage data information, wherein each second role corresponds to one storage space;
acquiring an attribute mark and a time mark of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute mark, and sequencing and updating second financial data stored in the storage unit previously and the first financial data stored currently according to the time mark to obtain third financial data;
and if all storage spaces corresponding to the multidimensional storage data information are judged to be updated respectively to obtain third financial data, all nodes corresponding to the second roles and the first roles are reminded of completing storage.
Optionally, in a possible implementation manner of the first aspect, the receiving first financial data uploaded by a first node in a block chain, and determining multidimensional storage data information corresponding to the first node according to a first role corresponding to the first node includes:
acquiring a first role corresponding to a first node, and determining a corresponding first set in a corresponding table according to the first role, wherein the first set comprises at least one second role;
and acquiring all storage spaces corresponding to all second roles in the first set to generate the multi-dimensional storage data information, wherein each second role corresponds to one storage space.
Optionally, in a possible implementation manner of the first aspect, generating the correspondence table by the following steps includes:
processing node configuration data input by a user to generate connection relation information and role level information of each node in a block chain;
generating a tree graph based on the connection relationship information and the role level information, wherein the tree graph comprises a root node, a plurality of child nodes and a plurality of grandchild nodes;
and generating a first set corresponding to each node according to the root node, the child nodes and the grandchild nodes, and generating a corresponding table based on the first set corresponding to each node.
Optionally, in a possible implementation manner of the first aspect, generating a first set corresponding to each node according to the root node, the child nodes, and the grandchild nodes, and generating a correspondence table based on the first set corresponding to each node includes:
acquiring a node corresponding to a previous level of a root node to generate a first set, wherein if the node corresponding to the previous level does not exist, only the role corresponding to the first set in the root node exists in the first set corresponding to the root node;
extracting that a first role of the root node corresponds to the first set.
Optionally, in a possible implementation manner of the first aspect, generating a first set corresponding to each node according to the root node, the child nodes, and the grandchild nodes, and generating a correspondence table based on the first set corresponding to each node includes:
acquiring a root node corresponding to a first level on a child node to generate a first set, and taking a role corresponding to a node in the first set as a second role;
extracting that a first role of the child node corresponds to the first set.
Optionally, in a possible implementation manner of the first aspect, generating a first set corresponding to each node according to the root node, the child nodes, and the grandchild nodes, and generating a correspondence table based on the first set corresponding to each node includes:
acquiring child nodes and root nodes corresponding to the previous level of the grandchild node to generate a first set, and taking the roles corresponding to the nodes in the first set as second roles;
and extracting that the first role of the grandchild node corresponds to the first set.
Optionally, in a possible implementation manner of the first aspect, the method further includes:
selecting a second role in the first set corresponding to the first role;
and acquiring a storage space corresponding to the second role, partitioning the storage space corresponding to the second role to establish a storage unit corresponding to the first role, wherein the storage unit corresponding to the first role is used for storing first financial data.
Optionally, in a possible implementation manner of the first aspect, the obtaining an attribute flag and a time flag of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute flag, and performing sorting and updating on the second financial data previously stored in the storage unit and the first financial data currently stored in the storage unit according to the time flag to obtain third financial data includes:
obtaining attribute tags of the first financial data, wherein the attribute tags comprise roles of first nodes;
selecting a storage unit corresponding to the role of the first node in a storage space corresponding to a second role, and storing first financial data to the storage unit corresponding to the role of the first node;
extracting all second financial data previously stored in a storage unit corresponding to the role of the first node and time marks corresponding to the second financial data;
and sequencing the second financial data and the first financial data based on the time marks of the second financial data and the time marks of the first financial data to obtain third financial data sequenced according to a time sequence.
Optionally, in a possible implementation manner of the first aspect, the method further includes:
counting roles corresponding to all nodes, and acquiring the number of each role in a first set corresponding to all nodes;
determining a quantity of pre-allocated storage space corresponding to the corresponding node based on the number of each role in all the first sets;
the amount of pre-allocated memory is calculated by the following formula,
Figure 916317DEST_PATH_IMAGE001
wherein,
Figure 426933DEST_PATH_IMAGE002
is a first
Figure 941091DEST_PATH_IMAGE003
The amount of allocated storage of the individual storage spaces,
Figure 70721DEST_PATH_IMAGE004
is as follows
Figure 619514DEST_PATH_IMAGE003
The number of roles in all first sets,
Figure 786184DEST_PATH_IMAGE005
is as follows
Figure 787638DEST_PATH_IMAGE006
The number of roles in all first sets,
Figure 720959DEST_PATH_IMAGE007
is the upper limit value of the character,
Figure 248892DEST_PATH_IMAGE008
for the total stored quantity value of all the spaces,
Figure 711098DEST_PATH_IMAGE009
is as follows
Figure 199848DEST_PATH_IMAGE003
The node type weight value corresponding to each storage space,
Figure 546647DEST_PATH_IMAGE010
is as follows
Figure 804453DEST_PATH_IMAGE011
The role weight value corresponding to each storage space;
and performing initial allocation on the total storage space based on the quantity value of the pre-allocated storage space so as to allocate corresponding initial storage space to each node.
Optionally, in a possible implementation manner of the first aspect, the method further includes:
acquiring the stored data quantity value of the data at the current moment in each storage space at intervals of a preset time period;
obtaining a current stored average quantity value according to the stored quantity value of the data in each storage space;
and adjusting the distribution storage quantity value of the storage space according to the stored quantity value of the data in each storage space, the current stored average quantity value and the role weight value corresponding to each storage space.
Optionally, in a possible implementation manner of the first aspect, adjusting the allocated storage quantity value of the storage space according to the stored quantity value of the data in each storage space, the current stored average quantity value, and the role weight value corresponding to each storage space includes:
if the stored data quantity value is judged to be larger than or equal to the current stored average quantity value;
obtaining a forward variation trend value based on the stored data quantity value and the stored average quantity value, and performing forward adjustment on the distributed storage quantity value in the storage space based on the first forward variation trend value and the role weight value;
if the stored data quantity value is smaller than the current stored average quantity value;
and obtaining a negative change trend value based on the stored data quantity value and the stored average quantity value, and carrying out negative adjustment on the distributed storage quantity value in the storage space based on the negative change trend value and the role weight value.
Alternatively, in a possible implementation manner of the first aspect, the storage amount allocated by the storage space is adjusted by the following formula,
Figure 968718DEST_PATH_IMAGE012
wherein,
Figure 944764DEST_PATH_IMAGE013
is as follows
Figure 78942DEST_PATH_IMAGE014
The data within the individual memory spaces has stored a quantity value,
Figure 191255DEST_PATH_IMAGE015
for the current stored average magnitude value,
Figure 260842DEST_PATH_IMAGE016
is a first
Figure 599551DEST_PATH_IMAGE017
The data within the individual memory spaces has stored a quantity value,
Figure 412786DEST_PATH_IMAGE011
is the upper limit value of the storage space,
Figure 379605DEST_PATH_IMAGE018
is a quantitative value of the storage space,
Figure 10306DEST_PATH_IMAGE019
is as follows
Figure 695365DEST_PATH_IMAGE014
The amount of memory allocated after the adjustment of the individual memory space,
Figure 312292DEST_PATH_IMAGE020
is as follows
Figure 399196DEST_PATH_IMAGE014
The amount of memory allocated before the adjustment of the memory space,
Figure 948602DEST_PATH_IMAGE021
is as follows
Figure 120957DEST_PATH_IMAGE009
The amount of memory allocated before the individual memory space is adjusted,
Figure 275995DEST_PATH_IMAGE022
is as follows
Figure 482985DEST_PATH_IMAGE009
The individual memory space data has stored a quantity value,
Figure 455490DEST_PATH_IMAGE023
is as follows
Figure 115141DEST_PATH_IMAGE014
And the role weight values corresponding to the storage spaces.
In a second aspect of the embodiments of the present invention, there is provided a block chain-based financial data storage apparatus, including:
the system comprises an uploading module, a searching module and a searching module, wherein the uploading module is used for receiving first financial data uploaded by a first node in a block chain and determining multidimensional storage data information corresponding to the first node according to a first role corresponding to the first node;
the storage module is used for determining at least one second role based on the first role, and respectively storing the first financial data in storage spaces corresponding to the multidimensional storage data information, wherein each second role corresponds to one storage space;
the sorting module is used for acquiring the attribute mark and the time mark of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute mark, and sorting and updating the second financial data stored in the storage unit in advance and the first financial data stored at present according to the time mark to obtain third financial data;
and the updating reminding module is used for storing all the nodes corresponding to the second role and the first role to finish reminding after respectively updating all the storage spaces corresponding to the multidimensional storage data information to obtain third financial data.
In a third aspect of the embodiments of the present invention, a storage medium is provided, in which a computer program is stored, which, when being executed by a processor, is adapted to implement the method according to the first aspect of the present invention and various possible designs of the first aspect of the present invention.
The invention provides a financial data storage method and device based on a block chain and a storage medium. The method can distinguish each node in the block chain according to the role on the basis of the block chain architecture, and different financial data viewing permissions are distributed to each node according to the different roles of the nodes, and a corresponding storage space is set for each node. In addition, the financial data corresponding to different roles and financial data corresponding to different times in the storage space and the storage unit can be updated according to the attribute marks and the time marks of the first financial data, so that the corresponding nodes have storage rules when checking the financial data, and the financial data can be searched more quickly.
The technical scheme provided by the invention can generate a corresponding tree diagram according to node configuration data actively input by a user, wherein the tree diagram can embody the role level relationship among a plurality of nodes, so that the invention can obtain a corresponding first set according to the connection relationship between the current node and other nodes, and the way can ensure that each node in the tree diagram has the corresponding first set, when storing financial data, the invention can store the financial data in the storage space and the storage unit corresponding to each node having the authority of accessing the financial data according to the second role in the first set, so that the invention can actively distribute the financial data after a certain node generates the financial data and distribute the financial data to the storage space corresponding to the corresponding node, when each node needs to access the corresponding financial data, the financial data in the storage space corresponding to the node can be directly accessed, and the financial data is determined and accessed quickly.
According to the technical scheme provided by the invention, as the authorities of all nodes in the block chain are possibly different, financial data which can be checked by all nodes are also different, and further, the storage space required by each node is different. The method effectively ensures that the invention can distribute the corresponding storage space according to the different authorities of the roles corresponding to each node in the block chain, so that each node has the storage space suitable for the node, the storage space is reasonably utilized, and the resource utilization rate is improved. The method comprises the steps of acquiring the stored quantity value in each storage space at intervals of a preset time period, redistributing and adjusting all the remaining spaces according to the proportion between the stored quantity value in each storage space and the total storage quantity value, so that each storage space dynamically adjusts the storage space allocated to each storage space according to the change of time, the utilization rate of the storage space is improved, and each storage space can stably store the financial data which can be checked by the corresponding node.
Drawings
FIG. 1 is a flow chart of a first embodiment of a blockchain based financial data storage method;
FIG. 2 is a flow chart of a second embodiment of a blockchain-based financial data storage method;
FIG. 3 is a schematic diagram of a tree;
FIG. 4 is a block diagram of a first embodiment of a blockchain based financial data storage device.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
It should be understood that in the present application, "comprising" and "having" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that, in the present invention, "a plurality" means two or more. "and/or" is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "comprises A, B and C" and "comprises A, B, C" means that A, B, C all comprise, "comprises A, B or C" means comprise one of A, B, C, "comprises A, B and/or C" means comprise any 1 or any 2 or 3 of A, B, C.
It should be understood that in the present invention, "B corresponding to a", "a corresponds to B", or "B corresponds to a" means that B is associated with a, and B can be determined from a. Determining B from a does not mean determining B from a alone, but may be determined from a and/or other information. And the matching of A and B means that the similarity of A and B is greater than or equal to a preset threshold value.
As used herein, "if" may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
The technical scheme provided by the invention is suitable for a data storage scene under a block chain architecture, for example, a certain group company exists, the group company comprises 1 main company, each main company corresponds to a plurality of 1-level subsidiaries, and each 1-level subsidiary corresponds to a plurality of 2-level subsidiaries. At the moment, the main company has the highest financial data query authority, the main company can query financial data of any level 1 subsidiary company and any level 2 subsidiary company, the level 1 subsidiary company can view the level 2 subsidiary companies which are positioned under the authority and funded by the level 1 subsidiary companies, and the level 2 subsidiary companies can only view the financial data of the level 2 subsidiary companies. In the prior art, each node stores its own financial data, when a certain level 1 subsidiary needs to check the financial data of a certain level 2 subsidiary, it needs to send a data query request, authenticate the identity of the level 1 subsidiary, and call corresponding financial data according to the authentication result, and when authenticating the identity of the level 1 subsidiary, it needs to traverse the corresponding permissions of all the level 2 subsidiary, so that the efficiency is low in the process of searching the financial data. The technical scheme of the invention can solve the problem of low financial data searching efficiency under the block chain structure.
The invention provides a block chain-based financial data storage method, as shown in fig. 1, comprising:
step S110, receiving first financial data uploaded by a first node in a block chain, and determining multidimensional storage data information corresponding to the first node according to a first role corresponding to the first node. The invention takes the node uploading the first financial data as the first node. A node in the blockchain uploads first financial data at a time, which may be a tax return, a profit statement, an asset liability statement, or the like. Each node in the block chain has a role corresponding to the node, and the role corresponding to the node uploading the first financial data is taken as the first role in the invention. The invention can determine the multidimensional storage data information corresponding to the first node according to the first role corresponding to the first node.
In a possible implementation manner of the technical solution provided by the present invention, as shown in fig. 2, step S110 specifically includes:
step S1101, obtaining a first role corresponding to a first node, and determining a corresponding first set in a correspondence table according to the first role, where the first set includes at least one second role. Because each node has a corresponding role, when a certain node uploads financial data, the node uploading the financial data is used as a first node, the role corresponding to the first node is used as a first role, the corresponding first set in the corresponding table is determined according to the first role, and all second roles are stored through the first set.
Step S1102, obtaining all storage spaces corresponding to all second roles in the first set to generate multidimensional storage data information, where each second role corresponds to one storage space. The method and the device can generate multidimensional storage data information according to all storage spaces corresponding to all second roles, can uniformly distribute the financial data uploaded at the first role according to the multidimensional storage data information, and distribute the uploaded financial data to the storage spaces corresponding to the second roles with corresponding permissions. This approach enables active distribution of financial data such that each node distributes its financial data to other nodes having financial data for viewing the node according to the first set.
The technical scheme provided by the invention generates the corresponding table through the following steps of:
and processing the node configuration data input by the user to generate the connection relation information and the role level information of each node in the block chain. When the corresponding table is generated through initialization, an administrator and a user can input node configuration data, and the node configuration data has connection relation information and role level information of each node. For example, there are company 1, company 2, company 3, company 4, and company 5, the connection relationship information may be that company 1 is connected to company 2 and company 3, the role level information of company 1 is the head company, the role level information of company 2 and company 3 is the level 1 subsidiary, company 4 corresponds to the connection relationship to company 2, company 4 is the level 2 subsidiary, company 5 corresponds to the connection relationship to company 3, and company 5 is the level 2 subsidiary.
And generating a tree diagram based on the connection relation information and the role level information, wherein the tree diagram comprises a root node, a plurality of child nodes and a plurality of grandchild nodes. The present invention generates a tree graph according to the connection relationship information and the role level information of each node, wherein the tree graph can be as shown in fig. 3, at this time, a company 1 corresponding to a head company can correspond to a root node in the tree graph, a company 2 corresponding to a level 1 subsidiary company can correspond to a child node in the tree graph, and a company 4 corresponding to a level 2 subsidiary company can correspond to a grandchild node in the tree graph. Through the mode, the invention generates the corresponding tree graphs according to different role level relations of the company, and is easy to realize the classification processing of the company.
And generating a first set corresponding to each node according to the root node, the child nodes and the grandchild nodes, and generating a corresponding table based on the first set corresponding to each node. The first set corresponding to each node is generated according to the root node, the plurality of child nodes and the plurality of grandchild nodes, for example. A grandchild node corresponding to the level 2 subsidiary (company 4) is connected to a child node corresponding to the level 1 subsidiary (company 2), and a child node corresponding to the level 1 subsidiary (company 2) is connected to a root node corresponding to the head office (company 1). At this time, the head office (company 1) may view the financial data of the level 1 subsidiary (company 2) or the financial data of the level 2 subsidiary (company 4), and the first set corresponding to the root node at this time at least includes the role of the node corresponding to the level 1 subsidiary (company 2) and the role of the node corresponding to the level 2 subsidiary (company 4). At this time, when the node corresponding to the level 1 subsidiary company (company 2) and the node corresponding to the level 2 subsidiary company (company 4) upload the financial data, the financial data is respectively sent to the storage space corresponding to the root node (company 1) for storage.
In one possible embodiment, the generating a first set corresponding to each node according to the root node, the child nodes, and the grandchild nodes, and the generating a correspondence table based on the first set corresponding to each node includes:
acquiring a node corresponding to a previous level of a root node to generate a first set, wherein if the node corresponding to the previous level does not exist, only the role corresponding to the first set in the root node exists in the first set corresponding to the root node;
extracting that a first role of the root node corresponds to the first set.
In an actual production operation activity, there may be a case where a certain group company is purchased, and at this time, the previous root node (company 1) does not have the highest authority any more, and there may be a new node (company 01) on the top of the root node (company 1), and at this time, the first set includes itself and the new node (company 01). When the root node (company 1) belongs to the highest right, only the head company (company 1) in the whole group company can check the financial data of the head company, and only the role corresponding to the head company exists in the first set corresponding to the root node. When the root node uploads the financial data, the financial data only needs to be stored in the storage space corresponding to the role corresponding to the root node in the first set, and the financial data uploaded by the root node cannot be checked by other nodes.
In one possible embodiment, the generating a first set corresponding to each node according to the root node, the child nodes, and the grandchild nodes, and the generating a correspondence table based on the first set corresponding to each node includes:
and acquiring a root node corresponding to a level on the child node to generate a first set, and taking the role corresponding to the node in the first set as a second role. Generally, the root nodes of the financial data of the child nodes have authority to view, so that the nodes in the first set at least include the root node and the child nodes themselves, at this time, the roles corresponding to the root node and the child nodes themselves are the second roles in the first set, that is, when the child nodes upload the financial data, the child nodes upload the financial data to the storage space corresponding to the second role in the first set, that is, the storage space corresponding to the root node and the storage space corresponding to the child nodes.
Extracting that a first role of the child node corresponds to the first set. The present invention associates the first role of the child node with the first set, at which point the corresponding child node has its own corresponding first set.
In one possible embodiment, the generating a first set corresponding to each node according to the root node, the child nodes, and the grandchild nodes, and the generating a correspondence table based on the first set corresponding to each node includes:
and acquiring child nodes and root nodes corresponding to the previous level of the grandchild node to generate a first set, and taking the roles corresponding to the nodes in the first set as second roles. Generally speaking, the financial data of the grandchild node, the corresponding child node and the root node are all viewed with authority, so the nodes in the first set at least include the corresponding child node, the root node and the grandchild node, at this time, the roles corresponding to the corresponding child node, the root node and the grandchild node are the second role in the first set, that is, when the grandchild node uploads the financial data, the grandchild node uploads the financial data to the storage space corresponding to the second role in the first set, that is, the storage space corresponding to the corresponding child node, the storage space corresponding to the root node and the storage space corresponding to the grandchild node.
And extracting that the first role of the grandchild node corresponds to the first set. The invention can correspond the first role of the grandchild node to the first set, and the corresponding grandchild node has the first set corresponding to the grandchild node.
In a possible embodiment, the technical solution provided by the present invention further includes:
and selecting a second role in the first set corresponding to the first role. The method and the device can determine a second role required to be stored by the financial data and a storage space corresponding to the node according to the second role in the first set. Generally, the present invention selects all of the second roles in the first set in turn.
And acquiring a storage space corresponding to the second role, partitioning the storage space corresponding to the second role to establish a storage unit corresponding to the first role, wherein the storage unit corresponding to the first role is used for storing first financial data. The invention determines the corresponding storage space according to the second role. When there are many companies in a group of companies, for example, the head office corresponding to the root node, the storage space corresponding to the head office needs to store the financial data of all companies, and if the financial data of all companies in the storage space are stored in a random and disordered manner, it is not beneficial for the head office to check the dependent financial data. The first financial data in the invention belongs to financial data, and the first financial data can be understood as the financial data at the current moment.
Step S120, at least one second role is determined based on the first role, and the first financial data is respectively stored in the storage spaces corresponding to the multidimensional storage data information, wherein each second role corresponds to one storage space. The invention can determine a second role according to each first role, each first role can have a first set corresponding to the first role, at least a second role corresponding to the role of the first role is stored in the first set, and the invention can actively distribute financial data according to the second role in the first set corresponding to each first role, so that the nodes, the storage space and the storage unit corresponding to each second role pre-store financial data.
Step S130, obtaining an attribute mark and a time mark of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute mark, and sequencing and updating the second financial data stored in the storage unit previously and the first financial data stored currently according to the time mark to obtain third financial data. According to the technical scheme provided by the invention, each node has the corresponding attribute mark and time mark when uploading the first financial data, and the corresponding storage unit in the storage space is selected according to the attribute mark, so that the first financial data is stored in the corresponding storage unit. The invention can sequence and update the current financial data (first financial data) and the historical financial data (second financial data) in the storage unit according to the time mark to obtain the corresponding latest financial total data (third financial data), so that when the invention actively distributes the finance, the invention can classify and store the financial data according to the corresponding strategy and store the financial data according to the time sequence, thereby facilitating the subsequent retrieval and use of the corresponding financial data by the user.
In a possible implementation manner of the technical solution provided by the present invention, step S130 specifically includes:
obtaining attribute indicia of the first financial data, the attribute indicia including a role of the first node. According to the method, corresponding attribute marks are added to the uploaded first financial data, the attribute marks at least comprise the role of the first node, and the role can comprise the name of a company corresponding to the first node.
And selecting a storage unit corresponding to the role of the first node in the storage space of the second role, and storing the first financial data to the storage unit corresponding to the role of the first node. In the present invention, a plurality of storage units are set in each storage space in advance, for example, a child node (company 2) may view financial data of a grandchild node (company 4) and the child node itself, at this time, the corresponding storage unit may include a storage unit 1 and a storage unit 2, the storage unit 1 may store financial data of the child node (company 2), and the storage unit 2 may store financial data of the grandchild node (company 4). For example, when the grandchild node (company 4) uploads the financial data, the role corresponding to the grandchild node (company 4) is the first role, and the first financial data is stored in the storage space corresponding to the child node (company 2) and the storage unit corresponding to the first role (company 4).
And extracting all the second financial data previously stored in the storage unit corresponding to the role of the first node and the time stamp corresponding to the second financial data. After determining the corresponding storage unit in the storage space, the method extracts all the second financial data previously stored in the storage unit corresponding to the role of the first node and the time stamp corresponding to the second financial data. For example, the second financial data includes an annual tax return form in 2019 and an annual tax return form in 2020, and the time stamp corresponding to the annual tax return form in 2019 is the year 2019, and the time stamp corresponding to the annual tax return form in 2020 is the year 2020.
And sequencing the second financial data and the first financial data based on the time marks of the second financial data and the time marks of the first financial data to obtain third financial data sequenced according to a time sequence. For example, if the time mark of the first financial data is 2021 year, the third financial data sorted by time series at this time is the financial data of 2019 year, the financial data of 2020 year and the financial data of 2021 year. This kind of mode is saved financial data for the finance has corresponding time series, easily statistics and the retrieval of financial data.
And step S140, after judging that all storage spaces corresponding to the multidimensional storage data information are respectively updated to obtain third financial data, storing all nodes corresponding to the second role and the first role to finish reminding. According to the technical scheme provided by the invention, after all storage spaces corresponding to the multidimensional storage data information are respectively updated to obtain third financial data, the nodes corresponding to the second role and the first role are reminded, so that the corresponding reminding can be carried out after the financial data is uploaded at a certain node, and each node with the authority of checking the financial data can check and check the corresponding financial data in time.
Compared with the traditional mode that the financial data of a certain subsidiary company needs to be actively inquired when being actively checked, the technical scheme provided by the invention adopts a passive uploading reminding mode, namely, after the corresponding financial data is uploaded by a certain node, the financial data is actively distributed according to role authority, so that all nodes passively receive the financial data and check and verify the financial data.
The technical scheme provided by the invention further comprises the following steps:
and counting the roles corresponding to all the nodes, and acquiring the number of each role in the first set corresponding to all the nodes. According to the technical scheme provided by the invention, the number of the roles of each node in all the first sets is counted, and when the number is larger, the more nodes storing the financial data are proved, the more financial data are received, and the larger the number value of the required storage space is.
An amount of pre-allocated storage corresponding to the respective node is determined based on the number of each role in all of the first sets. When the initial distribution of the storage quantity value is carried out on each storage space, the storage quantity value is determined according to the quantity in all the first sets, so that each storage space has a suitable storage quantity value, the distribution of the storage quantity value only considers the quantity dimension of each role in all the first sets and does not consider the data quantity dimension of the financial data of each node, and the operation condition of each company cannot be determined at the moment, so the financial data cannot be determined.
The amount of pre-allocated memory is calculated by the following formula,
Figure 73870DEST_PATH_IMAGE001
wherein,
Figure 869787DEST_PATH_IMAGE002
is as follows
Figure 763925DEST_PATH_IMAGE003
The amount of allocated storage of the individual storage spaces,
Figure 910873DEST_PATH_IMAGE004
is a first
Figure 673292DEST_PATH_IMAGE003
The number of roles in all of the first set,
Figure 854875DEST_PATH_IMAGE005
is as follows
Figure 638023DEST_PATH_IMAGE006
The number of roles in all first sets,
Figure 537846DEST_PATH_IMAGE007
is the upper limit value of the character,
Figure 838377DEST_PATH_IMAGE008
for the total stored quantity value of all the spaces,
Figure 874467DEST_PATH_IMAGE009
is as follows
Figure 969462DEST_PATH_IMAGE003
The node type weight value corresponding to each storage space,
Figure 966368DEST_PATH_IMAGE010
is as follows
Figure 70590DEST_PATH_IMAGE011
And the role weight values corresponding to the storage spaces. By passing
Figure 695606DEST_PATH_IMAGE024
Can obtain the first
Figure 227082DEST_PATH_IMAGE003
The number of the roles in all the first sets accounts for the proportion of the total quantity value, and then the total storage quantity value is distributed according to a corresponding proportion, the node type weight value can be preset, the node type weight value of the root node can be larger than the node type weight value of the child node, and the node type weight value of the child node can be larger than the node type weight value of the grandchild node. The role weight value may be preset by a user, and is determined according to different attributes of each node and the role, for example, if the sub-company is a traditional industry, the number of entries and exits is small, the financial data may be small, and if the sub-company is an emerging industry such as a new energy source, the number of entries and exits is large, the financial data may be large, and if the sub-company is a new energy source, the role weight value may be high.
And performing initial allocation on the total storage space based on the quantity value of the pre-allocated storage space so as to allocate corresponding initial storage space to each node. The invention can carry out initialization distribution on each space according to the distribution storage capacity value of each storage space, so that each node has a corresponding storage space.
The technical scheme provided by the invention further comprises the following steps:
and acquiring the stored data quantity value of the data at the current moment in each storage space at preset time intervals. In the actual production and operation activities of a company, due to different types and operation conditions of the company, the contents of entries, exits and the like of the company corresponding to each node may differ greatly, and at this time, the amount of generated financial data has a large deviation, so that the financial data sent by each node to other nodes is different. The invention can obtain the stored data quantity value of each storage space at the current moment at intervals of a preset time period, and dynamically adjust the quantity value of the storage space redistributed to the space according to the stored quantity value of each storage space.
And obtaining the current stored average value according to the stored data value in each storage space.
And adjusting the distribution storage quantity value of the storage space according to the stored quantity value of the data in each storage space, the current stored average quantity value and the role weight value corresponding to each storage space. The method can adjust the distributed storage quantity value of the storage space according to the stored quantity value of the data, the current stored average quantity value and the role weight value corresponding to each storage space, so that the re-distributed storage quantity value of each storage space has a corresponding relation with the current stored quantity value, further reasonable distribution of the storage quantity value is achieved, a larger storage space is distributed to more required nodes, and stable storage of financial data is guaranteed.
According to the technical scheme provided by the invention, the step of adjusting the distributed storage quantity value of the storage space according to the stored quantity value of the data in each storage space, the current stored average quantity value and the role weight value corresponding to each storage space comprises the following steps of:
and if the stored data quantity value is judged to be more than or equal to the current stored average quantity value. At this time, the trend of the data increase amount of the storage space of the corresponding node is greater than the trend of the data increase amount of the storage space of other nodes, and more storage space is needed to meet the data storage requirement.
And obtaining a forward change trend value based on the stored data quantity value and the stored average quantity value, and performing forward adjustment on the distributed storage quantity value in the storage space based on the first forward change trend value and the role weight value. The forward variation trend value is obtained according to the stored data quantity value and the stored average quantity value, and when the stored data quantity value is more than the stored average quantity value, the forward variation trend value is larger, the forward adjustment amplitude is larger, and the distributed storage space is more.
And if the stored data quantity value is judged to be smaller than the current stored average quantity value. At this time, the trend of the data increment of the storage space of the corresponding node is smaller than the trend of the data increment of the storage spaces of other nodes, and thus, the data storage requirement can be met by needing less storage space.
And obtaining a negative change trend value based on the stored data quantity value and the stored average quantity value, and performing negative adjustment on the distributed storage quantity value in the storage space based on the negative change trend value and the role weight value. The invention can obtain the negative change trend value according to the stored data quantity value and the stored average quantity value, and when the stored data quantity value is more than the stored average quantity value, the larger the negative change trend value is, the larger the negative adjustment amplitude is, and the less the distributed storage space is.
Through the mode, the storage quantity value of the storage space can be dynamically and reasonably distributed as required, and the storage quantity value of the storage space corresponding to each node is ensured to be corresponding to the storage requirement of the storage space.
The technical proposal provided by the invention adjusts the storage quantity value distributed by the storage space through the following formula,
Figure 694972DEST_PATH_IMAGE012
wherein,
Figure 868464DEST_PATH_IMAGE013
is as follows
Figure 613567DEST_PATH_IMAGE014
The data within the individual memory spaces has stored a quantity value,
Figure 315943DEST_PATH_IMAGE025
for the current stored average magnitude value,
Figure 146496DEST_PATH_IMAGE016
is as follows
Figure 467887DEST_PATH_IMAGE017
The data within the individual memory spaces has stored a quantity value,
Figure 67496DEST_PATH_IMAGE026
is the upper limit value of the storage space,
Figure 940774DEST_PATH_IMAGE018
is a quantitative value of the storage space,
Figure 258623DEST_PATH_IMAGE019
is as follows
Figure 367393DEST_PATH_IMAGE014
The amount of memory allocated after the adjustment of the individual memory space,
Figure 87087DEST_PATH_IMAGE020
is as follows
Figure 131267DEST_PATH_IMAGE014
The amount of memory allocated before the individual memory space is adjusted,
Figure 201991DEST_PATH_IMAGE021
is as follows
Figure 989818DEST_PATH_IMAGE027
The amount of memory allocated before the individual memory space is adjusted,
Figure 448174DEST_PATH_IMAGE028
is as follows
Figure 663255DEST_PATH_IMAGE027
The individual memory space data has stored a quantity value,
Figure 690117DEST_PATH_IMAGE023
is as follows
Figure 281635DEST_PATH_IMAGE029
And the role weight values corresponding to the storage spaces.
The invention can set a piecewise function including
Figure 834976DEST_PATH_IMAGE030
Segment and
Figure 220958DEST_PATH_IMAGE031
segment of by
Figure 696DEST_PATH_IMAGE032
The relation between the stored quantity value and the stored average quantity value of the current data can be obtained when
Figure 130326DEST_PATH_IMAGE033
The larger the size, the greater the tendency of the storage size to increase or decrease in the storage space at that time. Namely when
Figure 288906DEST_PATH_IMAGE030
The greater the tendency of the data magnitude to increase in the data space, i.e. when
Figure 376947DEST_PATH_IMAGE031
The greater the tendency for the data magnitude to decrease in the data space. By passing
Figure 378401DEST_PATH_IMAGE034
The total amount of storage quantities still remaining in all storage spaces of all nodes can be obtained.
By passing
Figure 311722DEST_PATH_IMAGE035
The storage quantity value allocated to the storage space with the increasing trend after the corresponding storage quantity value is increased, namely the newly allocated storage quantity value can be obtained
Figure 449443DEST_PATH_IMAGE036
At this time
Figure 567440DEST_PATH_IMAGE037
By passing
Figure 56190DEST_PATH_IMAGE035
The storage quantity value allocated after the corresponding storage quantity value is reduced in the storage space with the reduction trend, namely the newly allocated storage quantity value can be obtained
Figure 527623DEST_PATH_IMAGE036
At this time
Figure 785429DEST_PATH_IMAGE038
Through the technical scheme, all unoccupied storage quantity values can be distributed again at intervals of preset time, so that each storage space has a storage space corresponding to the quantity value for storing the financial data, the space for storing the financial data by each node in the block chain architecture is timely and effectively managed, and the stability of the block chain architecture is guaranteed.
The technical solution provided by the present invention further provides a financial data storage device based on a block chain, as shown in fig. 4, including:
the system comprises an uploading module, a searching module and a processing module, wherein the uploading module is used for receiving first financial data uploaded by a first node in a block chain and determining multidimensional storage data information corresponding to the first node according to a first role corresponding to the first node;
the storage module is used for determining at least one second role based on the first role, and respectively storing the first financial data in storage spaces corresponding to the multidimensional storage data information, wherein each second role corresponds to one storage space;
the sorting module is used for acquiring the attribute mark and the time mark of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute mark, and sorting and updating the second financial data stored in the storage unit in advance and the first financial data stored at present according to the time mark to obtain third financial data;
and the updating reminding module is used for storing all the nodes corresponding to the second roles and the first roles to finish reminding after judging that all the storage spaces corresponding to the multidimensional storage data information are respectively updated to obtain third financial data.
The present invention also provides a storage medium having a computer program stored therein, the computer program being executable by a processor to implement the methods provided by the various embodiments described above.
The storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, a storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Additionally, the ASIC may reside in user equipment. Of course, the processor and the readable storage medium may also reside as discrete components in a communication device. The readable storage medium may be read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and the like.
The present invention also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the device may read the execution instructions from the readable storage medium, and the execution of the execution instructions by the at least one processor causes the device to implement the methods provided by the various embodiments described above.
In the above embodiments of the terminal or the server, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. The financial data storage method based on the block chain is characterized by comprising the following steps:
receiving first financial data uploaded by a first node in a block chain, and determining multidimensional storage data information corresponding to the first node according to a first role corresponding to the first node;
acquiring a first role corresponding to a first node, and determining a corresponding first set in a corresponding table according to the first role, wherein the first set comprises at least one second role;
acquiring all storage spaces corresponding to all second roles in the first set, and generating multi-dimensional storage data information, wherein each second role corresponds to one storage space;
processing node configuration data input by a user to generate connection relation information and role level information of each node in a block chain;
generating a tree graph based on the connection relation information and the role level information, wherein the tree graph comprises a root node, a plurality of child nodes and a plurality of grandchild nodes;
generating a first set corresponding to each node according to the root node, the child nodes and the grandchild nodes, and generating a corresponding table based on the first set corresponding to each node;
acquiring a node corresponding to a previous level of a root node to generate a first set, wherein if the node corresponding to the previous level does not exist, only the role corresponding to the first set in the root node exists in the first set corresponding to the root node;
extracting that a first role of the root node corresponds to the first set;
determining at least one second role based on the first role, and respectively storing the first financial data at storage spaces corresponding to the multidimensional storage data information, wherein each second role corresponds to one storage space;
acquiring an attribute mark and a time mark of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute mark, and sequencing and updating second financial data stored in the storage unit previously and the first financial data stored currently according to the time mark to obtain third financial data;
and if all storage spaces corresponding to the multidimensional storage data information are judged to be updated respectively to obtain third financial data, all nodes corresponding to the second roles and the first roles are reminded of completing storage.
2. The blockchain-based financial data storage method of claim 1,
generating a first set corresponding to each node according to the root node, the plurality of child nodes and the plurality of grandchild nodes, wherein generating a correspondence table based on the first set corresponding to each node comprises:
acquiring a root node corresponding to a first level on a child node to generate a first set, and taking a role corresponding to a node in the first set as a second role;
extracting that a first role of the child node corresponds to the first set.
3. The blockchain-based financial data storage method of claim 1,
generating a first set corresponding to each node according to the root node, the plurality of child nodes and the plurality of grandchild nodes, wherein generating a correspondence table based on the first set corresponding to each node comprises:
acquiring child nodes and root nodes corresponding to the previous level of the grandchild node to generate a first set, and taking the roles corresponding to the nodes in the first set as second roles;
and extracting that the first role of the grandchild node corresponds to the first set.
4. The blockchain-based financial data storage method of claim 1 further including:
selecting a second role in the first set corresponding to the first role;
and acquiring a storage space corresponding to the second role, partitioning the storage space corresponding to the second role to establish a storage unit corresponding to the first role, wherein the storage unit corresponding to the first role is used for storing first financial data.
5. The blockchain-based financial data storage method according to claim 4,
acquiring an attribute mark and a time mark of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute mark, and sequencing and updating second financial data stored in the storage unit previously and the first financial data stored currently according to the time mark to obtain third financial data, wherein the third financial data comprises:
obtaining attribute tags of the first financial data, wherein the attribute tags comprise roles of first nodes;
selecting a storage unit corresponding to the role of the first node in a storage space corresponding to a second role, and storing first financial data to the storage unit corresponding to the role of the first node;
extracting all second financial data previously stored in a storage unit corresponding to the role of the first node and time marks corresponding to the second financial data;
and sequencing the second financial data and the first financial data based on the time marks of the second financial data and the time marks of the first financial data to obtain third financial data sequenced according to a time sequence.
6. The blockchain-based financial data storage method of claim 1 further comprising:
counting roles corresponding to all nodes, and acquiring the number of each role in a first set corresponding to all nodes;
determining a quantity of pre-allocated storage space corresponding to the corresponding node based on the number of each role in all the first sets;
the amount of pre-allocated memory is calculated by the following formula,
Figure 902988DEST_PATH_IMAGE002
wherein,
Figure DEST_PATH_IMAGE003
is as follows
Figure 515366DEST_PATH_IMAGE004
The amount of allocated storage of the individual storage spaces,
Figure DEST_PATH_IMAGE005
is as follows
Figure 147074DEST_PATH_IMAGE004
The number of roles in all first sets,
Figure 780180DEST_PATH_IMAGE006
is as follows
Figure DEST_PATH_IMAGE007
The number of roles in all first sets,
Figure 882127DEST_PATH_IMAGE008
is the upper limit value of the character,
Figure DEST_PATH_IMAGE009
for the total stored quantity value of all the spaces,
Figure 32617DEST_PATH_IMAGE010
is as follows
Figure 112306DEST_PATH_IMAGE004
The node type weight value corresponding to each storage space,
Figure DEST_PATH_IMAGE011
is as follows
Figure 526101DEST_PATH_IMAGE012
The role weight value corresponding to each storage space;
and performing initial allocation on the total storage space based on the quantity value of the pre-allocated storage space so as to allocate corresponding initial storage space to each node.
7. The blockchain-based financial data storage method of claim 6 further comprising:
acquiring the stored data quantity value of the data at the current moment in each storage space at intervals of a preset time period;
obtaining a current stored average quantity value according to the stored quantity value of the data in each storage space;
and adjusting the distribution storage quantity value of the storage space according to the stored quantity value of the data in each storage space, the current stored average quantity value and the role weight value corresponding to each storage space.
8. The blockchain-based financial data storage method of claim 7,
the step of adjusting the distributed storage quantity value of the storage space according to the stored quantity value of the data in each storage space, the current stored average quantity value and the role weight value corresponding to each storage space comprises the following steps:
if the stored data quantity value is judged to be larger than or equal to the current stored average quantity value;
obtaining a forward variation trend value based on the stored data quantity value and the stored average quantity value, and performing forward adjustment on the distributed storage quantity value in the storage space based on the first forward variation trend value and the role weight value;
if the stored data quantity value is smaller than the current stored average quantity value;
and obtaining a negative change trend value based on the stored data quantity value and the stored average quantity value, and carrying out negative adjustment on the distributed storage quantity value in the storage space based on the negative change trend value and the role weight value.
9. The blockchain-based financial data storage method of claim 6,
the amount of memory allocated to the memory space is adjusted by the following formula,
Figure 458285DEST_PATH_IMAGE014
wherein,
Figure DEST_PATH_IMAGE015
is as follows
Figure 848684DEST_PATH_IMAGE016
The data within the individual memory spaces has stored a quantity value,
Figure DEST_PATH_IMAGE017
for the current stored average magnitude value,
Figure 986142DEST_PATH_IMAGE018
is as follows
Figure DEST_PATH_IMAGE019
The data within the individual memory spaces has stored a quantity value,
Figure 570838DEST_PATH_IMAGE012
is the upper limit value of the storage space,
Figure 963554DEST_PATH_IMAGE020
is a quantitative value of the storage space,
Figure DEST_PATH_IMAGE021
is as follows
Figure 721426DEST_PATH_IMAGE016
The amount of memory allocated after the adjustment of the individual memory space,
Figure 480434DEST_PATH_IMAGE022
is as follows
Figure 859201DEST_PATH_IMAGE016
The amount of memory allocated before the individual memory space is adjusted,
Figure DEST_PATH_IMAGE023
is as follows
Figure 172501DEST_PATH_IMAGE024
The amount of memory allocated before the individual memory space is adjusted,
Figure DEST_PATH_IMAGE025
is as follows
Figure 967020DEST_PATH_IMAGE024
The individual memory space data has stored a quantity value,
Figure 642852DEST_PATH_IMAGE026
is as follows
Figure 693984DEST_PATH_IMAGE016
The weight value of the role corresponding to each storage space is obtained by
Figure DEST_PATH_IMAGE027
And obtaining the total amount of the storage quantity values remaining in all the storage spaces of all the nodes.
10. Financial data storage device based on block chain, its characterized in that includes:
the system comprises an uploading module, a searching module and a processing module, wherein the uploading module is used for receiving first financial data uploaded by a first node in a block chain and determining multidimensional storage data information corresponding to the first node according to a first role corresponding to the first node;
acquiring a first role corresponding to a first node, and determining a corresponding first set in a corresponding table according to the first role, wherein the first set comprises at least one second role;
acquiring all storage spaces corresponding to all second roles in the first set, and generating multi-dimensional storage data information, wherein each second role corresponds to one storage space;
processing node configuration data input by a user to generate connection relation information and role level information of each node in a block chain;
generating a tree graph based on the connection relation information and the role level information, wherein the tree graph comprises a root node, a plurality of child nodes and a plurality of grandchild nodes;
generating a first set corresponding to each node according to the root node, the child nodes and the grandchild nodes, and generating a corresponding table based on the first set corresponding to each node;
acquiring a node corresponding to a previous level of a root node to generate a first set, wherein if the node corresponding to the previous level does not exist, only the role corresponding to the first set in the root node exists in the first set corresponding to the root node;
extracting that a first role of the root node corresponds to the first set;
the storage module is used for determining at least one second role based on the first role, and respectively storing the first financial data in storage spaces corresponding to the multidimensional storage data information, wherein each second role corresponds to one storage space;
the sorting module is used for acquiring the attribute mark and the time mark of the first financial data, selecting a corresponding storage unit in a storage space based on the attribute mark, and sorting and updating the second financial data stored in the storage unit in advance and the first financial data stored at present according to the time mark to obtain third financial data;
and the updating reminding module is used for storing all the nodes corresponding to the second role and the first role to finish reminding after respectively updating all the storage spaces corresponding to the multidimensional storage data information to obtain third financial data.
11. Storage medium, characterized in that a computer program is stored in the storage medium, which computer program, when being executed by a processor, is adapted to carry out the method of any of claims 1 to 9.
CN202210252406.3A 2022-03-15 2022-03-15 Financial data storage method and device based on block chain and storage medium Active CN114357085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210252406.3A CN114357085B (en) 2022-03-15 2022-03-15 Financial data storage method and device based on block chain and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210252406.3A CN114357085B (en) 2022-03-15 2022-03-15 Financial data storage method and device based on block chain and storage medium

Publications (2)

Publication Number Publication Date
CN114357085A CN114357085A (en) 2022-04-15
CN114357085B true CN114357085B (en) 2022-06-03

Family

ID=81094334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210252406.3A Active CN114357085B (en) 2022-03-15 2022-03-15 Financial data storage method and device based on block chain and storage medium

Country Status (1)

Country Link
CN (1) CN114357085B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114708080B (en) * 2022-06-06 2022-08-26 湖南涉外经济学院 Distributed financial data online processing method
CN114995772B (en) * 2022-08-08 2022-10-21 南京三百云信息科技有限公司 Customer data migration and storage method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106796688A (en) * 2016-12-26 2017-05-31 深圳前海达闼云端智能科技有限公司 Permission control method, device and system of block chain and node equipment
CN109684333A (en) * 2018-12-24 2019-04-26 杭州复杂美科技有限公司 A kind of storage of data and method of cutting out, equipment and storage medium
CN111427959A (en) * 2020-03-27 2020-07-17 北京贝斯平云科技有限公司 Data storage method and device
CN112036995A (en) * 2020-08-20 2020-12-04 深圳市易链信息技术有限公司 Large-scale enterprise financial data management method and system based on block chain and readable storage medium
CN112307444A (en) * 2020-10-30 2021-02-02 平安数字信息科技(深圳)有限公司 Role creation method, role creation device, computer equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180152442A1 (en) * 2003-12-22 2018-05-31 Guardtime Ip Holdings Limited Blockchain-supported, hash tree-based digital signature infrastructure
US20190188411A1 (en) * 2017-12-19 2019-06-20 Vladislav Kroutik Systems and Methods for Decentralizing Consumer Preferences, Consent and Permissions Management with Reward and Reputation Network for Enterprises Using a Blockchain Ledger
CN109492431A (en) * 2018-10-31 2019-03-19 国网河南省电力公司信息通信公司 The storage method and its system and electronic equipment of financial data
CN109767336A (en) * 2018-12-27 2019-05-17 福建省农村信用社联合社 It is a kind of based on block chain P2P financing platform fund bank deposit pipe management method
CN109729168B (en) * 2018-12-31 2021-10-01 浙江成功软件开发有限公司 Data sharing exchange system and method based on block chain
US10839377B2 (en) * 2019-01-25 2020-11-17 Coinbase, Inc. Syncing blockchain nodes with snapshots
CN110659298B (en) * 2019-08-14 2022-06-07 金蝶软件(中国)有限公司 Financial data processing method and device, computer equipment and storage medium
CN112819599A (en) * 2021-02-23 2021-05-18 南京启用宝信息科技有限公司 Enterprise finance and tax accounting management system based on block chain
CN113778681B (en) * 2021-09-10 2024-05-03 施麟 Data processing method and device based on cloud computing and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106796688A (en) * 2016-12-26 2017-05-31 深圳前海达闼云端智能科技有限公司 Permission control method, device and system of block chain and node equipment
CN109684333A (en) * 2018-12-24 2019-04-26 杭州复杂美科技有限公司 A kind of storage of data and method of cutting out, equipment and storage medium
CN111427959A (en) * 2020-03-27 2020-07-17 北京贝斯平云科技有限公司 Data storage method and device
CN112036995A (en) * 2020-08-20 2020-12-04 深圳市易链信息技术有限公司 Large-scale enterprise financial data management method and system based on block chain and readable storage medium
CN112307444A (en) * 2020-10-30 2021-02-02 平安数字信息科技(深圳)有限公司 Role creation method, role creation device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《Block chain Based Medical Reports Monitoring System》;M N. Thippeswamy 等;《IEEE》;20201110;第1-6页 *
《基于区块链的共享数据访问控制研究》;潘启青;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;20210315;第I138-11页 *

Also Published As

Publication number Publication date
CN114357085A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN114357085B (en) Financial data storage method and device based on block chain and storage medium
CN109242612B (en) Product recommendation method and device
CN105354251B (en) Electric power cloud data management indexing means based on Hadoop in electric system
CN110110006A (en) Data managing method and Related product
CN105096174A (en) Transaction matching method and transaction matching system
WO2022021698A1 (en) Block chain using multiple information integration mode
CN108551489A (en) A kind of application server load balancing method, system, device and storage medium
EP3701480B1 (en) Systems and methods for intelligently grouping financial product users into cohesive cohorts
CN113849848B (en) Data permission configuration method and system
CN106952085B (en) Method and device for data storage and service processing
CN107070645A (en) Compare the method and system of the data of tables of data
CN109086289A (en) A kind of media data processing method, client, medium and equipment
CN115619234A (en) Voting processing method, device and storage medium
CN114781717A (en) Network point equipment recommendation method, device, equipment and storage medium
CN109285015B (en) Virtual resource allocation method and system
CN106789147A (en) A kind of flow analysis method and device
CN113094444B (en) Data processing method, data processing device, computer equipment and medium
CN111611228B (en) Load balancing adjustment method and device based on distributed database
CN110310145B (en) Product multi-dimensional configuration method, device, computer equipment and storage medium
CN116319576A (en) Access flow control method, device, computer equipment and storage medium
CN112764935B (en) Big data processing method and device, electronic equipment and storage medium
CN111562990B (en) Lightweight serverless computing method based on message
CN102609510B (en) Chinese name data processing method and device
CN109727144A (en) Insure Incidence calculus method, apparatus, equipment and computer readable storage medium
CN108449376A (en) A kind of load-balancing method of big data calculate node that serving enterprise

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant