CN108401026A - Date storage method, system based on block chain and computer readable storage medium - Google Patents

Date storage method, system based on block chain and computer readable storage medium Download PDF

Info

Publication number
CN108401026A
CN108401026A CN201810164201.3A CN201810164201A CN108401026A CN 108401026 A CN108401026 A CN 108401026A CN 201810164201 A CN201810164201 A CN 201810164201A CN 108401026 A CN108401026 A CN 108401026A
Authority
CN
China
Prior art keywords
node server
data
child node
block chain
host node
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.)
Granted
Application number
CN201810164201.3A
Other languages
Chinese (zh)
Other versions
CN108401026B (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.)
Shenzhen Zhi Qian Block Chain Science And Technology Co Ltd
Original Assignee
Shenzhen Zhi Qian Block Chain Science And Technology 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 Shenzhen Zhi Qian Block Chain Science And Technology Co Ltd filed Critical Shenzhen Zhi Qian Block Chain Science And Technology Co Ltd
Priority to CN201810164201.3A priority Critical patent/CN108401026B/en
Publication of CN108401026A publication Critical patent/CN108401026A/en
Application granted granted Critical
Publication of CN108401026B publication Critical patent/CN108401026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The invention discloses a kind of date storage methods based on block chain, include the following steps:The host node server sends the first data acquisition request to each child node server;When receiving first data acquisition request, the currently stored business datum of child node server described in the child node server feedback;When receiving the business datum of the child node server feedback, business datum described in the host node server storage.The invention also discloses a kind of data-storage system and computer readable storage medium based on block chain.The invention enables all block, that is, business datums in the distributed network only to need to store to host node server, and child node server is not necessarily to store the business datum of other node servers, and the resource of each child node server is greatly saved.And improve the operational efficiency with the relevant application program of the distributed network in each child node server.

Description

