CN110572468A - server cluster file synchronization method and device, electronic equipment and storage medium - Google Patents

server cluster file synchronization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110572468A
CN110572468A CN201910875406.7A CN201910875406A CN110572468A CN 110572468 A CN110572468 A CN 110572468A CN 201910875406 A CN201910875406 A CN 201910875406A CN 110572468 A CN110572468 A CN 110572468A
Authority
CN
China
Prior art keywords
server cluster
file
host
module
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.)
Granted
Application number
CN201910875406.7A
Other languages
Chinese (zh)
Other versions
CN110572468B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910875406.7A priority Critical patent/CN110572468B/en
Priority to PCT/CN2019/117892 priority patent/WO2021051581A1/en
Publication of CN110572468A publication Critical patent/CN110572468A/en
Application granted granted Critical
Publication of CN110572468B publication Critical patent/CN110572468B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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
    • 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 relates to the technical field of block storage systems, and provides a server cluster file synchronization method, which comprises the following steps: taking each server host as a host node to carry a server cluster; collecting data change or data modification of a change host in the server cluster, and integrating the data change or data modification of the change host into a file module; carrying out validity verification on the file module based on an asymmetric encryption algorithm; carrying out consensus voting based on a consensus algorithm on the file modules passing the validity verification, and triggering an intelligent contract when the consensus reaches a preset proportion; and completing the synchronization of the server cluster file and the file module according to the intelligent contract.

Description