Date storage method, system based on block chain and computer readable storage medium
Technical field
The present invention relates to technical field of data storage more particularly to a kind of date storage method based on block chain, systems And computer readable storage medium.
Background technology
Block chain is the authentic data library that a decentralization goes to the collective trusted to safeguard, distributed network is block chain Infrastructure, the data generated on each node are broadcast to other nodes by distributed network, other nodes pass through workload Proof carrys out the authenticity of verify data.Distributed network is before ensureing block chain decentralization, can not distorting, can recall characteristic It carries, in bit coin network, just because of being distributed in the verification node in the whole world, just so that the proof of work mechanism of bit coin It gets the nod, also just allows it was recognized that the value of block chain.
Distributed network is the basis of block chain, and be connected to each node in distributed network be stored with it is identical Data trade records, that is, each nodes records identical " account " are then the main features of block chain, it is ensured that complete Data, must be synchronized to each node at any time, and can ensure the consistency of data by net " as soon as account ".But it is answered actual With in system, business datum may be very huge, especially include video, audio data, easily tens, some is even up to a hundred Million, so huge data are transmitted in a network, very high to bandwidth requirement, and data so big in the whole network pool " account ", then this account book can be very huge, and individual node is it is difficult to ensure that have enough memory capacity to store.
Every single application established on this block chain, is required for downloading all blocks i.e. business datum, cause The business datum of a large amount of useless other applications of the corresponding terminal downloads of the node, therefore the data of the corresponding terminal of the node are huge Greatly, lead to the wasting of resources of the corresponding terminal of the node.
The above is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that the above is existing skill Art.
Invention content
The date storage method that the main purpose of the present invention is to provide a kind of based on block chain, system and computer-readable Storage medium, it is intended to solve the corresponding terminal of each node in existing block chain and all data for synchronizing the block chain is needed to make end The technical issues of holding the business datum of storage huge and resulting in waste of resources.
To achieve the above object, the present invention provides a kind of date storage method based on block chain, applied to passing through block The distributed network of chain construction, the distributed network includes at least one host node server and several child node services Device, the date storage method based on block chain include the following steps:
The host node server sends the first data acquisition request to each child node server;
When receiving first data acquisition request, child node server is worked as described in the child node server feedback The business datum of preceding storage;
When receiving the business datum of the child node server feedback, business described in the host node server storage Data.
Further, in one embodiment, described after described in the host node server storage the step of business datum The date storage method of block chain further includes:
There are when the first child node server of data update in each child node server, first son saves Point server obtains updated first data;
First data got are sent to the host node server by the first child node server;
When receiving first data, the host node server based on the first child node server first First data described in identification information storage.
Further, in one embodiment, described after described in the host node server storage the step of business datum The date storage method of block chain further includes:
In the second child node server for monitoring currently to increase newly, the host node server obtains the second son section The second identifier information of point server;
The host node server is based on the second identifier information and sends the second data acquisition request to second son Node server;
When receiving second data acquisition request, the second child node server feedback the second child node service The second current data of device are to the host node server;
When receiving second data, the host node server is based on the described in the second identifier information storage Two data.
Further, in one embodiment, the distributed network includes multiple host node servers, the block chain Date storage method further includes:
Each the multiple host node server sends third data acquisition request to other host node servers respectively, with For other host node server feedback own service data;
When receiving other host node server feedback own service data, other masters of the host node server storage The own service data of node server feedback.
Further, in one embodiment, the date storage method of the block chain further includes:
Third child node server sends the 4th data acquisition request to nearest host node server, wherein described the Three child node servers are that there is currently the child node servers of disaster recovery requirement in each child node server;
When receiving four data acquisition request, third child node described in nearest host node whois lookup takes The corresponding third data of business device, and the third data found are sent to the third child node server;
When receiving the third data, third data described in the third child node server storage.
Further, in one embodiment, when receiving four data acquisition request, nearest host node service Device searches the step of third child node server corresponding third data and includes:
When receiving four data acquisition request, nearest host node server is based on the 4th data acquisition The third identification information of third child node server described in acquisition request;
Nearest host node server is based on the third identification information and searches the third data.
Further, in one embodiment, the third child node server sends the 4th data acquisition request to nearest Host node server the step of include:
The third child node server obtains the location information of each host node server;
The third child node server determines the nearest host node server based on the location information.
Further, in one embodiment, described when receiving the business datum of the child node server feedback, institute The step of stating business datum described in host node server storage include:
When receiving the business datum of the child node server feedback, the host node server obtains each described The identification information of child node server;
The identification information and business datum of each child node server is respectively associated in the host node server.
In addition, to achieve the above object, it is described to be based on the present invention also provides a kind of data-storage system based on block chain The data-storage system of block chain includes:It memory, processor and is stored on the memory and can be on the processor The data recording program based on block chain of operation, when the data recording program based on block chain is executed by the processor The step of realizing date storage method described in any one of the above embodiments based on block chain.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium The data recording program based on block chain is stored on storage medium, the data recording program based on block chain is by processor The step of date storage method described in any one of the above embodiments based on block chain is realized when execution.
The present invention sends the first data acquisition request to each child node server by the host node server, Then when receiving first data acquisition request, the business of child node server described in the child node server feedback Data, then when receiving the business datum of the child node server feedback, industry described in the host node server storage Business data so that all block, that is, business datums in the distributed network only need to store to host node server, child node Server is not necessarily to store the business datum of other node servers, and the resource of each child node server is greatly saved.And Improve the operational efficiency with the relevant application program of the distributed network in each child node server.
Description of the drawings
Fig. 1 is the knot of the data-storage system based on block chain in the hardware running environment that the embodiment of the present invention is related to Structure schematic diagram;
Fig. 2 is the flow diagram of one embodiment of date storage method of block chain of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in Figure 1, the data based on block chain are deposited in the hardware running environment that Fig. 1, which is the embodiment of the present invention, to be related to The structural schematic diagram of storage system.
Terminal of the embodiment of the present invention can be PC, can also be smart mobile phone, tablet computer, E-book reader, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3) Player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard sound Frequency level 4) the packaged type terminal device with display function such as player, pocket computer.
As shown in Figure 1, the terminal may include:Processor 1001, such as CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components. User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 may include optionally that the wired of standard connects Mouth, wireless interface (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory, can also be stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
Optionally, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio Circuit, WiFi module etc..Wherein, sensor such as optical sensor, motion sensor and other sensors.Specifically, light Sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can according to the light and shade of ambient light come The brightness of display screen is adjusted, proximity sensor can close display screen and/or backlight when mobile terminal is moved in one's ear.As One kind of motion sensor, gravity accelerometer can detect in all directions the size of (generally three axis) acceleration, quiet Size and the direction that can detect that gravity when only, the application that can be used to identify mobile terminal posture are (such as horizontal/vertical screen switching, related Game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, mobile terminal can also match The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor are set, details are not described herein.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap It includes than illustrating more or fewer components, either combines certain components or different components arrangement.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage media Believe module, Subscriber Interface Module SIM and the data recording program based on block chain.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, is carried out with background server Data communicate;User interface 1003 is mainly used for connecting client (user terminal), with client into row data communication;And processor 1001 can be used for calling the data recording program based on block chain stored in memory 1005.
In the present embodiment, the data-storage system based on block chain includes:Memory 1005, processor 1001 and storage On the memory 1005 and the data recording program based on block chain that can be run on the processor 1001, wherein When processor 1001 calls the data recording program based on block chain stored in memory 1005, and execute following operation:
The host node server sends the first data acquisition request to each child node server;
When receiving first data acquisition request, child node server is worked as described in the child node server feedback The business datum of preceding storage;
When receiving the business datum of the child node server feedback, business described in the host node server storage Data.
Further, processor 1001 can call the data storage journey based on block chain stored in memory 1005 Sequence also executes following operation:
There are when the first child node server of data update in each child node server, first son saves Point server obtains updated first data;
First data got are sent to the host node server by the first child node server;
When receiving first data, the host node server based on the first child node server first First data described in identification information storage.
Further, processor 1001 can call the data storage journey based on block chain stored in memory 1005 Sequence also executes following operation:
In the second child node server for monitoring currently to increase newly, the host node server obtains the second son section The second identifier information of point server;
The host node server is based on the second identifier information and sends the second data acquisition request to second son Node server;
When receiving second data acquisition request, the second child node server feedback the second child node service The second current data of device are to the host node server;
When receiving second data, the host node server is based on the described in the second identifier information storage Two data.
Further, processor 1001 can call the data storage journey based on block chain stored in memory 1005 Sequence also executes following operation:
Each the multiple host node server sends third data acquisition request to other host node servers respectively, with For other host node server feedback own service data;
When receiving other host node server feedback own service data, other masters of the host node server storage The own service data of node server feedback.
Further, processor 1001 can call the data storage journey based on block chain stored in memory 1005 Sequence also executes following operation:
Third child node server sends the 4th data acquisition request to nearest host node server, wherein described the Three child node servers are that there is currently the child node servers of disaster recovery requirement in each child node server;
When receiving four data acquisition request, third child node described in nearest host node whois lookup takes The corresponding third data of business device, and the third data found are sent to the third child node server;
When receiving the third data, third data described in the third child node server storage.
Further, processor 1001 can call the data storage journey based on block chain stored in memory 1005 Sequence also executes following operation:
When receiving four data acquisition request, nearest host node server is based on the 4th data acquisition The third identification information of third child node server described in acquisition request;
Nearest host node server is based on the third identification information and searches the third data.
Further, processor 1001 can call the data storage journey based on block chain stored in memory 1005 Sequence also executes following operation:
The third child node server obtains the location information of each host node server;
The third child node server determines the nearest host node server based on the location information.
Further, processor 1001 can call the data storage journey based on block chain stored in memory 1005 Sequence also executes following operation:
When receiving the business datum of the child node server feedback, the host node server obtains each described The identification information of child node server;
The identification information and business datum of each child node server is respectively associated in the host node server.
The present invention also provides a kind of date storage methods based on block chain, are that the present invention is based on blocks with reference to Fig. 2, Fig. 2 The flow diagram of one embodiment of date storage method of chain.
In the present embodiment, the date storage method based on block chain is applied to the distributed network constructed by block chain Network, the distributed network include at least one host node server and several child node servers.
I.e. the distributed network includes at least one host node and several child nodes, and the corresponding server of the host node is Host node server, the corresponding server of the child node are child node server.Wherein, host node server can be the distribution The corresponding clothes of the high node of the safety coefficients such as the corresponding server of the node of the public institutions such as government, large data center in formula network Business device.
Step S110, the host node server send the first data acquisition request to each child node server;
In the present embodiment, in the host node and child node for determining the distributed network, host node server sends the One data acquisition request is to each child node server, to obtain business number currently stored in each child node server According to specifically, which obtains the identification information of all child node servers in the distributed network, and being based on should First data acquisition request is sent to each child node server by identification information, wherein the identification information can be each son The network address information etc. of unique identification information and each child node server of the node in the distributed server, business number According to refer to stored in child node server with the relevant data of the distributed network.
Step S120, when receiving first data acquisition request, son section described in the child node server feedback The business datum of point server;
In the present embodiment, in the first data acquisition request for receiving host node server transmission, child node service Device feeds back the business datum of the child node server, and specifically, child node server can be by all of the child node server Business datum carries out compression packing processing according to preset rules, and business datum is sent to host node server by treated.
Step S130, when receiving the business datum of the child node server feedback, the host node server is deposited Store up the business datum.
In the present embodiment, when receiving the business datum of each child node server feedback, the host node server The business datum received is stored, specifically, which obtains the identification information of each child node server, And the identification information and business datum for storing each child node server is respectively associated, i.e., by the identification information and the mark The business datum of the corresponding child node server feedback of information is associated storage, in order to subsequently transfer the business datum.
If the distributed network includes multiple host node servers, the first host node server obtains
The date storage method based on block chain that the present embodiment proposes sends the first number by the host node server It is asked to each child node server, then when receiving first data acquisition request, the sub- section according to obtaining Point server feeds back the business datum of the child node server, then in the business for receiving the child node server feedback When data, business datum described in the host node server storage so that all blocks, that is, business number in the distributed network According to only needing to store to host node server, child node server is not necessarily to store the business datum of other node servers, significantly The resource of each child node server is saved.And it improves relevant with the distributed network in each child node server The operational efficiency of application program so that the application program is convenient for universal.
Based on first embodiment, propose that the present invention is based on the second embodiments of the date storage method of block chain, in this reality It applies in example, after step s 130, the date storage method of the block chain further includes:
Step S140, there are when the first child node server of data update in each child node server, institute It states the first child node server and obtains updated first data;
In the present embodiment, each child node server can monitor whether its own stores data update in real time, There are when the first child node server of data update in each child node server, after the first child node server obtains update The first data.
First data got are sent to the host node and taken by step S150, the first child node server Business device;
Step S160, when receiving first data, the host node server is taken based on first child node First data described in the first identifier information storage of business device.
In the present embodiment, when the first child node server gets the first data, which will First data are sent to host node server, and when receiving first data, which is based on the first son The first data of first identifier information storage of node server, wherein first data can be only there are newer update after The Data Identification of business datum before business datum and update, after which is based on first identifier information using update Business datum covers the corresponding business datum of the Data Identification, the institute in first data is the current first child node servers When some business datums, the host node server is using the first data cover corresponding business datum of first identifier information.
The date storage method based on block chain that the present embodiment proposes, by being deposited in each child node server In the first child node server of data update, the first child node server obtains updated first data, then First data got are sent to the host node server by the first child node server, are then being received When first data, described in first identifier information storage of the host node server based on the first child node server First data, and then realize the efficiency and timeliness that child node server sync to child node server is improved to data storage.
Based on first embodiment, propose that the present invention is based on the 3rd embodiments of the date storage method of block chain, in this reality It applies in example, after step s 130, the date storage method of the block chain further includes:
Step S170, in the second child node server for monitoring currently to increase newly, the host node server obtains institute The second identifier information of the second child node server is stated, and the second data acquisition request is sent extremely based on the second identifier information The second child node server;
In the present embodiment, which can monitor in the distributed network in real time with the presence or absence of newly-built son section Point server, in the second child node server for monitoring currently to increase newly, the host node server obtains second son The second identifier information of node server, and the second data acquisition request is sent to described second based on the second identifier information Child node server.
Step S180, when receiving second data acquisition request, the second child node server feedback second The second current data of child node server are to the host node server;
In the present embodiment, when receiving second data acquisition request, which obtains it certainly The business datum of body i.e. the second data, and second data are fed back to host node server.
Step S190, when receiving second data, the host node server is based on the second identifier information Store second data.
In the present embodiment, in the second data for receiving feedback, the host node server storage receive second Data, specifically, the second identifier information and the second data of the host node server associated storage the second child node server, In order to subsequently transfer the business datum.
The date storage method based on block chain that the present embodiment proposes, by being saved in the second son for monitoring currently to increase newly When point server, the host node server obtains the second identifier information of the second child node server, and based on described Second identifier information sends the second data acquisition request to the second child node server, is then receiving second number When according to obtaining request, the second current data of the second child node of the second child node server feedback server to the main section Point server, then when receiving second data, the host node server is based on the second identifier information storage Second data realize the business datum by the second newly-increased child node server of host node server sync storage, So that the second child node server is not necessarily to store the business datum of other node servers, second child node is greatly saved The resource of server.
Based on first embodiment, propose that the present invention is based on the fourth embodiments of the date storage method of block chain, in this reality It applies in example, which includes multiple host node servers, and the date storage method of the block chain further includes:
Step S200, each the multiple host node server send third data acquisition request to other host nodes respectively Server, for other host node server feedback own service data;
Step S210, when receiving other host node server feedback own service data, each host node server Store the own service data of other host node server feedbacks.
In the present embodiment, each the multiple host node server sends third data acquisition request to other masters respectively Node server, for other host node server feedback own service data, wherein own service data refer to the current master Node server with the business number in the relevant business datum of distributed network in addition to the business datum of child node server According to, when receiving other host node server feedback own service data, each other host nodes of host node server storage The own service data of server feedback.
The date storage method based on block chain that the present embodiment proposes passes through each the multiple host node server point Not Fa Song third data acquisition request to other host node servers, for other host node server feedback own service numbers According to, then when receiving other host node server feedback own service data, other masters of each host node server storage The own service data of node server feedback, realize the mutual storage of business datum between each host node server, with When there is the server of disaster recovery requirement convenient for each host node server, the main section can be replied by other host node servers The business datum of point server.
Based on fourth embodiment, propose that the present invention is based on the 5th embodiments of the date storage method of block chain, in this reality It applies in example, the date storage method of block chain further includes:
Step S220, third child node server the 4th data acquisition request of transmission to nearest host node server, In, the third server is that there is currently the child node servers of disaster recovery requirement in each child node server;
In the present embodiment, third child node server can obtain the location information of each host node server, according to each The location information of the location information of a host node server and the third child node server determines nearest host node service Device, then third child node server the 4th data acquisition request of transmission to nearest host node server, nearest to obtain this Host node server in the business datum of the third child node server that stores.
Step S230, when receiving four data acquisition request, described in nearest host node whois lookup The corresponding third data of three child node servers, and the third data found are sent to the third child node server;
In the present embodiment, when receiving four data acquisition request, nearest host node whois lookup institute The corresponding third data of third child node server are stated, specifically, can be looked into according to the identification information of the third child node server The corresponding third data of third child node server are looked for, this can be searched according to the identification information of the third child node server recently Host node server in the business datum of the third child node server that stores, and the third data found are sent to The third child node server.
Step S240, when receiving the third data, third data described in the third child node server storage.
The date storage method based on block chain that the present embodiment proposes sends the 4th number by third child node server According to request is obtained to nearest host node server, then when receiving four data acquisition request, nearest is described The corresponding third data of third child node server described in host node whois lookup, and the third data found are sent to The third child node server, then when receiving the third data, described in the third child node server storage Third data realize the business of the third child node server there is currently disaster recovery requirement by nearest host node server The reduction of data improves the efficiency of the reduction of the business datum of third child node server.
Based on the 5th embodiment, propose that the present invention is based on the sixth embodiments of the date storage method of block chain, in this reality It applies in example, step S230 includes:
Step S231, when receiving four data acquisition request, nearest host node server is based on described the Four data acquisition requests obtain the third identification information of the third child node server;
In the present embodiment, when receiving four data acquisition request, nearest host node server is based on institute The third identification information that the 4th data acquisition request obtains the third child node server is stated, wherein the 4th data acquisition is asked The third identification information for carrying the third child node server is sought, which can be by parsing the 4th Data acquisition request obtains the third identification information.
Step S232, nearest host node server are based on the third identification information and search the third data.
The date storage method based on block chain that the present embodiment proposes, by asking receiving the 4th data acquisition When asking, nearest host node server obtains the third of the third child node server based on the 4th data acquisition request Identification information, then nearest host node server be based on the third identification information and search the third data so that Nearest host node server can fast and accurately find third data according to the third identification information, improve this The data recovering efficiency of three child node servers.
Based on the 5th embodiment, propose that the present invention is based on the 7th embodiments of the date storage method of block chain, in this reality It applies in example, step S220 includes:
Step S221, the third child node server obtain the location information of each host node server;
In the present embodiment, which can be transmitted location information and obtains request to each host node service Device, each host node server feed back the location information of itself to the third sub- section when receiving this and setting information acquisition request Point server.
Step S222, the third child node server determine the nearest host node service based on the location information Device.
In the present embodiment, when getting the location information of each host node server, the third child node server The nearest host node server is determined based on the location information, is believed specifically according to the position of each host node server The location information of breath and the third child node server determines nearest host node server.
The date storage method based on block chain that the present embodiment proposes is obtained each by the third child node server The location information of a host node server, then the third child node server is nearest based on location information determination The host node server, and then can accurately determine nearest main section according to the location information of each host node server Point server further improves the efficiency of the reduction of the business datum of third child node server.
Based on above-described embodiment, propose that the present invention is based on the second embodiments of the date storage method of block chain, in this reality It applies in example, step S130 includes:
Step S131, when receiving the business datum of the child node server feedback, the host node server obtains Take the identification information of each child node server;
In the present embodiment, when carrying the identification information of child node server in business datum, host node server can To obtain the identification information of each child node server by parsing business datum, alternatively, the host node server can be sent out Identification information is sent to obtain request to each child node server, for each child node server feedback identification information.
The identification information and business of each child node server is respectively associated in step S132, the host node server Data.
The date storage method based on block chain that the present embodiment proposes, by receive the child node server anti- When the business datum of feedback, the host node server obtains the identification information of each child node server, then the master The identification information and business datum of each child node server is respectively associated in node server, passes through each height of associated storage The identification information and business datum of node server, calling, update convenient for follow-up business data.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with the data recording program based on block chain, it is real when the data recording program based on block chain is executed by processor Now following operation:
The host node server sends the first data acquisition request to each child node server;
When receiving first data acquisition request, child node server is worked as described in the child node server feedback The business datum of preceding storage;
When receiving the business datum of the child node server feedback, business described in the host node server storage Data.
Further, following operation is also realized when the data recording program based on block chain is executed by processor:
There are when the first child node server of data update in each child node server, first son saves Point server obtains updated first data;
First data got are sent to the host node server by the first child node server;
When receiving first data, the host node server based on the first child node server first First data described in identification information storage.
Further, following operation is also realized when the data recording program based on block chain is executed by processor:
In the second child node server for monitoring currently to increase newly, the host node server obtains the second son section The second identifier information of point server;
The host node server is based on the second identifier information and sends the second data acquisition request to second son Node server;
When receiving second data acquisition request, the second child node server feedback the second child node service The second current data of device are to the host node server;
When receiving second data, the host node server is based on the described in the second identifier information storage Two data.
Further, following operation is also realized when the data recording program based on block chain is executed by processor:
Each the multiple host node server sends third data acquisition request to other host node servers respectively, with For other host node server feedback own service data;
When receiving other host node server feedback own service data, other masters of the host node server storage The own service data of node server feedback.
Further, following operation is also realized when the data recording program based on block chain is executed by processor:
Third child node server sends the 4th data acquisition request to nearest host node server, wherein described the Three child node servers are that there is currently the child node servers of disaster recovery requirement in each child node server;
When receiving four data acquisition request, third child node described in nearest host node whois lookup takes The corresponding third data of business device, and the third data found are sent to the third child node server;
When receiving the third data, third data described in the third child node server storage.
Further, following operation is also realized when the data recording program based on block chain is executed by processor:
When receiving four data acquisition request, nearest host node server is based on the 4th data acquisition The third identification information of third child node server described in acquisition request;
Nearest host node server is based on the third identification information and searches the third data.
Further, following operation is also realized when the data recording program based on block chain is executed by processor:
The third child node server obtains the location information of each host node server;
The third child node server determines the nearest host node server based on the location information.
Further, following operation is also realized when the data recording program based on block chain is executed by processor:
When receiving the business datum of the child node server feedback, the host node server obtains each described The identification information of child node server;
The identification information and business datum of each child node server is respectively associated in the host node server.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements include not only those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this There is also other identical elements in the process of element, method, article or system.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be expressed in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of date storage method based on block chain, which is characterized in that applied to the distributed network constructed by block chain Network, the distributed network include at least one host node server and several child node servers, described to be based on block chain Date storage method include the following steps:
The host node server sends the first data acquisition request to each child node server;
When receiving first data acquisition request, child node server is currently deposited described in the child node server feedback The business datum of storage;
When receiving the business datum of the child node server feedback, business number described in the host node server storage According to.
2. the date storage method as described in claim 1 based on block chain, which is characterized in that the host node server is deposited After the step of storing up the business datum, the date storage method of the block chain further includes:
There are when the first child node server of data update in each child node server, first child node takes Business device obtains updated first data;
First data got are sent to the host node server by the first child node server;
When receiving first data, first identifier of the host node server based on the first child node server First data described in information storage.
3. the date storage method as described in claim 1 based on block chain, which is characterized in that the host node server is deposited After the step of storing up the business datum, the date storage method of the block chain further includes:
In the second child node server for monitoring currently to increase newly, the host node server obtains the second child node clothes The second identifier information of business device;
The host node server is based on the second identifier information and sends the second data acquisition request to second child node Server;
When receiving second data acquisition request, the second child node server feedback the second child node server is worked as The second preceding data are to the host node server;
When receiving second data, the host node server is based on the second number described in the second identifier information storage According to.
4. the date storage method as described in claim 1 based on block chain, which is characterized in that the distributed network includes The date storage method of multiple host node servers, the block chain further includes:
Each the multiple host node server sends third data acquisition request to other host node servers, for it respectively His host node server feedback own service data;
When receiving other host node server feedback own service data, described other host nodes of host node server storage The own service data of server feedback.
5. the date storage method as claimed in claim 4 based on block chain, which is characterized in that the data of the block chain are deposited Method for storing further includes:
Third child node server sends the 4th data acquisition request to nearest host node server, wherein third Node server is that there is currently the child node servers of disaster recovery requirement in each child node server;
When receiving four data acquisition request, third child node server described in nearest host node whois lookup Corresponding third data, and the third data found are sent to the third child node server;
When receiving the third data, third data described in the third child node server storage.
6. the date storage method as claimed in claim 5 based on block chain, which is characterized in that receiving the 4th number According to obtain ask when, the step of corresponding third data of third child node server described in nearest host node whois lookup, wraps It includes:
When receiving four data acquisition request, nearest host node server is based on the 4th data acquisition request Obtain the third identification information of the third child node server;
Nearest host node server is based on the third identification information and searches the third data.
7. the date storage method as claimed in claim 5 based on block chain, which is characterized in that the third child node service Device send the 4th data acquisition request to the step of nearest host node server include:
The third child node server obtains the location information of each host node server;
The third child node server determines the nearest host node server based on the location information.
8. the date storage method as described in any one of claim 1 to 7 based on block chain, which is characterized in that described to connect When receiving the business datum of the child node server feedback, the step of business datum described in the host node server storage, wraps It includes:
When receiving the business datum of the child node server feedback, the host node server obtains each sub- section The identification information of point server;
The identification information and business datum of each child node server is respectively associated in the host node server.
9. a kind of data-storage system based on block chain, which is characterized in that the data-storage system packet based on block chain It includes:Memory, processor and it is stored in the data based on block chain that can be run on the memory and on the processor Program is stored, is realized when the data recording program based on block chain is executed by the processor as appointed in claim 1 to 8 The step of date storage method based on block chain described in one.
10. a kind of computer readable storage medium, which is characterized in that be stored with based on area on the computer readable storage medium The data recording program of block chain realizes such as claim 1 when the data recording program based on block chain is executed by processor The step of to the date storage method based on block chain described in any one of 8.
CN201810164201.3A 2018-02-26 2018-02-26 Block chain-based data storage method, system and computer-readable storage medium Active CN108401026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810164201.3A CN108401026B (en) 2018-02-26 2018-02-26 Block chain-based data storage method, system and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810164201.3A CN108401026B (en) 2018-02-26 2018-02-26 Block chain-based data storage method, system and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN108401026A true CN108401026A (en) 2018-08-14
CN108401026B CN108401026B (en) 2020-06-19

Family

ID=63096068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810164201.3A Active CN108401026B (en) 2018-02-26 2018-02-26 Block chain-based data storage method, system and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN108401026B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109224451A (en) * 2018-09-11 2019-01-18 北京云派网络科技有限公司 Development of games method, equipment and storage medium based on block chain subchain
CN109587237A (en) * 2018-12-03 2019-04-05 爱立信(中国)通信有限公司 It records and the method for data, network node and network is provided
CN110602079A (en) * 2019-09-05 2019-12-20 广州怀恩科技有限公司 Scientific research data uploading and storing method based on block chain technology hierarchical control
CN111784318A (en) * 2020-06-29 2020-10-16 京东数字科技控股有限公司 Data processing method and device, electronic equipment and storage medium
CN112948501A (en) * 2021-05-13 2021-06-11 支付宝(杭州)信息技术有限公司 Data analysis method, device and system
CN116346624A (en) * 2023-02-24 2023-06-27 安芯网盾(北京)科技有限公司 Subnet master node election method and device and host detection system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638584A (en) * 2012-04-20 2012-08-15 青岛海信传媒网络技术有限公司 Data distributing and caching method and data distributing and caching system
US20160342976A1 (en) * 2015-05-21 2016-11-24 Mastercard International Incorporated Method and system for linkage of blockchain-based assets to fiat currency accounts
CN106534317A (en) * 2016-11-17 2017-03-22 杭州云象网络技术有限公司 Disaster recovery cloud storage system construction method based on block chain technology
CN106776820A (en) * 2016-11-25 2017-05-31 中国银行股份有限公司 Obtain method and system, block chain, the centralized system of different blocks chain data
CN107239954A (en) * 2017-06-07 2017-10-10 北京汇通金财信息科技有限公司 It is a kind of to improve the method and device that block produces speed
CN107391303A (en) * 2017-06-30 2017-11-24 北京奇虎科技有限公司 Data processing method, device, system, server and computer-readable storage medium
CN107391527A (en) * 2017-03-28 2017-11-24 阿里巴巴集团控股有限公司 A kind of data processing method and equipment based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638584A (en) * 2012-04-20 2012-08-15 青岛海信传媒网络技术有限公司 Data distributing and caching method and data distributing and caching system
US20160342976A1 (en) * 2015-05-21 2016-11-24 Mastercard International Incorporated Method and system for linkage of blockchain-based assets to fiat currency accounts
CN106534317A (en) * 2016-11-17 2017-03-22 杭州云象网络技术有限公司 Disaster recovery cloud storage system construction method based on block chain technology
CN106776820A (en) * 2016-11-25 2017-05-31 中国银行股份有限公司 Obtain method and system, block chain, the centralized system of different blocks chain data
CN107391527A (en) * 2017-03-28 2017-11-24 阿里巴巴集团控股有限公司 A kind of data processing method and equipment based on block chain
CN107239954A (en) * 2017-06-07 2017-10-10 北京汇通金财信息科技有限公司 It is a kind of to improve the method and device that block produces speed
CN107391303A (en) * 2017-06-30 2017-11-24 北京奇虎科技有限公司 Data processing method, device, system, server and computer-readable storage medium

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109224451A (en) * 2018-09-11 2019-01-18 北京云派网络科技有限公司 Development of games method, equipment and storage medium based on block chain subchain
CN109224451B (en) * 2018-09-11 2021-12-07 北京云派网络科技有限公司 Game development method and device based on block chain subchain and storage medium
CN109587237A (en) * 2018-12-03 2019-04-05 爱立信(中国)通信有限公司 It records and the method for data, network node and network is provided
CN109587237B (en) * 2018-12-03 2019-11-26 爱立信(中国)通信有限公司 It records and the method for data, network node and network is provided
WO2020114310A1 (en) * 2018-12-03 2020-06-11 Telefonaktiebolaget Lm Ericsson (Publ) Method, network node and network for recording and providing data,
CN110602079A (en) * 2019-09-05 2019-12-20 广州怀恩科技有限公司 Scientific research data uploading and storing method based on block chain technology hierarchical control
CN110602079B (en) * 2019-09-05 2021-11-23 广州怀恩科技有限公司 Scientific research data uploading and storing method based on block chain technology hierarchical control
CN111784318A (en) * 2020-06-29 2020-10-16 京东数字科技控股有限公司 Data processing method and device, electronic equipment and storage medium
CN112948501A (en) * 2021-05-13 2021-06-11 支付宝(杭州)信息技术有限公司 Data analysis method, device and system
CN116346624A (en) * 2023-02-24 2023-06-27 安芯网盾(北京)科技有限公司 Subnet master node election method and device and host detection system
CN116346624B (en) * 2023-02-24 2024-01-30 安芯网盾(北京)科技有限公司 Subnet master node election method and device and host detection system

Also Published As

Publication number Publication date
CN108401026B (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN108401026A (en) Date storage method, system based on block chain and computer readable storage medium
KR102040754B1 (en) Interaction method, terminal and server based on recommended content
CN107330035B (en) Operation log synchronization method in database, mobile terminal and computer readable storage medium
US10750223B2 (en) System, method, and device for displaying content item
CN108388988A (en) Synergetic office work method, system and computer readable storage medium based on block chain
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN111694757B (en) Application program testing method and device, electronic equipment and computer readable storage medium
CN110201400A (en) Game item method of commerce, transaction terminal and storage medium based on block chain
CN106502833A (en) Data back up method and device
CN108549586A (en) Information processing method and device
CN114025225B (en) Bullet screen control method and device, electronic equipment and storage medium
CN115022098A (en) Artificial intelligence safety target range content recommendation method, device and storage medium
CN107133350A (en) Data-updating method, mobile terminal and storage medium based on search engine
CN109088914A (en) Generation method, the block chain ecosystem and the computer readable storage medium of block
CN115022328B (en) Server cluster, testing method and device of server cluster and electronic equipment
CN110311995A (en) Distribution method, device and the computer readable storage medium of IP address
CN110198452A (en) A kind of method for previewing of live video, apparatus and system
CN113709573B (en) Method, device, equipment and storage medium for configuring video special effects
CN114372032A (en) Resource file synchronization method, device, equipment and storage medium
CN111709782B (en) Information interaction method and device and electronic equipment
CN112559532A (en) Data insertion method and device based on red and black trees and electronic equipment
CN110311994A (en) The distribution request method, apparatus and readable storage medium storing program for executing of IP address
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN109947964A (en) Method and apparatus for more new information
CN115525554B (en) Automatic test method, system and storage medium for model

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