Server cluster file synchronization method and device, electronic equipment and storage medium
Technical Field
the present invention relates to the field of block storage systems, and in particular, to a server cluster file synchronization method and apparatus, an electronic device, and a storage medium.
Background
with the improvement of the informatization degree, the server cluster system is widely applied. A server cluster system is a parallel or distributed system of interconnected computers that work together and run a common set of applications and provide a single system map for users and applications.
the server cluster system looks like only one server at the client, the cluster can utilize a plurality of computers to perform parallel computation so as to obtain high computation speed, and can also use a plurality of computers to perform backup so as to ensure that any one machine damages the whole system or can normally run. Once the cluster service is installed and running on a server, the server can join the cluster. Clustering operations can reduce the number of single points of failure and achieve high availability of clustered resources.
at present, because a server cluster system is composed of a plurality of computers, when one computer is changed or data is modified, each computer needs to be logged in to modify corresponding configuration or data, the processing efficiency is extremely low, and errors are easy to occur, and therefore, a server cluster file synchronization method capable of improving the processing efficiency is needed.
Disclosure of Invention
The invention provides a server cluster file synchronization method and device, electronic equipment and a storage medium, and mainly aims to solve the problems that when data change or data modification occurs in a change host, each computer needs to be logged in to modify corresponding configuration or data, the processing efficiency is extremely low, errors are easy to occur, and the efficiency of realizing file synchronization on a server cluster is effectively improved.
In order to achieve the above object, the present invention provides a server cluster file synchronization method, which is applied to a server cluster, and comprises the following steps:
each server host is taken as a host node to carry a server cluster, each host node in the server cluster is in a decentralized point-to-point distributed block chain network established through a TCP (transmission control protocol), and the online state of the host node is ensured among the host nodes in the server cluster through a heartbeat mechanism;
Collecting data change information or data modification information of a change host in the server cluster, and integrating the data change information and the data modification information into a file module, wherein the change host is a host node with data change or data modification in the server cluster;
carrying out validity verification on the file module based on an asymmetric encryption algorithm;
Carrying out consensus voting based on a consensus algorithm on the file modules passing the validity verification, and triggering a preset intelligent contract when the found consensus is greater than or equal to a preset proportion;
and completing the synchronization of the server cluster file and the file module according to the intelligent contract.
In one embodiment, in the process of loading a server cluster by taking each server host as a host node, the method includes:
Acquiring IP identity information of adjacent peer host nodes through the host nodes in the server cluster;
Storing the acquired IP identity information of each host node on the host nodes in the server cluster according to a predefined structure by adopting a block chain distributed accounting technology,
the IP identity information of each host node in the server cluster at least includes: host model, asset number, and host configuration information.
in one embodiment, the heartbeat mechanism includes:
Sending a self-defined structure body to each host node at regular time, judging the effectiveness of the connection between the host nodes in the server cluster according to the feedback result of each host node after receiving the structure body, if the connection between the host nodes in the server cluster is judged to be invalid, sending a reconnection instruction,
the structure includes a heartbeat packet or heartbeat frame.
In one embodiment, the process of verifying the validity of the file module based on the asymmetric encryption algorithm includes:
Establishing a key authentication system for the changed host based on an asymmetric encryption algorithm;
and judging the legality of the file module through the key authentication system, if the data change in the file module is legal or the data modification is legal, triggering a consensus mechanism to perform consensus voting, and otherwise, sending an alarm request to stop the synchronization of the server cluster file and the file module.
In one embodiment, the process of determining the validity of the file module by the key authentication system includes:
Acquiring a public-private key pair generated by the change host, and separating the public-private key pair to form a public key and a private key;
Encrypting the data change information or the data modification information in the file module by adopting the public key and then adding the encrypted data change information or the encrypted data modification information to each host node in the server cluster;
establishing an information transmission channel based on any one of a DUBBO protocol, a TCP protocol and an HTTP protocol;
and transmitting a private key through the information transmission channel, decrypting the data change information or the data modification information encrypted by the public key by adopting the private key, judging that the file module is legal when the decryption is successful, and otherwise, judging that the file module is illegal.
in one embodiment, when the consensus voting is performed on the file modules passing the validity verification, the preset intelligent contract is triggered when the determined consensus is greater than or equal to a preset proportion, and the method comprises the following steps:
and when the determined consensus is larger than or equal to the preset consensus proportion, triggering the intelligent contract through the file module.
In one embodiment, the process of completing synchronization of the server cluster file and the file module according to the intelligent contract comprises:
triggering an intelligent contract preset in the block chain network to start a contract program;
detecting data change information or data modification information in the file module through the contract program, and starting a data synchronization program;
Enabling each host node in the server cluster and the change host to generate consistent data change or data modification through the data synchronization program;
and verifying and confirming the changed host through each host node in the block chain network, and achieving consensus among all host nodes in the server cluster to ensure the file consistency of the server cluster for the second time.
In order to implement the above server cluster file synchronization method, the present invention provides a server cluster file synchronization apparatus, which is characterized by comprising:
the system comprises a cluster carrying module, a central processing module and a central processing module, wherein the cluster carrying module is used for carrying a server cluster by taking each server host as a host node, the server hosts are in a decentralized point-to-point distributed block chain network established through a TCP (transmission control protocol), and the online state of the host nodes is ensured according to a heartbeat mechanism among the host nodes in the server cluster;
The data collection module is used for collecting data change or data modification of a change host in the server cluster;
The file integration module is used for integrating the data change or data modification generated by the change host computer into a file module;
the validity verification module is used for verifying the validity of the file module based on an asymmetric encryption algorithm;
the consensus voting module is used for carrying out consensus voting based on a consensus algorithm on the file modules passing the legality verification; when the determined consensus is larger than or equal to the preset proportion, triggering a preset intelligent contract;
and the file synchronization module is used for completing the synchronization of the server cluster file and the file module according to the intelligent contract.
in order to achieve the above object, the present invention also provides an electronic device, comprising: the server cluster file synchronization system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the server cluster file synchronization method.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a server cluster file synchronization program, and when the server cluster file synchronization program is executed by a processor, the server cluster file synchronization program implements the steps of the foregoing server cluster file synchronization method.
the server cluster file synchronization method and device, the electronic device and the storage medium provided by the invention access each host node of the server cluster, acquire the identity information of each host node, acquire the data change or data modification generated by the changed host to form a file module, further perform validity verification on the file module, perform consensus voting if the verification is passed, further perform file module synchronization operation of the server cluster, enable each host node of the server cluster to generate the same data change or data modification as the changed host, and effectively improve the efficiency of server cluster file synchronization.
To the accomplishment of the foregoing and related ends, one or more aspects of the invention comprise the features hereinafter fully described. The following description and the annexed drawings set forth in detail certain illustrative aspects of the invention. These aspects are indicative, however, of but a few of the various ways in which the principles of the invention may be employed. Further, the present invention is intended to include all such aspects and their equivalents.
Drawings
FIG. 1 is a diagram illustrating a preferred application environment of a server cluster file synchronization method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a server cluster file synchronization method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a server cluster file synchronization apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the invention;
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
when data change or data modification occurs to a change host at present, each computer needs to be logged in to modify corresponding configuration or data, the processing efficiency is extremely low, errors are easy to occur, and in order to avoid the situation that the corresponding configuration or data processing efficiency is extremely low when one host needs to be logged in to modify, the invention provides a server cluster file synchronization method.
the block chain architecture in the block chain network is a distributed architecture, and the deployment mode thereof includes three types, namely a public chain, an alliance chain and a private chain, which correspond to a decentralized distributed system, a partial decentralized distributed system and a weak central distributed system, while the decentralized distributed system is applied in the embodiment;
in a distributed system, a plurality of hosts form a network cluster through asynchronous communication. In such an asynchronous system, state replication between hosts is required to ensure that each host has consistent state consensus. The invention provides a server cluster file synchronization method which is based on a block chain, adopts a block chain architecture and is applied to an electronic device 40. Fig. 1 is a schematic diagram of an application environment of a server cluster file synchronization method according to a preferred embodiment of the present invention.
In this embodiment, fig. 1 is a schematic application environment diagram of a server cluster file synchronization method according to a preferred embodiment of the present invention, as shown in fig. 1, in the implementation environment, the server cluster file synchronization method includes a first computer device 110 and a second computer device 120.
the first computer device 110 is a computer device of a single node in a cluster, for example, a computer device such as a computer in a server cluster node, the first computer device 110 and the second computer device 120 are partial nodes in the server cluster, and the first computer device 110 and the second computer device 120 are shown in fig. 2.
it should be noted that the first computer device 110 and the second computer device 120 may be a tablet computer, a notebook computer, a desktop computer, etc., which is a cenOS (linux) system, preferably using a virtual machine, and installed with git, go, but not limited thereto. The first computer device 110 and the second computer device 120 may be connected through bluetooth, USB (universal serial Bus), or other communication connection methods, which is not limited herein.
Fig. 2 is a flowchart of server cluster file synchronization according to the present invention, in this embodiment, the server cluster file synchronization process includes the following steps:
s110: each server host is taken as a host node to carry a server cluster, each host node in the carried server cluster is in a decentralized point-to-point distributed block chain network established through a TCP protocol, and the online state of the host node is ensured among the host nodes in the server cluster through a heartbeat mechanism.
When each server host is taken as a host node to carry a server cluster, each host node in the server cluster acquires IP identity information of adjacent peer host nodes, and then the acquired identity information of each host node is recorded into the server cluster according to a predefined structure of an X.509 certificate by adopting a block chain distributed account book technology;
IP identity information data of all hosts in the server cluster are stored on each host node of the server cluster;
the IP identity information of each host in the server cluster at least includes: host model, asset number, and host configuration information.
The heartbeat mechanism regularly sends a self-defined structure body to each host node, the structure body comprises a heartbeat packet or a heartbeat frame, the heartbeat packet or the heartbeat frame is sent every few minutes, the heartbeat packet or the heartbeat frame is generally fixed information, and when each host node receives the fixed information, one piece of fixed information is replied to the server cluster. If the server cluster receives the fixed information reply, the host node is considered to be in a connection state or an online state, and the connection is judged to be effective; if the server cluster does not receive the fixed information reply and is regarded as disconnected, the host node is judged to be invalid in connection, namely the host node which does not receive the fixed information reply is an invalid connection node and needs to be reconnected; if a certain host node is always in an offline state according to a heartbeat mechanism among the host nodes in the server cluster, an alarm is sent to the client side, and reconnection needs to be initiated manually.
after the embarkation of the server cluster is completed, the method proceeds to step S120: collecting data change information or data modification information of a change host in the server cluster, and integrating the data change information and the data modification information generated by the change host into a file module, wherein the change host is a host node with data change or data modification in the server cluster; the file module is a collection of changes and data modifications that occur to a single host node, the change host.
after the integration of the document modules is completed, the process proceeds to step S130: carrying out validity verification on the file module based on an asymmetric encryption algorithm;
The process of carrying out validity verification on the file module based on the asymmetric encryption algorithm comprises the following steps:
establishing a key authentication system for the changed host based on an asymmetric encryption algorithm;
the key authentication system judges the validity of the file module, if the data change or data modification in the file module is legal, a consensus mechanism is triggered to carry out consensus voting, and if the data change or data modification in the file module is illegal, an alarm request is sent out to stop file synchronization;
The process of judging the validity of the file module by the key authentication system comprises the following steps:
The change host generates a public-private key pair, and separates the public-private key pair to form a public key and a private key;
the public key is adopted to change or modify and encrypt the data in the file module and then add the data to each host node in the server cluster;
an information transmission channel is established at least based on any one of a DUBBO protocol, a TCP protocol and an HTTP protocol, a private key is transmitted through the information transmission channel, the private key is adopted to decrypt data change information or data modification information encrypted by the public key, and when decryption is successful, the file module is judged to be legal.
after the validity verification, the process proceeds to step S140: and carrying out consensus voting based on a consensus algorithm on the file modules passing the legality verification, and triggering a preset intelligent contract when the found consensus is greater than or equal to a preset proportion.
and carrying out consensus voting based on a consensus algorithm on the file modules passing the legality verification, wherein the consensus proportion is preset in advance in the process of triggering the intelligent contract when the consensus reaches the preset consensus proportion, the file modules passing the legality verification can trigger the intelligent contract only when the consensus reaches the consensus proportion, and a warning is sent to stop the file synchronization if the consensus does not reach the consensus proportion.
The consensus algorithm is generally a rule, each host node screens out the most representative data according to the rule, and in the blockchain network, various screening schemes exist, including: in this embodiment, the rule is to vote on a file module that passes the validity verification, screen out an appropriate file module, and make all host nodes in the server cluster keep data consistent.
After triggering the preset intelligent contract, the method proceeds to step S150: and completing the synchronization of the server cluster file and the file module according to the triggered intelligent contract.
The triggered intelligent contract calls a contract program to complete the synchronization of the server cluster file and the file module, and the process may include:
triggering an intelligent contract preset in the block chain network to start a contract program;
autonomously detecting data change information or data modification information in the file module through the contract program, and starting a data synchronization program;
Enabling each host node in the server cluster and the change host to generate consistent data change or data modification through the data synchronization program;
the changing host is authenticated and validated by each host node in the blockchain network.
The server cluster file refers to IP identity information and other related data of all host nodes in the whole server cluster, the file module refers to data change or data modification generated by the change host, and the server cluster file is consistent with the file module in order to ensure that all the host nodes in the whole server cluster generate the same data change or data modification as the change host.
In the server cluster file synchronization method in this embodiment, after a server cluster is carried on based on a block chain network, data change and data modification occurring in a change host are integrated into a file module, then validity verification is performed on the file module based on an asymmetric encryption algorithm, consensus voting is performed on the file modules passing the validity verification, and then an intelligent rule is triggered to complete synchronization of the whole server cluster file and the file module; when one computer is changed or data is modified, each computer is not required to be logged in to modify corresponding configuration or data, and the efficiency of completing server cluster file synchronization by coping with a change host can be greatly improved.
fig. 3 is a block diagram of a server cluster file synchronization apparatus 300 involved in the server cluster file synchronization method according to the embodiment of the present invention.
As shown in fig. 3, the server cluster file synchronization apparatus 300 according to this embodiment includes a cluster loading module 310, a data collection module 320, a file integration module 330, a validity verification module 340, a consensus voting module 350, and a file synchronization module 360.
The cluster carrying module 310 is configured to carry a server cluster with each server host as a host node, where the server hosts are in a decentralized point-to-point distributed block chain network established by a TCP protocol, and ensure an online state of the host nodes according to a heartbeat mechanism between the host nodes in the server cluster;
A data collection module 320, configured to collect data changes or data modifications that occur to a change host in a server cluster hosted by the cluster hosting module 310;
A file integration module 330, configured to integrate the data change or data modification generated by the change host and collected by the data collection module 320 into a file module;
A validity verifying module 340, configured to verify validity of the file module integrated by the file integrating module 330 based on an asymmetric encryption algorithm;
A consensus voting module 350, configured to perform consensus voting based on a consensus algorithm on the file modules that pass the validity verification by the validity verification module 340; when the determined consensus is larger than or equal to the preset proportion, triggering a preset intelligent contract;
And the file synchronization module 360 is configured to complete synchronization between the server cluster file and the file module according to the intelligent contract triggered by the consensus voting module 350.
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention, in this embodiment, the electronic device 40 may be a terminal device with an operation function, such as a server, a tablet computer, a portable computer, a desktop computer, and the like.
the electronic device 40 includes: a processor 41, a memory 42, a computer program 43, a network interface and a communication bus.
the electronic device 40 may be a tablet computer, a desktop computer, a smart phone, but is not limited thereto.
the memory 42 includes at least one type of readable storage medium. At least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 40, such as a hard disk of the electronic device 40. In other embodiments, the readable storage medium may also be an external memory of the electronic device 40, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device 40.
In the present embodiment, the readable storage medium of the memory 42 is generally used for storing the computer program 43 installed in the electronic device 40.
processor 41 may, in some embodiments, be a Central Processing Unit (CPU), microprocessor or other data Processing chip that executes program code stored in memory 42 or processes data, such as server cluster file synchronization method 43.
The network interface may optionally include a standard wired interface, a wireless interface (e.g., a WI-FI interface), typically used to establish a communication link between the electronic device 40 and other electronic devices.
The communication bus is used to enable connection communication between these components.
Fig. 4 only shows electronic device 40 with components 41-43, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In the embodiment shown in FIG. 4, the memory 42, which is a type of computer storage medium, may have stored therein an operating system and a server cluster file synchronization program 43; the processor 41, when executing the server cluster file synchronization program 43 stored in the memory 42, implements the following steps:
Each server host is taken as a host node to carry a server cluster, each host node in the server cluster is in a decentralized point-to-point distributed block chain network established through a TCP (transmission control protocol), and the online state of the host node is ensured among the host nodes in the server cluster through a heartbeat mechanism;
Collecting data change information or data modification information of a change host in the server cluster, and integrating the data change information and the data modification information into a file module; the change host is a host node in which data change or data modification occurs in the server cluster;
carrying out validity verification on the file module based on an asymmetric encryption algorithm;
carrying out consensus voting based on a consensus algorithm on the file modules passing the validity verification, and triggering a preset intelligent contract when the found consensus is greater than or equal to a preset proportion;
and completing the synchronization of the server cluster file and the file module according to the intelligent contract.
Furthermore, the present invention also provides a computer-readable storage medium, in which a server cluster file synchronization program is stored, and when executed by a processor, the server cluster file synchronization program implements the following operations:
each server host is taken as a host node to carry a server cluster, each host node in the server cluster is in a decentralized point-to-point distributed block chain network established through a TCP (transmission control protocol), and the online state of the host node is ensured among the host nodes in the server cluster through a heartbeat mechanism;
collecting data change information or data modification information of a change host in a server cluster, and integrating the data change information and the data modification information into a file module, wherein the change host is a host node with data change or data modification in the server cluster;
carrying out validity verification on the file module based on an asymmetric encryption algorithm;
carrying out consensus voting based on a consensus algorithm on the file modules passing the validity verification, and triggering a preset intelligent contract when the found consensus is greater than or equal to a preset proportion;
and completing the synchronization of the server cluster file and the file module according to the intelligent contract.
the process of judging the validity of the file module through the key authentication system comprises the following steps:
Acquiring a public-private key pair generated by the changed host, separating the public-private key pair to form a public key and a private key, and adding the public key to each host node in the server cluster in combination with data change or data modification in the file module;
Establishing an information transmission channel based on any one of a DUBBO protocol, a TCP protocol and an HTTP protocol;
and transmitting a private key through an information transmission channel, decrypting the data change information or the data modification information encrypted by the public key by adopting the private key, and judging that the file module is legal when the decryption is successful. .
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the server cluster file synchronization method and the electronic device, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
the above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. a server cluster file synchronization method is applied to a server cluster and is characterized by comprising the following steps:
each server host is taken as a host node to carry a server cluster, each host node in the server cluster is in a decentralized point-to-point distributed block chain network established through a TCP (transmission control protocol), and the online state of the host node is ensured among the host nodes in the server cluster through a heartbeat mechanism;
collecting data change information or data modification information of a change host in the server cluster, and integrating the data change information and the data modification information into a file module, wherein the change host is a host node with data change or data modification in the server cluster;
carrying out validity verification on the file module based on an asymmetric encryption algorithm;
carrying out consensus voting based on a consensus algorithm on the file modules passing the validity verification, and triggering a preset intelligent contract when the found consensus is greater than or equal to a preset proportion;
and completing the synchronization of the server cluster file and the file module according to the intelligent contract.
2. the method for synchronizing the files of the server cluster according to claim 1, wherein in the process of loading the server cluster by using each server host as a host node, the method comprises the following steps:
acquiring IP identity information of adjacent peer host nodes through the host nodes in the server cluster;
the method comprises the steps of adopting a block chain distributed account book technology, storing the acquired IP identity information of each host node in the server cluster according to a predefined structure, wherein the IP identity information of each host node in the server cluster at least comprises the following steps: host model, asset number, and host configuration information.
3. The server cluster file synchronization method of claim 1, wherein the heartbeat mechanism comprises:
sending a self-defined structure body to each host node at fixed time, judging the effectiveness of connection between the host nodes in the server cluster according to a feedback result of the structure body received by each host node, and sending a reconnection instruction if the connection between the host nodes in the server cluster is judged to be invalid, wherein the structure body comprises a heartbeat packet or a heartbeat frame.
4. the server cluster file synchronization method according to claim 1, wherein the process of validating the validity of the file module based on the asymmetric encryption algorithm comprises:
establishing a key authentication system for the changed host based on an asymmetric encryption algorithm;
and judging the legality of the file module through the key authentication system, if the data in the file module is legal to change or legal to modify, triggering a consensus mechanism to perform consensus voting, and otherwise, sending an alarm request to stop the synchronization of the server cluster file and the file module.
5. the method according to claim 4, wherein the process of determining the validity of the file module by the key authentication system comprises:
Acquiring a public-private key pair generated by the change host, and separating the public-private key pair to form a public key and a private key;
encrypting the data change information or the data modification information in the file module by adopting the public key and then adding the encrypted data change information or the encrypted data modification information to each host node in the server cluster;
establishing an information transmission channel based on any one of a DUBBO protocol, a TCP protocol and an HTTP protocol;
And transmitting a private key through the information transmission channel, decrypting the data change information or the data modification information encrypted by the public key by adopting the private key, and judging that the file module is legal when the decryption is successful.
6. The method for synchronizing the files of the server cluster according to claim 1, wherein triggering a preset intelligent contract when the determined consensus is greater than or equal to a preset ratio comprises:
And when the determined consensus is larger than or equal to the preset consensus proportion, triggering the intelligent contract through the file module.
7. The method for synchronizing the server cluster files according to claim 1, wherein the process of synchronizing the server cluster files and the file modules according to the intelligent contract comprises:
Triggering an intelligent contract preset in the block chain network to start a contract program;
detecting data change information or data modification information in the file module through the contract program, and starting a data synchronization program;
Enabling each host node in the server cluster and the change host to generate consistent data change or data modification through the data synchronization program;
verifying and confirming the change host through each host node in the blockchain network.
8. a server cluster file synchronization apparatus, comprising:
The system comprises a cluster carrying module, a central processing module and a central processing module, wherein the cluster carrying module is used for carrying a server cluster by taking each server host as a host node, the server hosts are in a decentralized point-to-point distributed block chain network established through a TCP (transmission control protocol), and the online state of the host nodes is ensured according to a heartbeat mechanism among the host nodes in the server cluster;
The data collection module is used for collecting data change or data modification of a change host in the server cluster;
the file integration module is used for integrating the data change or data modification generated by the change host computer into a file module;
the validity verification module is used for verifying the validity of the file module based on an asymmetric encryption algorithm;
the consensus voting module is used for carrying out consensus voting based on a consensus algorithm on the file modules passing the legality verification; when the determined consensus is larger than or equal to the preset proportion, triggering a preset intelligent contract;
And the file synchronization module is used for completing the synchronization of the server cluster file and the file module according to the intelligent contract.
9. An electronic device, comprising: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the server cluster file synchronization method of any one of claims 1 to 7 when executing the computer program.
10. a computer-readable storage medium, in which a server cluster file synchronization program is stored, which, when executed by a processor, implements the steps of the server cluster file synchronization method according to any one of claims 1 to 7.
CN201910875406.7A 2019-09-17 2019-09-17 Server cluster file synchronization method and device, electronic equipment and storage medium Active CN110572468B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910875406.7A CN110572468B (en) 2019-09-17 2019-09-17 Server cluster file synchronization method and device, electronic equipment and storage medium
PCT/CN2019/117892 WO2021051581A1 (en) 2019-09-17 2019-11-13 Server cluster file synchronization method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910875406.7A CN110572468B (en) 2019-09-17 2019-09-17 Server cluster file synchronization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110572468A true CN110572468A (en) 2019-12-13
CN110572468B CN110572468B (en) 2022-11-04

Family

ID=68780633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910875406.7A Active CN110572468B (en) 2019-09-17 2019-09-17 Server cluster file synchronization method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110572468B (en)
WO (1) WO2021051581A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111372100A (en) * 2020-04-21 2020-07-03 白杨 End-to-end content distribution network system and distribution method based on distributed election
CN111400328A (en) * 2020-03-12 2020-07-10 北京阿尔山金融科技有限公司 Data updating method and device and node server
CN112532721A (en) * 2020-11-27 2021-03-19 平安普惠企业管理有限公司 Cluster calling method and device, electronic equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785811A (en) * 2022-04-19 2022-07-22 纳贤信息科技(深圳)有限公司 Method for realizing non-centralized cluster
CN115599747B (en) * 2022-04-22 2023-06-06 北京志凌海纳科技有限公司 Metadata synchronization method, system and equipment of distributed storage system
CN116209014A (en) * 2023-04-25 2023-06-02 北京陆天通信技术有限公司 Communication cluster system and communication method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104739A (en) * 2014-08-08 2014-10-15 成都致云科技有限公司 Data synchronization method for metadata service cluster of cloud storage system
CN106855869A (en) * 2015-12-09 2017-06-16 中国移动通信集团公司 A kind of methods, devices and systems for realizing database High Availabitity
CN109191124A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network, dispositions method and storage medium
CN109936486A (en) * 2019-01-02 2019-06-25 平安科技(深圳)有限公司 Auto-dial testing method, apparatus, equipment and storage medium based on block chain
CN110221938A (en) * 2019-05-06 2019-09-10 深圳壹账通智能科技有限公司 The method and storage medium of electronic device, block chain common recognition

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614655A (en) * 2017-03-24 2020-09-01 创新先进技术有限公司 Consensus checking method and device
CN108365993B (en) * 2018-03-09 2020-04-28 深圳前海微众银行股份有限公司 Block link point dynamic changing method, system and computer readable storage medium
CN109408108A (en) * 2018-10-12 2019-03-01 天津理工大学 A kind of Software Version data management system and method for building up based on block chain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104739A (en) * 2014-08-08 2014-10-15 成都致云科技有限公司 Data synchronization method for metadata service cluster of cloud storage system
CN106855869A (en) * 2015-12-09 2017-06-16 中国移动通信集团公司 A kind of methods, devices and systems for realizing database High Availabitity
CN109191124A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network, dispositions method and storage medium
CN109936486A (en) * 2019-01-02 2019-06-25 平安科技(深圳)有限公司 Auto-dial testing method, apparatus, equipment and storage medium based on block chain
CN110221938A (en) * 2019-05-06 2019-09-10 深圳壹账通智能科技有限公司 The method and storage medium of electronic device, block chain common recognition

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400328A (en) * 2020-03-12 2020-07-10 北京阿尔山金融科技有限公司 Data updating method and device and node server
CN111372100A (en) * 2020-04-21 2020-07-03 白杨 End-to-end content distribution network system and distribution method based on distributed election
CN112532721A (en) * 2020-11-27 2021-03-19 平安普惠企业管理有限公司 Cluster calling method and device, electronic equipment and storage medium
CN112532721B (en) * 2020-11-27 2022-09-16 平安普惠企业管理有限公司 Cluster calling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2021051581A1 (en) 2021-03-25
CN110572468B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN110572468B (en) Server cluster file synchronization method and device, electronic equipment and storage medium
CN111949953B (en) Identity authentication method, system and device based on block chain and computer equipment
CN111756753B (en) Authority verification method and system
CN110287682B (en) Login method, device and system
CN106612180B (en) Method and device for realizing session identification synchronization
CN110737566B (en) Host performance monitoring method and device, electronic equipment and storage medium
CN103136463B (en) System and method for for the temporary transient safety opening terminal flow process of electronic installation
CN107770159B (en) Vehicle accident data recording method and related device and readable storage medium
CN110177124B (en) Identity authentication method based on block chain and related equipment
CN109981562B (en) Software development kit authorization method and device
CN109145628B (en) Data acquisition method and system based on trusted execution environment
CN111030814A (en) Key negotiation method and device
CN113572728B (en) Method, device, equipment and medium for authenticating Internet of things equipment
CN111131300B (en) Communication method, terminal and server
CN110177111B (en) Information verification method, system and device
CN112738117A (en) Data transmission method, device and system, storage medium and electronic device
CN112241527B (en) Secret key generation method and system of terminal equipment of Internet of things and electronic equipment
CN109729000B (en) Instant messaging method and device
CN109361681A (en) The close certificate authentication method of state, device and equipment
CN113872989B (en) SSL protocol-based authentication method, SSL protocol-based authentication device, computer equipment and storage medium
CN110971609A (en) Anti-cloning method of DRM client certificate, storage medium and electronic equipment
WO2017029708A1 (en) Personal authentication system
CN109936522B (en) Equipment authentication method and equipment authentication system
CN114154182A (en) Information encryption method and device, storage medium and electronic device
CN109688158B (en) Financial execution chain authentication method, electronic device and storage medium

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